181181 type: str
182182 choices: ['auto', 'full', 'half']
183183 default: auto
184+ enable_pfc:
185+ description:
186+ - State of Priority Flow Control (PFC) on the interface
187+ type: bool
188+ default: false
189+ enable_cdp:
190+ description:
191+ - State of CDP protocol on the interface
192+ type: bool
193+ default: true
194+ enable_monitor:
195+ description:
196+ - State of Switchport Monitor for SPAN/ERSPAN
197+ type: bool
198+ default: false
184199 profile_vpc:
185200 description:
186201 - Though the key shown here is 'profile_vpc' the actual key to be used in playbook
564579 - Administrative state of the interface
565580 type: bool
566581 default: true
582+ enable_pfc:
583+ description:
584+ - State of Priority Flow Control (PFC) on the interface
585+ type: bool
586+ default: false
587+ enable_cdp:
588+ description:
589+ - State of CDP protocol on the interface
590+ type: bool
591+ default: true
592+ enable_monitor:
593+ description:
594+ - State of Switchport Monitor for SPAN/ERSPAN
595+ type: bool
596+ default: false
567597 profile_svi:
568598 description:
569599 - Though the key shown here is 'profile_svi' the actual key to be used in playbook
@@ -1920,6 +1950,9 @@ def __init__(self, module):
19201950 "DCI_ROUTING_PROTO" : "dci_routing_proto" ,
19211951 "DCI_ROUTING_TAG" : "dci_routing_tag" ,
19221952 "ENABLE_ORPHAN_PORT" : "orphan_port" ,
1953+ "ENABLE_PFC" : "enable_pfc" ,
1954+ "ENABLE_MONITOR" : "enable_monitor" ,
1955+ "CDP_ENABLE" : "enable_cdp" ,
19231956 }
19241957
19251958 # New Interfaces
@@ -2268,6 +2301,9 @@ def dcnm_intf_validate_port_channel_input(self, config):
22682301 description = dict (type = "str" , default = "" ),
22692302 admin_state = dict (type = "bool" , default = True ),
22702303 orphan_port = dict (type = "bool" , default = False ),
2304+ enable_cdp = dict (type = "bool" , default = True ),
2305+ enable_monitor = dict (type = "bool" , default = False ),
2306+ enable_pfc = dict (type = "bool" , default = False ),
22712307 duplex = dict (
22722308 type = "str" , default = "auto" , choices = ["auto" , "full" , "half" ]),
22732309 )
@@ -2285,6 +2321,9 @@ def dcnm_intf_validate_port_channel_input(self, config):
22852321 description = dict (type = "str" , default = "" ),
22862322 admin_state = dict (type = "bool" , default = True ),
22872323 orphan_port = dict (type = "bool" , default = False ),
2324+ enable_cdp = dict (type = "bool" , default = True ),
2325+ enable_monitor = dict (type = "bool" , default = False ),
2326+ enable_pfc = dict (type = "bool" , default = False ),
22882327 duplex = dict (
22892328 type = "str" , default = "auto" , choices = ["auto" , "full" , "half" ]),
22902329 )
@@ -2487,6 +2526,9 @@ def dcnm_intf_validate_ethernet_interface_input(self, cfg):
24872526 description = dict (type = "str" , default = "" ),
24882527 admin_state = dict (type = "bool" , default = True ),
24892528 orphan_port = dict (type = "bool" , default = False ),
2529+ enable_cdp = dict (type = "bool" , default = True ),
2530+ enable_monitor = dict (type = "bool" , default = False ),
2531+ enable_pfc = dict (type = "bool" , default = False ),
24902532 duplex = dict (
24912533 type = "str" , default = "auto" , choices = ["auto" , "full" , "half" ]),
24922534 )
@@ -2504,6 +2546,9 @@ def dcnm_intf_validate_ethernet_interface_input(self, cfg):
25042546 description = dict (type = "str" , default = "" ),
25052547 admin_state = dict (type = "bool" , default = True ),
25062548 orphan_port = dict (type = "bool" , default = False ),
2549+ enable_cdp = dict (type = "bool" , default = True ),
2550+ enable_monitor = dict (type = "bool" , default = False ),
2551+ enable_pfc = dict (type = "bool" , default = False ),
25072552 duplex = dict (
25082553 type = "str" , default = "auto" , choices = ["auto" , "full" , "half" ]),
25092554 )
@@ -2843,6 +2888,12 @@ def dcnm_intf_get_pc_payload(self, delem, intf, profile):
28432888 intf ["interfaces" ][0 ]["nvPairs" ]["PO_ID" ] = ifname
28442889 intf ["interfaces" ][0 ]["nvPairs" ][
28452890 "ENABLE_ORPHAN_PORT" ] = delem [profile ]["orphan_port" ]
2891+ intf ["interfaces" ][0 ]["nvPairs" ][
2892+ "CDP_ENABLE" ] = delem [profile ]["enable_cdp" ]
2893+ intf ["interfaces" ][0 ]["nvPairs" ][
2894+ "ENABLE_PFC" ] = delem [profile ]["enable_pfc" ]
2895+ intf ["interfaces" ][0 ]["nvPairs" ][
2896+ "ENABLE_MONITOR" ] = delem [profile ]["enable_monitor" ]
28462897 intf ["interfaces" ][0 ]["nvPairs" ][
28472898 "PORT_DUPLEX_MODE" ] = delem [profile ]["duplex" ]
28482899 if delem [profile ]["mode" ] == "access" :
@@ -2870,6 +2921,12 @@ def dcnm_intf_get_pc_payload(self, delem, intf, profile):
28702921 intf ["interfaces" ][0 ]["nvPairs" ]["PO_ID" ] = ifname
28712922 intf ["interfaces" ][0 ]["nvPairs" ][
28722923 "ENABLE_ORPHAN_PORT" ] = delem [profile ]["orphan_port" ]
2924+ intf ["interfaces" ][0 ]["nvPairs" ][
2925+ "CDP_ENABLE" ] = delem [profile ]["enable_cdp" ]
2926+ intf ["interfaces" ][0 ]["nvPairs" ][
2927+ "ENABLE_PFC" ] = delem [profile ]["enable_pfc" ]
2928+ intf ["interfaces" ][0 ]["nvPairs" ][
2929+ "ENABLE_MONITOR" ] = delem [profile ]["enable_monitor" ]
28732930 intf ["interfaces" ][0 ]["nvPairs" ][
28742931 "PORT_DUPLEX_MODE" ] = delem [profile ]["duplex" ]
28752932 if delem [profile ]["mode" ] == "l3" :
@@ -3241,6 +3298,12 @@ def dcnm_intf_get_eth_payload(self, delem, intf, profile):
32413298 intf ["interfaces" ][0 ]["nvPairs" ]["INTF_NAME" ] = ifname
32423299 intf ["interfaces" ][0 ]["nvPairs" ][
32433300 "ENABLE_ORPHAN_PORT" ] = delem [profile ]["orphan_port" ]
3301+ intf ["interfaces" ][0 ]["nvPairs" ][
3302+ "CDP_ENABLE" ] = delem [profile ]["enable_cdp" ]
3303+ intf ["interfaces" ][0 ]["nvPairs" ][
3304+ "ENABLE_PFC" ] = delem [profile ]["enable_pfc" ]
3305+ intf ["interfaces" ][0 ]["nvPairs" ][
3306+ "ENABLE_MONITOR" ] = delem [profile ]["enable_monitor" ]
32443307 intf ["interfaces" ][0 ]["nvPairs" ][
32453308 "PORT_DUPLEX_MODE" ] = delem [profile ]["duplex" ]
32463309 if delem [profile ]["mode" ] == "access" :
@@ -3259,6 +3322,12 @@ def dcnm_intf_get_eth_payload(self, delem, intf, profile):
32593322 intf ["interfaces" ][0 ]["nvPairs" ]["INTF_NAME" ] = ifname
32603323 intf ["interfaces" ][0 ]["nvPairs" ][
32613324 "ENABLE_ORPHAN_PORT" ] = delem [profile ]["orphan_port" ]
3325+ intf ["interfaces" ][0 ]["nvPairs" ][
3326+ "CDP_ENABLE" ] = delem [profile ]["enable_cdp" ]
3327+ intf ["interfaces" ][0 ]["nvPairs" ][
3328+ "ENABLE_PFC" ] = delem [profile ]["enable_pfc" ]
3329+ intf ["interfaces" ][0 ]["nvPairs" ][
3330+ "ENABLE_MONITOR" ] = delem [profile ]["enable_monitor" ]
32623331 intf ["interfaces" ][0 ]["nvPairs" ][
32633332 "PORT_DUPLEX_MODE" ] = delem [profile ]["duplex" ]
32643333 if delem [profile ]["mode" ] == "routed" :
@@ -3884,7 +3953,7 @@ def dcnm_intf_compare_elements(
38843953 else :
38853954 t_e2 = e2
38863955
3887- if k == 'ENABLE_ORPHAN_PORT' :
3956+ if k in [ 'ENABLE_ORPHAN_PORT' , 'ENABLE_PFC' , 'ENABLE_MONITOR' , 'CDP_ENABLE' ] :
38883957 # This is a special case where the value is a boolean and we need to compare it as such
38893958 t_e1 = str (t_e1 ).lower ()
38903959 t_e2 = str (t_e2 ).lower ()
0 commit comments