Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Make restconf_get work with NX-OS #307

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NilashishC
Copy link
Contributor

Signed-off-by: NilashishC [email protected]

SUMMARY

Fixes #306

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

restconf_get.py

@NilashishC NilashishC requested a review from Qalthos July 21, 2021 14:14
@@ -73,9 +73,10 @@ def send_request(self, data, **message_kwargs):

def handle_response(response, response_data):
try:
response_data = json.loads(response_data.read())
res = response_data.read().strip()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
res = response_data.read().strip()
res = response_data.read().strip()
try:

(It won't let me remove the try above, but you get the idea)

The reason it's split into response and response_data is that the latter is a buffer containing the read-once data from the former, so you should be able to response_data.seek(0) and get the same result. But this is just fine, too.

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.

restconf_get on nxos shows no output, however, shows all green but works fine for iosxe
2 participants