Skip to content

Commit c6f1e69

Browse files
authored
Update dcnm_interface.py
1 parent f8033ff commit c6f1e69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/modules/dcnm_interface.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,15 +3864,15 @@ def dcnm_intf_get_have_all_with_sno(self, sno):
38643864
self.have_all.extend(resp["DATA"])
38653865

38663866
def dcnm_intf_get_have_all_breakout_interfaces(self, sno):
3867-
# This function will get policies for a given serial number and
3867+
# This function will get policies for a given serial number and
38683868
# populate the breakout interfaces in self.have_breakout.
38693869
path = "/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/policies/switches/{}".format(sno)
38703870
resp = dcnm_send(self.module, "GET", path)
3871-
3871+
38723872
breakout = []
38733873
if resp and "DATA" in resp and resp["DATA"]:
38743874
for elem in resp["DATA"]:
3875-
if elem['templateName'] == "breakout_interface":
3875+
if elem.get('templateName', None) == "breakout_interface":
38763876
breakout.append(elem['entityName'])
38773877
self.have_breakout.append({sno: breakout})
38783878

@@ -4201,7 +4201,7 @@ def dcnm_intf_compare_want_and_have(self, state):
42014201
if want_serialnumber == list(elem.keys())[0]:
42024202
for interface in elem[want_serialnumber]:
42034203
if interface.lower() == want_intf.lower():
4204-
# If the breakout interface is already present in have,
4204+
# If the breakout interface is already present in have,
42054205
# skip adding it to diff_create_breakout
42064206
match_create = True
42074207
break

0 commit comments

Comments
 (0)