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

dcnm_vrf fix issues #351, #356, #357 #354

Open
wants to merge 51 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
40d93d6
Tentative fix for Issue #351
allenrobel Dec 3, 2024
0b17715
dcnm_vrf: to_bool() fix to return correct value, or call fail_json()
allenrobel Dec 3, 2024
6e32f42
dcnm_image_policy: fix for issue #347 (#348)
allenrobel Dec 3, 2024
244929b
dcnm_fabric: hardening (#349)
allenrobel Dec 3, 2024
5f67187
dcnm_vrf: remove bool() casts, more...
allenrobel Dec 4, 2024
9508840
dcnm_vrf: More refactoring and simplifying
allenrobel Dec 4, 2024
098d17f
Rename var for readability
allenrobel Dec 4, 2024
be41882
Rename var for readability
allenrobel Dec 4, 2024
13e076e
dcnm_vrf: Avoid code duplication
allenrobel Dec 5, 2024
6a6de04
Remove TODO comment
allenrobel Dec 5, 2024
12f9e53
dcnm_vrf: leverage get_vrf_lite_objects() everywhere
allenrobel Dec 5, 2024
bbbf285
Appease pylint f-string complaints, more...
allenrobel Dec 5, 2024
da54fa1
test_log_v2.py: Temporarily disable unit tests
allenrobel Dec 5, 2024
c8c578b
Appease pylint
allenrobel Dec 5, 2024
14da7d7
Fix pep8 too-many-blank-lines
allenrobel Dec 5, 2024
1e028a2
Remove python 3.9 incompatible type hint
allenrobel Dec 5, 2024
ee179b5
Re-enable test_log_v2.py unit tests and "fix" UT errors
allenrobel Dec 5, 2024
0c980b3
Appease linters
allenrobel Dec 5, 2024
5b8c1c3
Merge branch 'develop' into dcnm-vrf-fix-issue-351
allenrobel Dec 6, 2024
b401ab8
Update another conditional
allenrobel Dec 6, 2024
978b0d2
dcnm_vrf: dict_values_differ() use generic names
allenrobel Dec 6, 2024
75a24d5
dcnm_vrf: Address mwiebe review comments
allenrobel Dec 6, 2024
f747767
Address mwiebe coments part 2
allenrobel Dec 6, 2024
dbfe057
dcnm_vrf: Protect dictionary access
allenrobel Dec 6, 2024
cc804e0
dcnm_vrf: Refactor push_to_remote, validate_input
allenrobel Dec 7, 2024
78f9e0d
appease linters
allenrobel Dec 7, 2024
e861626
Appease linters
allenrobel Dec 7, 2024
3a1a514
More refactoring
allenrobel Dec 7, 2024
fed3a70
Fix typo
allenrobel Dec 7, 2024
930dbec
dcnm_vrf: fix IT files, minor cleanup
allenrobel Dec 8, 2024
d83d4fc
Fix UT failures
allenrobel Dec 8, 2024
832a3e8
Appease pylint
allenrobel Dec 8, 2024
cf27b33
Cleanup IT deleted, query, merged
allenrobel Dec 8, 2024
72bfc10
Update playbooks/roles
allenrobel Dec 8, 2024
5749eda
Move dynamic_inventory.py into playbooks/files
allenrobel Dec 8, 2024
acb3890
Appease ansible sanity
allenrobel Dec 8, 2024
0bc26be
Appease linters
allenrobel Dec 8, 2024
b78e996
dcnm_vrf: Updates to integration tests
allenrobel Dec 10, 2024
ca7bea8
Appease linters
allenrobel Dec 10, 2024
8fb0907
Fix unprotected dictionary access
allenrobel Dec 10, 2024
509c335
Update integration tests
allenrobel Dec 10, 2024
b61fd0b
dcnm_vrf/dcnm_tests.yaml - Include all vars
allenrobel Dec 11, 2024
a565a46
Update Usage section and assign additional fabric_* vars
allenrobel Dec 11, 2024
001931e
IT: interface var naming change
allenrobel Dec 11, 2024
ecd1849
IT: Update scale.yaml
allenrobel Dec 12, 2024
a0f44c3
dcnm_vrf: IT dynamic_inventory.py small modifications
allenrobel Dec 12, 2024
41a8fd7
dcnm_vrf: fix for #356, and for an undeploy case, simplify, more...
allenrobel Dec 15, 2024
c30cfd4
dcnm_vrf: Fix for issue #357
allenrobel Dec 16, 2024
d754e3e
dcnm_vrf IT: Update task titles, print results
allenrobel Dec 16, 2024
75334e0
Merge branch 'develop' into dcnm-vrf-fix-issue-351
allenrobel Dec 16, 2024
e92c1e2
IT: Update comment for workaround.
allenrobel Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions playbooks/roles/dcnm_image_policy/dcnm_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
leaf2: 192.168.1.5
leaf3: 192.168.1.6
leaf4: 192.168.1.7
install_package_1: cfg_cmp-0.3.1.0-1.x86_64.rpm
allenrobel marked this conversation as resolved.
Show resolved Hide resolved
uninstall_package_1: mtx-grpctunnel-2.1.0.0-10.4.1.lib32_64_n9000
image_policy_1: "KR5M"
image_policy_2: "NR3F"
epld_image_1: n9000-epld.10.2.5.M.img
Expand Down
2 changes: 1 addition & 1 deletion plugins/module_utils/fabric/replaced.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def _send_payloads(self):

for payload in self._payloads_to_commit:
commit_payload = copy.deepcopy(payload)
if commit_payload.get("DEPLOY", None) is not None:
if "DEPLOY" in commit_payload:
commit_payload.pop("DEPLOY")
try:
self._send_payload(commit_payload)
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/dcnm_fabric.py
Original file line number Diff line number Diff line change
Expand Up @@ -3032,7 +3032,7 @@ def get_need(self):
fabric_name = want.get("FABRIC_NAME", None)
fabric_type = want.get("FABRIC_TYPE", None)

if self.features[fabric_type] is False:
if self.features.get("fabric_type") is False:
msg = f"{self.class_name}.{method_name}: "
msg += f"Features required for fabric {fabric_name} "
msg += f"of type {fabric_type} are not running on the "
Expand Down Expand Up @@ -3361,7 +3361,7 @@ def get_need(self):
self.need_create.append(want)
continue

if self.features[fabric_type] is False:
if self.features.get("fabric_type") is False:
msg = f"{self.class_name}.{method_name}: "
msg += f"Features required for fabric {fabric_name} "
msg += f"of type {fabric_type} are not running on the "
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/dcnm_image_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def __init__(self, params):
raise ValueError(msg) from error

self.delete = ImagePolicyDelete()
self.merged = Merged(params)
self.replaced = Replaced(params)
allenrobel marked this conversation as resolved.
Show resolved Hide resolved

msg = f"ENTERED {self.class_name}().{method_name}: "
msg += f"state: {self.state}, "
Expand Down Expand Up @@ -627,10 +627,10 @@ def commit(self) -> None:

self._delete_policies_not_in_want()
# pylint: disable=attribute-defined-outside-init
self.merged.rest_send = self.rest_send
self.replaced.rest_send = self.rest_send
# pylint: enable=attribute-defined-outside-init
self.merged.results = self.results
self.merged.commit()
self.replaced.results = self.results
self.replaced.commit()

def _delete_policies_not_in_want(self) -> None:
"""
Expand Down
Loading
Loading