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

Made changes to aci_rest module to only add annotation when the value is a dictionary and changed the way the cookie is retrieved in the httpapi plugin (DCNE-176) #689

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shrsr
Copy link
Collaborator

@shrsr shrsr commented Oct 3, 2024

No description provided.

@shrsr shrsr self-assigned this Oct 3, 2024
@shrsr shrsr linked an issue Oct 3, 2024 that may be closed by this pull request
@github-actions github-actions bot changed the title Made changes to aci_rest module to only add annotation when the value is a dictionary and changed the way the cookie is retrieved in the httpapi plugin Made changes to aci_rest module to only add annotation when the value is a dictionary and changed the way the cookie is retrieved in the httpapi plugin (DCNE-176) Oct 3, 2024
@shrsr shrsr force-pushed the intersight branch 2 times, most recently from 6dc18b8 to bcd3f89 Compare October 4, 2024 14:26
Copy link
Collaborator

@akinross akinross left a comment

Choose a reason for hiding this comment

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

How do we handle the output when imdata does not exist in response? I think there is another issue at hand where the response returned is not outputted properly. Did you run tests with the system api endpoint that response is visible in output?

@shrsr
Copy link
Collaborator Author

shrsr commented Oct 7, 2024

For now the only case we've seen where imdata is not in the response is when the instance of the response is of type list.
We do the following to cover that particular case:

if isinstance(jsondata, list):
            self.imdata = jsondata
            self.totalCount = len(jsondata)

With the above code the response is visible in the output when the System API endpoint is called upon.

@shrsr shrsr requested a review from akinross October 7, 2024 14:30
plugins/module_utils/aci.py Show resolved Hide resolved
anvitha-jain
anvitha-jain previously approved these changes Oct 7, 2024
Copy link
Collaborator

@anvitha-jain anvitha-jain left a comment

Choose a reason for hiding this comment

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

LGTM

…the value is a dictionary and changed the way the cookie is retrieved in the httpapi plugin
Copy link
Collaborator

@akinross akinross left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@sajagana sajagana left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@gmicol gmicol left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@anvitha-jain anvitha-jain left a comment

Choose a reason for hiding this comment

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

LGTM

plugins/httpapi/aci.py Show resolved Hide resolved
plugins/httpapi/aci.py Show resolved Hide resolved
@shrsr shrsr requested a review from samiib October 10, 2024 18:41
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.

aci_rest needs to support disabling Intersight Connectivity (DCNE-176)
7 participants