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 all attributes to mo output for check_mode delete #446

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

Conversation

akinross
Copy link
Collaborator

fixes #433

@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.05 ⚠️

Comparison is base (5ea28e6) 91.16% compared to head (1072bb4) 91.11%.

❗ Current head 1072bb4 differs from pull request most recent head 76b267b. Consider uploading reports for the commit 76b267b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #446      +/-   ##
==========================================
- Coverage   91.16%   91.11%   -0.05%     
==========================================
  Files         178      178              
  Lines        7925     7927       +2     
  Branches     1173     1173              
==========================================
- Hits         7225     7223       -2     
- Misses        594      597       +3     
- Partials      106      107       +1     
Flag Coverage Δ
integration 92.41% <100.00%> (-0.06%) ⬇️
sanity 36.01% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
plugins/module_utils/aci.py 70.01% <100.00%> (-0.30%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -1657,7 +1657,9 @@ def dump_json(self):

elif self.params.get("state") == "absent" and self.existing:
for aci_class in self.existing[0]:
mo[aci_class] = dict(attributes=dict(dn=dn_path, status="deleted"))
attributes = deepcopy(self.existing[0][aci_class]["attributes"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to include all the attributes or will just name do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This change is still to be decided because it is actually a NDI issue (bug already identified).

However if we do decide to make changes name will likely not be suffice. I think the identifier of the class is required by NDI, triggering the error of name for name attribute. But other classes can have different identifiers, thus I think more attributes should be exposed. Since we don't keep track of these identifier attributes we either expose all ( generic few lines of code ) or need to make changes per module to add the identifier attributes to the mo output.

@akinross akinross requested a review from shrsr June 15, 2023 16:57
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.

Output of Dry-Run/Check invalid when Status Absent
2 participants