@@ -3864,15 +3864,15 @@ def dcnm_intf_get_have_all_with_sno(self, sno):
3864
3864
self .have_all .extend (resp ["DATA" ])
3865
3865
3866
3866
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
3868
3868
# populate the breakout interfaces in self.have_breakout.
3869
3869
path = "/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/policies/switches/{}" .format (sno )
3870
3870
resp = dcnm_send (self .module , "GET" , path )
3871
-
3871
+
3872
3872
breakout = []
3873
3873
if resp and "DATA" in resp and resp ["DATA" ]:
3874
3874
for elem in resp ["DATA" ]:
3875
- if elem [ 'templateName' ] == "breakout_interface" :
3875
+ if elem . get ( 'templateName' , None ) == "breakout_interface" :
3876
3876
breakout .append (elem ['entityName' ])
3877
3877
self .have_breakout .append ({sno : breakout })
3878
3878
@@ -4201,7 +4201,7 @@ def dcnm_intf_compare_want_and_have(self, state):
4201
4201
if want_serialnumber == list (elem .keys ())[0 ]:
4202
4202
for interface in elem [want_serialnumber ]:
4203
4203
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,
4205
4205
# skip adding it to diff_create_breakout
4206
4206
match_create = True
4207
4207
break
0 commit comments