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 checkmode in aci_rest module #470

Merged
merged 6 commits into from
Sep 28, 2023

Conversation

akinross
Copy link
Collaborator

fixes #436

@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Patch coverage: 98.37% and project coverage change: -0.01% ⚠️

Comparison is base (658ea51) 96.53% compared to head (372d654) 96.53%.
Report is 12 commits behind head on master.

❗ Current head 372d654 differs from pull request most recent head c47ff1b. Consider uploading reports for the commit c47ff1b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #470      +/-   ##
==========================================
- Coverage   96.53%   96.53%   -0.01%     
==========================================
  Files         181      183       +2     
  Lines        8291     8456     +165     
  Branches     1222     1259      +37     
==========================================
+ Hits         8004     8163     +159     
- Misses        217      222       +5     
- Partials       70       71       +1     
Flag Coverage Δ
integration 94.54% <97.29%> (+0.01%) ⬆️
sanity 35.27% <17.29%> (-0.32%) ⬇️

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

Files Changed Coverage Δ
plugins/modules/aci_rest.py 93.47% <95.65%> (+0.40%) ⬆️
.../modules/aci_interface_policy_leaf_policy_group.py 98.94% <97.14%> (-1.06%) ⬇️
...dules/aci_interface_policy_leaf_fc_policy_group.py 97.91% <97.91%> (ø)
plugins/modules/aci_dhcp_relay.py 100.00% <100.00%> (ø)
plugins/modules/aci_dhcp_relay_provider.py 100.00% <100.00%> (+2.12%) ⬆️
...modules/aci_interface_policy_spine_policy_group.py 100.00% <100.00%> (ø)
plugins/modules/aci_l3out_extepg.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

sajagana
sajagana previously approved these changes Aug 31, 2023
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!

But could not test it completely because of the <urlopen error timed out>

@@ -1446,6 +1446,9 @@ def exit_json(self, filter_existing=None, **kwargs):
self.result["sent"] = self.config
self.result["proposed"] = self.proposed

elif self.__class__.__name__ == "ACIRESTModule" and self.method in ["POST", "DELETE"]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not do this->
elif "state" not in self.params?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is possible but this assures it is only executed for ACIRESTModule class ( which is only used in aci_rest module). In case any other module has state not in self.params it would still execute which I want to avoid.

plugins/module_utils/aci.py Outdated Show resolved Hide resolved
plugins/module_utils/aci.py Outdated Show resolved Hide resolved
plugins/modules/aci_rest.py Show resolved Hide resolved
@akinross akinross force-pushed the 436_check_mode_aci_rest branch from a786ff6 to d328643 Compare September 1, 2023 10:03
@akinross akinross requested a review from sajagana September 1, 2023 10:04
anvitha-jain
anvitha-jain previously approved these changes Sep 7, 2023
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

gmicol
gmicol previously approved these changes Sep 8, 2023
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

@akinross akinross dismissed stale reviews from gmicol and anvitha-jain via fb6cc63 September 8, 2023 14:40
shrsr
shrsr previously approved these changes Sep 8, 2023
Copy link
Collaborator

@shrsr shrsr left a comment

Choose a reason for hiding this comment

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

LGTM

shrsr
shrsr previously approved these changes Sep 8, 2023
Copy link
Collaborator

@shrsr shrsr left a comment

Choose a reason for hiding this comment

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

LGTM

anvitha-jain
anvitha-jain previously approved these changes Sep 8, 2023
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.

can you check over the sanity test again? it seems like they were cancelled for some reason.

@akinross
Copy link
Collaborator Author

akinross commented Sep 8, 2023

@gmicol when I run local I see only 2 pylint issues:

ERROR: Found 2 pylint issue(s) which need to be resolved:
ERROR: tests/unit/compat/builtins.py:30:4: unused-import: Unused import builtin
ERROR: tests/unit/module_utils/test_aci.py:44:8: unused-import: Unused cobra imported from xmljson

These are not related to the PR of mine. Also I do not see a reason for the cancel so not sure why this occurs

@akinross akinross requested a review from gmicol September 8, 2023 17:55
gmicol
gmicol previously approved these changes Sep 12, 2023
sajagana
sajagana previously approved these changes Sep 14, 2023
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!

shrsr
shrsr previously approved these changes Sep 20, 2023
Copy link
Collaborator

@shrsr shrsr left a comment

Choose a reason for hiding this comment

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

LGTM

sajagana
sajagana previously approved these changes Sep 20, 2023
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!

@akinross akinross dismissed stale reviews from sajagana and shrsr via c47ff1b September 20, 2023 16:44
@akinross akinross requested review from shrsr and sajagana September 22, 2023 12:53
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

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

plugins/module_utils/aci.py Outdated Show resolved Hide resolved
@lhercot lhercot merged commit f9b55a4 into CiscoDevNet:master Sep 28, 2023
19 of 21 checks passed
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.

Check mode support for aci_rest module
6 participants