@@ -2946,8 +2946,14 @@ def dcnm_intf_get_pc_payload(self, delem, intf, profile):
2946
2946
"ENABLE_MONITOR" ] = delem [profile ]["enable_monitor" ]
2947
2947
intf ["interfaces" ][0 ]["nvPairs" ][
2948
2948
"PORT_DUPLEX_MODE" ] = delem [profile ]["duplex" ]
2949
- intf ["interfaces" ][0 ]["nvPairs" ]["LACP_PORT_PRIO" ] = delem [profile ]["lacp_port_priority" ]
2950
- intf ["interfaces" ][0 ]["nvPairs" ]["LACP_RATE" ] = delem [profile ]["lacp_rate" ]
2949
+ if delem [profile ].get ("lacp_port_priority" ):
2950
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_PORT_PRIO" ] = delem [profile ]["lacp_port_priority" ]
2951
+ else :
2952
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_PORT_PRIO" ] = 32768
2953
+ if delem [profile ].get ("lacp_rate" ):
2954
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_RATE" ] = delem [profile ]["lacp_rate" ]
2955
+ else :
2956
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_RATE" ] = "normal"
2951
2957
if delem [profile ]["mode" ] == "access" :
2952
2958
if delem [profile ]["members" ] is None :
2953
2959
intf ["interfaces" ][0 ]["nvPairs" ]["MEMBER_INTERFACES" ] = ""
@@ -2981,8 +2987,14 @@ def dcnm_intf_get_pc_payload(self, delem, intf, profile):
2981
2987
"ENABLE_MONITOR" ] = delem [profile ]["enable_monitor" ]
2982
2988
intf ["interfaces" ][0 ]["nvPairs" ][
2983
2989
"PORT_DUPLEX_MODE" ] = delem [profile ]["duplex" ]
2984
- intf ["interfaces" ][0 ]["nvPairs" ]["LACP_PORT_PRIO" ] = delem [profile ]["lacp_port_priority" ]
2985
- intf ["interfaces" ][0 ]["nvPairs" ]["LACP_RATE" ] = delem [profile ]["lacp_rate" ]
2990
+ if delem [profile ].get ("lacp_port_priority" ):
2991
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_PORT_PRIO" ] = delem [profile ]["lacp_port_priority" ]
2992
+ else :
2993
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_PORT_PRIO" ] = 32768
2994
+ if delem [profile ].get ("lacp_rate" ):
2995
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_RATE" ] = delem [profile ]["lacp_rate" ]
2996
+ else :
2997
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_RATE" ] = "normal"
2986
2998
if delem [profile ]["mode" ] == "l3" :
2987
2999
if delem [profile ]["members" ] is None :
2988
3000
intf ["interfaces" ][0 ]["nvPairs" ]["MEMBER_INTERFACES" ] = ""
@@ -3208,8 +3220,14 @@ def dcnm_intf_get_vpc_payload(self, delem, intf, profile):
3208
3220
intf ["interfaces" ][0 ]["nvPairs" ]["ENABLE_LACP_VPC_CONV" ] = delem [profile ]["enable_lacp_vpc_convergence" ]
3209
3221
else :
3210
3222
intf ["interfaces" ][0 ]["nvPairs" ]["ENABLE_LACP_VPC_CONV" ] = False
3211
- intf ["interfaces" ][0 ]["nvPairs" ]["LACP_PORT_PRIO" ] = delem [profile ]["lacp_port_priority" ]
3212
- intf ["interfaces" ][0 ]["nvPairs" ]["LACP_RATE" ] = delem [profile ]["lacp_rate" ]
3223
+ if delem [profile ].get ("lacp_port_priority" ):
3224
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_PORT_PRIO" ] = delem [profile ]["lacp_port_priority" ]
3225
+ else :
3226
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_PORT_PRIO" ] = 32768
3227
+ if delem [profile ].get ("lacp_rate" ):
3228
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_RATE" ] = delem [profile ]["lacp_rate" ]
3229
+ else :
3230
+ intf ["interfaces" ][0 ]["nvPairs" ]["LACP_RATE" ] = "normal"
3213
3231
intf ["interfaces" ][0 ]["nvPairs" ]["INTF_NAME" ] = ifname
3214
3232
intf ["interfaces" ][0 ]["nvPairs" ]["SPEED" ] = self .dcnm_intf_xlate_speed (
3215
3233
str (delem [profile ].get ("speed" , "" ))
0 commit comments