Skip to content

Commit c624ade

Browse files
committed
CI flow issue fix
1 parent b0760bd commit c624ade

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

plugins/modules/dcnm_child_fabric.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@
4242
type: list
4343
elements: dict
4444
suboptions:
45-
DEPLOY:
46-
default: False
47-
description:
48-
- Save and deploy the fabric configuration.
49-
required: false
50-
type: bool
5145
FABRIC_NAME:
5246
description:
5347
- The name of the MSD fabric.
@@ -62,7 +56,7 @@
6256

6357
EXAMPLES = """
6458
65-
- name: Create fabrics
59+
- name: add child fabrics to MSD
6660
cisco.dcnm.dcnm_child_fabric:
6761
state: merged
6862
config:
@@ -168,8 +162,9 @@ def verify_parent_fab_exists_in_controller(self):
168162
if fabric == item["destFabric"]:
169163
break
170164
else:
165+
invalid_fab = item["destFabric"]
171166
msg = f"{self.class_name}: {method_name}: "
172-
msg += f"Playbook configuration for FABRIC_NAME {item["destFabric"]} "
167+
msg += f"Playbook configuration for FABRIC_NAME {invalid_fab} "
173168
msg += "is not found in Controller. Please create and try again"
174169
raise ValueError(msg)
175170

@@ -179,8 +174,9 @@ def verify_parent_fab_is_MSD(self):
179174
for fabric in self.data:
180175
if fabric == item["destFabric"]:
181176
if (self.data[fabric]['fabricType'] != "MSD"):
177+
invalid_fab = item["destFabric"]
182178
msg = f"{self.class_name}: {method_name}: "
183-
msg += f"Playbook configuration for FABRIC_NAME {item["destFabric"]} "
179+
msg += f"Playbook configuration for FABRIC_NAME {invalid_fab} "
184180
msg += "is not of type MSD"
185181
raise ValueError(msg)
186182

@@ -191,25 +187,26 @@ def verify_child_fab_exists_in_controller(self):
191187
if fabric == item["sourceFabric"]:
192188
break
193189
else:
190+
invalid_fab = item["sourceFabric"]
194191
msg = f"{self.class_name}: {method_name}: "
195-
msg += f"Playbook configuration for CHILD_FABRIC_NAME {item["sourceFabric"]} "
192+
msg += f"Playbook configuration for CHILD_FABRIC_NAME {invalid_fab} "
196193
msg += "is not found in Controller. Please create and try again"
197194
raise ValueError(msg)
198195

199196
def verify_child_fabric_is_member_of_another_fabric(self):
200-
method_name = inspect.stack()[0][3]
201197
for item in self.payloads:
202198
for fabric in self.data:
203199
if fabric == item["sourceFabric"]:
204200
if (self.data[fabric]['fabricParent'] != item["destFabric"]) \
205201
and (self.data[fabric]['fabricParent'] != "None"):
206-
msg = f"Invalid Operation: Child fabric {item["sourceFabric"]} "
207-
msg += f"is member of another Fabric {self.data[fabric]['fabricParent']}."
202+
inv_child_fab = item["sourceFabric"]
203+
another_fab = self.data[fabric]['fabricParent']
204+
msg = f"Invalid Operation: Child fabric {inv_child_fab} "
205+
msg += f"is member of another Fabric {another_fab}."
208206
self.log.debug(msg)
209207
raise ValueError(msg)
210208

211209
def verify_child_fabric_is_already_member(self) -> bool:
212-
method_name = inspect.stack()[0][3]
213210
for item in self.payloads:
214211
for fabric in self.data:
215212
if fabric == item["sourceFabric"]:

0 commit comments

Comments
 (0)