Skip to content

Commit 6b12e22

Browse files
Addressing review comments
1 parent 2b8b9a2 commit 6b12e22

File tree

45 files changed

+1314
-487
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1314
-487
lines changed

playbooks/roles/dcnm_vrf/dcnm_tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
# for example, do not use interface_1.
3838
# vars:
3939
# fabric_1: f1
40-
# fabric_1: f1
4140
# switch_1: 10.1.1.2
41+
# switch_2: 10.1.1.3
4242
# switch_3: 10.1.1.4
43-
# switch_3: 10.1.1.4
44-
# switch_4: 10.1.1.5
43+
# interface_1: Ethernet1/1
44+
# interface_2: Ethernet1/2
4545
# interface_3: Ethernet1/3
4646
## Uncomment ONE of the following testcases
4747
# testcase: deleted

plugins/modules/dcnm_network.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,16 +677,16 @@ def diff_for_attach_deploy(self, want_a, have_a, replace=False):
677677

678678
torconfig = tor_w["switch"] + "(" + ",".join(atch_tor_ports) + ")"
679679
want.update({"torPorts": torconfig})
680-
# Update torports_configured to True. If there is no other config change for attach
681-
# We will still append this attach to attach_list as there is tor port change
680+
# Update torports_configured to True. If there is no other config change for attach
681+
# We will still append this attach to attach_list as there is tor port change
682682
if sorted(atch_tor_ports) != sorted(h_tor_ports):
683683
torports_configured = True
684684

685685
if not torports_present:
686686
torconfig = tor_w["switch"] + "(" + tor_w["torPorts"] + ")"
687687
want.update({"torPorts": torconfig})
688-
# Update torports_configured to True. If there is no other config change for attach
689-
# We will still append this attach to attach_list as there is tor port change
688+
# Update torports_configured to True. If there is no other config change for attach
689+
# We will still append this attach to attach_list as there is tor port change
690690
torports_configured = True
691691

692692
if have.get("torports"):

test-requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
black>=24.3.0 ; python_version > '3.5'
1+
black==24.3.0 ; python_version > '3.5'
22
flake8
33
pexpect
44
yamllint
55
pytest-xdist
6-
coverage>=4.5.4
7-
deepdiff>=8.6.1
8-
pydantic>=2.11.4
9-
ansible.netcommon>=4.1.0
6+
coverage==4.5.4
7+
deepdiff==8.6.1
8+
pydantic==2.11.4
9+
ansible.netcommon>=4.1.0

tests/integration/targets/dcnm_bootflash/tests/dcnm_bootflash_deleted_specific.yaml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@
8080
# ok: [172.22.150.244] => {
8181
# "result": {
8282
# "changed": true,
83-
# "diff": [# {
84-
# "172.22.150.112": [# {
83+
# "diff": [
84+
# {
85+
# "172.22.150.112": [
86+
# {
8587
# "date": "2024-08-13 01:00:25",
8688
# "device_name": "cvd-1211-spine",
8789
# "filepath": "bootflash:/air.ndfc_ut",
@@ -118,7 +120,8 @@
118120
# "supervisor": "active"
119121
# }
120122
# ],
121-
# "172.22.150.113": [# {
123+
# "172.22.150.113": [
124+
# {
122125
# "date": "2024-08-13 01:01:14",
123126
# "device_name": "cvd-1212-spine",
124127
# "filepath": "bootflash:/black.ndfc_ut",
@@ -159,14 +162,16 @@
159162
# }
160163
# ],
161164
# "failed": false,
162-
# "metadata": [# {
165+
# "metadata": [
166+
# {
163167
# "action": "bootflash_delete",
164168
# "check_mode": false,
165169
# "sequence_number": 1,
166170
# "state": "deleted"
167171
# }
168172
# ],
169-
# "response": [# {
173+
# "response": [
174+
# {
170175
# "DATA": "File(s) Deleted Successfully.",
171176
# "DATA_CONT": "Deleted files: [air.ndfc_ut, earth.ndfc_ut, water.ndfc_ut, fire.ndfc_ut]",
172177
# "DATA_CONT": "[green.ndfc_ut, blue.ndfc_ut, black.ndfc_ut, red.ndfc_ut]",
@@ -177,7 +182,8 @@
177182
# "sequence_number": 1
178183
# }
179184
# ],
180-
# "result": [# {
185+
# "result": [
186+
# {
181187
# "changed": true,
182188
# "sequence_number": 1,
183189
# "success": true
@@ -267,25 +273,29 @@
267273
# ok: [172.22.150.244] => {
268274
# "result": {
269275
# "changed": false,
270-
# "diff": [# {
276+
# "diff": [
277+
# {
271278
# "sequence_number": 1
272279
# }
273280
# ],
274281
# "failed": false,
275-
# "metadata": [# {
282+
# "metadata": [
283+
# {
276284
# "action": "bootflash_delete",
277285
# "check_mode": false,
278286
# "sequence_number": 1,
279287
# "state": "deleted"
280288
# }
281289
# ],
282-
# "response": [# {
290+
# "response": [
291+
# {
283292
# "MESSAGE": "No files to delete.",
284293
# "RETURN_CODE": 200,
285294
# "sequence_number": 1
286295
# }
287296
# ],
288-
# "result": [# {
297+
# "result": [
298+
# {
289299
# "changed": false,
290300
# "sequence_number": 1,
291301
# "success": true

tests/integration/targets/dcnm_bootflash/tests/dcnm_bootflash_deleted_wildcard.yaml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@
8080
# ok: [172.22.150.244] => {
8181
# "result": {
8282
# "changed": true,
83-
# "diff": [# {
84-
# "172.22.150.112": [# {
83+
# "diff": [
84+
# {
85+
# "172.22.150.112": [
86+
# {
8587
# "date": "2024-08-13 01:00:25",
8688
# "device_name": "cvd-1211-spine",
8789
# "filepath": "bootflash:/air.ndfc_ut",
@@ -118,7 +120,8 @@
118120
# "supervisor": "active"
119121
# }
120122
# ],
121-
# "172.22.150.113": [# {
123+
# "172.22.150.113": [
124+
# {
122125
# "date": "2024-08-13 01:01:14",
123126
# "device_name": "cvd-1212-spine",
124127
# "filepath": "bootflash:/black.ndfc_ut",
@@ -159,14 +162,16 @@
159162
# }
160163
# ],
161164
# "failed": false,
162-
# "metadata": [# {
165+
# "metadata": [
166+
# {
163167
# "action": "bootflash_delete",
164168
# "check_mode": false,
165169
# "sequence_number": 1,
166170
# "state": "deleted"
167171
# }
168172
# ],
169-
# "response": [# {
173+
# "response": [
174+
# {
170175
# "DATA": "File(s) Deleted Successfully.",
171176
# "DATA_CONT": "Deleted files: [air.ndfc_ut, earth.ndfc_ut, water.ndfc_ut, fire.ndfc_ut]",
172177
# "DATA_CONT": "[green.ndfc_ut, blue.ndfc_ut, black.ndfc_ut, red.ndfc_ut]",
@@ -177,7 +182,8 @@
177182
# "sequence_number": 1
178183
# }
179184
# ],
180-
# "result": [# {
185+
# "result": [
186+
# {
181187
# "changed": true,
182188
# "sequence_number": 1,
183189
# "success": true
@@ -248,25 +254,29 @@
248254
# ok: [172.22.150.244] => {
249255
# "result": {
250256
# "changed": false,
251-
# "diff": [# {
257+
# "diff": [
258+
# {
252259
# "sequence_number": 1
253260
# }
254261
# ],
255262
# "failed": false,
256-
# "metadata": [# {
263+
# "metadata": [
264+
# {
257265
# "action": "bootflash_delete",
258266
# "check_mode": false,
259267
# "sequence_number": 1,
260268
# "state": "deleted"
261269
# }
262270
# ],
263-
# "response": [# {
271+
# "response": [
272+
# {
264273
# "MESSAGE": "No files to delete.",
265274
# "RETURN_CODE": 200,
266275
# "sequence_number": 1
267276
# }
268277
# ],
269-
# "result": [# {
278+
# "result": [
279+
# {
270280
# "changed": false,
271281
# "sequence_number": 1,
272282
# "success": true

tests/integration/targets/dcnm_bootflash/tests/dcnm_bootflash_query_specific.yaml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@
7575
# ok: [172.22.150.244] => {
7676
# "result": {
7777
# "changed": false,
78-
# "diff": [# {
79-
# "172.22.150.112": [# {
78+
# "diff": [
79+
# {
80+
# "172.22.150.112": [
81+
# {
8082
# "bootflash_type": "active",
8183
# "date": "Aug 03 01:37:06 2024",
8284
# "deviceName": "cvd-1211-spine",
@@ -88,7 +90,8 @@
8890
# "size": "4"
8991
# }
9092
# ],
91-
# "172.22.150.113": [# {
93+
# "172.22.150.113": [
94+
# {
9295
# "bootflash_type": "active",
9396
# "date": "Aug 03 01:38:10 2024",
9497
# "deviceName": "cvd-1212-spine",
@@ -104,18 +107,21 @@
104107
# }
105108
# ],
106109
# "failed": false,
107-
# "metadata": [# {
110+
# "metadata": [
111+
# {
108112
# "action": "bootflash_info",
109113
# "check_mode": false,
110114
# "sequence_number": 1,
111115
# "state": "query"
112116
# }
113117
# ],
114-
# "response": [# {
118+
# "response": [
119+
# {
115120
# "172.22.150.112": {
116121
# "DATA": {
117122
# "bootFlashDataMap": {
118-
# "bootflash:": [# {
123+
# "bootflash:": [
124+
# {
119125
# "bootflash_type": "active",
120126
# "date": "Aug 12 23:17:57 2024",
121127
# "deviceName": "cvd-1211-spine",
@@ -140,7 +146,8 @@
140146
# "usedSpace": 8690008064
141147
# }
142148
# },
143-
# "partitions": [# "bootflash:"
149+
# "partitions": [
150+
# "bootflash:"
144151
# ],
145152
# "requiredSpace": "NA"
146153
# },
@@ -153,7 +160,8 @@
153160
# "172.22.150.113": {
154161
# "DATA": {
155162
# "bootFlashDataMap": {
156-
# "bootflash:": [# {
163+
# "bootflash:": [
164+
# {
157165
# "bootflash_type": "active",
158166
# "date": "Jul 07 01:20:21 2024",
159167
# "deviceName": "cvd-1212-spine",
@@ -178,7 +186,8 @@
178186
# "usedSpace": 11054571520
179187
# }
180188
# },
181-
# "partitions": [# "bootflash:"
189+
# "partitions": [
190+
# "bootflash:"
182191
# ],
183192
# "requiredSpace": "NA"
184193
# },
@@ -191,7 +200,8 @@
191200
# "sequence_number": 1
192201
# }
193202
# ],
194-
# "result": [# {
203+
# "result": [
204+
# {
195205
# "172.22.150.112": {
196206
# "found": true,
197207
# "success": true

0 commit comments

Comments
 (0)