Skip to content

Exposing Timeout and Check_Mode Properties for Rest Send#253

Open
AKDRG wants to merge 1 commit intoCiscoDevNet:developfrom
AKDRG:infra_ch
Open

Exposing Timeout and Check_Mode Properties for Rest Send#253
AKDRG wants to merge 1 commit intoCiscoDevNet:developfrom
AKDRG:infra_ch

Conversation

@AKDRG
Copy link
Copy Markdown
Collaborator

@AKDRG AKDRG commented Apr 13, 2026

Issue:
Before the first request is made, the rest send object is not initialised. As a result, we are not able to set the timeout and check mode properties. Setting of timeout is crucial for restricting retries when errors occur and setting of check mode allows us to make a genuine GET request which is otherwise blocked.

Fix:
Introduce setters in the NDModule which sets the properties when the lazy initialisation happens, at the time of invoking the request method.

Copy link
Copy Markdown
Collaborator

@allenrobel allenrobel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Akshay, this looks fine to me. However nd_v2.py will be deprecated once #250 is merged.

Since modules are using nd_v2.py we'll, of course, keep it until everyone has transitioned to use Gaspard's framework (which #250 merges RestSend directly into). But we'll need to look into providing a means (perhaps in the base orchestrator class) to pass timeout and check_mode to RestSend via the orchestrator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants