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

[minor change] Add support for annotation in aci_rest module (#437) #497

Merged
merged 9 commits into from
Dec 21, 2023

Conversation

samiib
Copy link
Collaborator

@samiib samiib commented Oct 19, 2023

fixes #437

@samiib samiib force-pushed the aci_rest_annotation branch from 57f718c to 10a328d Compare October 19, 2023 21:43
@samiib samiib force-pushed the aci_rest_annotation branch from 10a328d to eae0317 Compare October 19, 2023 21:55
@samiib samiib changed the title [minor change] Add support for annotation in aci_rest module (#437) WIP [minor change] Add support for annotation in aci_rest module (#437) Oct 19, 2023
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (324327f) 35.32% compared to head (c6a7c6c) 96.25%.

Files Patch % Lines
plugins/modules/aci_rest.py 93.75% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #497       +/-   ##
===========================================
+ Coverage   35.32%   96.25%   +60.92%     
===========================================
  Files         230      231        +1     
  Lines       10610    10640       +30     
  Branches     1591     1601       +10     
===========================================
+ Hits         3748    10241     +6493     
+ Misses       6862      306     -6556     
- Partials        0       93       +93     
Flag Coverage Δ
integration 94.71% <93.93%> (?)
sanity 35.27% <18.18%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@samiib samiib changed the title WIP [minor change] Add support for annotation in aci_rest module (#437) [minor change] Add support for annotation in aci_rest module (#437) Oct 20, 2023
@samiib samiib self-assigned this Oct 20, 2023
@samiib samiib added the enhancement New feature or request label Oct 20, 2023
@samiib samiib linked an issue Oct 20, 2023 that may be closed by this pull request
plugins/modules/aci_rest.py Outdated Show resolved Hide resolved
plugins/modules/aci_rest.py Outdated Show resolved Hide resolved
plugins/modules/aci_rest.py Show resolved Hide resolved
@samiib samiib force-pushed the aci_rest_annotation branch 3 times, most recently from 45f2313 to 5167abb Compare October 25, 2023 22:16
@samiib samiib force-pushed the aci_rest_annotation branch from 5167abb to 0f29c6f Compare October 27, 2023 01:46
@samiib samiib requested a review from akinross October 27, 2023 08:24
@samiib samiib force-pushed the aci_rest_annotation branch from d7c3ddf to 37f922d Compare October 31, 2023 02:36
akinross
akinross previously approved these changes Oct 31, 2023
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.

cm_add_tenant.proposed.fvTenant.attributes.annotation == "orchestrator:ansible" check is failing.

@samiib
Copy link
Collaborator Author

samiib commented Dec 4, 2023

cm_add_tenant.proposed.fvTenant.attributes.annotation == "orchestrator:ansible" check is failing.

@sajagana This check in the xml_string tests should be fixed now.

@samiib samiib requested review from sajagana and akinross December 4, 2023 03:09
akinross
akinross previously approved these changes Dec 4, 2023
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.

Also update the tests/integration/targets/aci_rest/tasks/error_handling.yml task: - name: Verify error_on_input_validation

-    - "error_on_input_validation.msg == 'APIC Error 801: property descr of tn-ansible_test failed validation for value \\'This is an [invalid] description\\''"
+    - "error_on_input_validation.msg == 'APIC Error 801: property descr of uni/tn-ansible_test failed validation for value \\'This is an [invalid] description\\''"

tests/integration/targets/aci_rest/tasks/xml_file.yml Outdated Show resolved Hide resolved
@samiib
Copy link
Collaborator Author

samiib commented Dec 5, 2023

Also update the tests/integration/targets/aci_rest/tasks/error_handling.yml task: - name: Verify error_on_input_validation

-    - "error_on_input_validation.msg == 'APIC Error 801: property descr of tn-ansible_test failed validation for value \\'This is an [invalid] description\\''"
+    - "error_on_input_validation.msg == 'APIC Error 801: property descr of uni/tn-ansible_test failed validation for value \\'This is an [invalid] description\\''"

@sajagana, Not sure about this one because the test was passing when I ran it myself. Just wondering which APIC did you use to test on?

Co-authored-by: Sabari Jaganathan <[email protected]>
@akinross
Copy link
Collaborator

Also update the tests/integration/targets/aci_rest/tasks/error_handling.yml task: - name: Verify error_on_input_validation

-    - "error_on_input_validation.msg == 'APIC Error 801: property descr of tn-ansible_test failed validation for value \\'This is an [invalid] description\\''"
+    - "error_on_input_validation.msg == 'APIC Error 801: property descr of uni/tn-ansible_test failed validation for value \\'This is an [invalid] description\\''"

@sajagana, Not sure about this one because the test was passing when I ran it myself. Just wondering which APIC did you use to test on?

I'm seeing the same error now when running tests ( did not see runs before ). On november 28th the APICs where upgraded as I recall, perhaps the return message has changed?

@samiib
Copy link
Collaborator Author

samiib commented Dec 21, 2023

Also update the tests/integration/targets/aci_rest/tasks/error_handling.yml task: - name: Verify error_on_input_validation

-    - "error_on_input_validation.msg == 'APIC Error 801: property descr of tn-ansible_test failed validation for value \\'This is an [invalid] description\\''"
+    - "error_on_input_validation.msg == 'APIC Error 801: property descr of uni/tn-ansible_test failed validation for value \\'This is an [invalid] description\\''"

@sajagana, Not sure about this one because the test was passing when I ran it myself. Just wondering which APIC did you use to test on?

I'm seeing the same error now when running tests ( did not see runs before ). On november 28th the APICs where upgraded as I recall, perhaps the return message has changed?

@sajagana & @akinross

I have updated my branch with the latest changes from master and have been able to reproduce the failed assertion.
It appears the error message has changed between different versions of APIC. Some versions include uni/ in the error and other versions don't.
To account for this difference I changed the assertion to use a simple regex so the test will pass for this message variation.

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

@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
Member

@lhercot lhercot left a comment

Choose a reason for hiding this comment

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

LGTM

@lhercot lhercot merged commit 647dc30 into CiscoDevNet:master Dec 21, 2023
19 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aci_rest should support annotation option
4 participants