From 7b0ea693ef092dbd2271e8789a44ef4c0dd1e521 Mon Sep 17 00:00:00 2001 From: mkilar Date: Wed, 4 Jun 2025 11:48:32 +0200 Subject: [PATCH 1/7] new parameters for access interface v1 --- plugins/modules/dcnm_interface.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/modules/dcnm_interface.py b/plugins/modules/dcnm_interface.py index 93270e778..17eefbfaf 100644 --- a/plugins/modules/dcnm_interface.py +++ b/plugins/modules/dcnm_interface.py @@ -1920,6 +1920,13 @@ def __init__(self, module): "DCI_ROUTING_PROTO": "dci_routing_proto", "DCI_ROUTING_TAG": "dci_routing_tag", "ENABLE_ORPHAN_PORT": "orphan_port", + "NETFLOW_SAMPLER": "netflow_sampler", + "ENABLE_PFC": "enable_pfc", + "ENABLE_QOS": "enable_qos", + "QOS_POLICY": "qos_policy", + "QUEUING_POLICY": "queuing_policy", + "ENABLE_MONITOR": "enable_monitor", + "CDP_ENABLE": "enable_cdp", } # New Interfaces From 66508b2a3e320b99831242011aaf81b593438047 Mon Sep 17 00:00:00 2001 From: mkilar Date: Wed, 11 Jun 2025 00:36:54 +0200 Subject: [PATCH 2/7] CDP/PFC/Monitor control for access/trunk phy/po interfaces --- plugins/modules/dcnm_interface.py | 70 +++++++++++++++++-- .../dcnm/fixtures/dcnm_intf_eth_configs.json | 12 ++++ .../dcnm/fixtures/dcnm_intf_eth_payloads.json | 8 ++- .../dcnm_intf_multi_intf_configs.json | 12 ++++ .../dcnm_intf_multi_intf_payloads.json | 9 +++ .../dcnm/fixtures/dcnm_intf_pc_configs.json | 18 +++++ .../dcnm/fixtures/dcnm_intf_pc_payloads.json | 8 ++- 7 files changed, 131 insertions(+), 6 deletions(-) diff --git a/plugins/modules/dcnm_interface.py b/plugins/modules/dcnm_interface.py index 17eefbfaf..58a0131c0 100644 --- a/plugins/modules/dcnm_interface.py +++ b/plugins/modules/dcnm_interface.py @@ -181,6 +181,21 @@ type: str choices: ['auto', 'full', 'half'] default: auto + enable_pfc: + description + - State of Priority Flow Control (PFC) on the interface + type: bool + default: false + enable_cdp: + description + - State of CDP protocol on the interface + type: bool + default: true + enable_monitor: + description + - State of Switchport Monitor for SPAN/ERSPAN + type: bool + default: false profile_vpc: description: - Though the key shown here is 'profile_vpc' the actual key to be used in playbook @@ -564,6 +579,21 @@ - Administrative state of the interface type: bool default: true + enable_pfc: + description + - State of Priority Flow Control (PFC) on the interface + type: bool + default: false + enable_cdp: + description + - State of CDP protocol on the interface + type: bool + default: true + enable_monitor: + description + - State of Switchport Monitor for SPAN/ERSPAN + type: bool + default: false profile_svi: description: - Though the key shown here is 'profile_svi' the actual key to be used in playbook @@ -1920,11 +1950,7 @@ def __init__(self, module): "DCI_ROUTING_PROTO": "dci_routing_proto", "DCI_ROUTING_TAG": "dci_routing_tag", "ENABLE_ORPHAN_PORT": "orphan_port", - "NETFLOW_SAMPLER": "netflow_sampler", "ENABLE_PFC": "enable_pfc", - "ENABLE_QOS": "enable_qos", - "QOS_POLICY": "qos_policy", - "QUEUING_POLICY": "queuing_policy", "ENABLE_MONITOR": "enable_monitor", "CDP_ENABLE": "enable_cdp", } @@ -2275,6 +2301,9 @@ def dcnm_intf_validate_port_channel_input(self, config): description=dict(type="str", default=""), admin_state=dict(type="bool", default=True), orphan_port=dict(type="bool", default=False), + enable_cdp=dict(type="bool", default=True), + enable_monitor=dict(type="bool", default=False), + enable_pfc=dict(type="bool", default=False), duplex=dict( type="str", default="auto", choices=["auto", "full", "half"]), ) @@ -2292,6 +2321,9 @@ def dcnm_intf_validate_port_channel_input(self, config): description=dict(type="str", default=""), admin_state=dict(type="bool", default=True), orphan_port=dict(type="bool", default=False), + enable_cdp=dict(type="bool", default=True), + enable_monitor=dict(type="bool", default=False), + enable_pfc=dict(type="bool", default=False), duplex=dict( type="str", default="auto", choices=["auto", "full", "half"]), ) @@ -2494,6 +2526,9 @@ def dcnm_intf_validate_ethernet_interface_input(self, cfg): description=dict(type="str", default=""), admin_state=dict(type="bool", default=True), orphan_port=dict(type="bool", default=False), + enable_cdp=dict(type="bool", default=True), + enable_monitor=dict(type="bool", default=False), + enable_pfc=dict(type="bool", default=False), duplex=dict( type="str", default="auto", choices=["auto", "full", "half"]), ) @@ -2511,6 +2546,9 @@ def dcnm_intf_validate_ethernet_interface_input(self, cfg): description=dict(type="str", default=""), admin_state=dict(type="bool", default=True), orphan_port=dict(type="bool", default=False), + enable_cdp=dict(type="bool", default=True), + enable_monitor=dict(type="bool", default=False), + enable_pfc=dict(type="bool", default=False), duplex=dict( type="str", default="auto", choices=["auto", "full", "half"]), ) @@ -2850,6 +2888,12 @@ def dcnm_intf_get_pc_payload(self, delem, intf, profile): intf["interfaces"][0]["nvPairs"]["PO_ID"] = ifname intf["interfaces"][0]["nvPairs"][ "ENABLE_ORPHAN_PORT"] = delem[profile]["orphan_port"] + intf["interfaces"][0]["nvPairs"][ + "CDP_ENABLE"] = delem[profile]["enable_cdp"] + intf["interfaces"][0]["nvPairs"][ + "ENABLE_PFC"] = delem[profile]["enable_pfc"] + intf["interfaces"][0]["nvPairs"][ + "ENABLE_MONITOR"] = delem[profile]["enable_monitor"] intf["interfaces"][0]["nvPairs"][ "PORT_DUPLEX_MODE"] = delem[profile]["duplex"] if delem[profile]["mode"] == "access": @@ -2877,6 +2921,12 @@ def dcnm_intf_get_pc_payload(self, delem, intf, profile): intf["interfaces"][0]["nvPairs"]["PO_ID"] = ifname intf["interfaces"][0]["nvPairs"][ "ENABLE_ORPHAN_PORT"] = delem[profile]["orphan_port"] + intf["interfaces"][0]["nvPairs"][ + "CDP_ENABLE"] = delem[profile]["enable_cdp"] + intf["interfaces"][0]["nvPairs"][ + "ENABLE_PFC"] = delem[profile]["enable_pfc"] + intf["interfaces"][0]["nvPairs"][ + "ENABLE_MONITOR"] = delem[profile]["enable_monitor"] intf["interfaces"][0]["nvPairs"][ "PORT_DUPLEX_MODE"] = delem[profile]["duplex"] if delem[profile]["mode"] == "l3": @@ -3248,6 +3298,12 @@ def dcnm_intf_get_eth_payload(self, delem, intf, profile): intf["interfaces"][0]["nvPairs"]["INTF_NAME"] = ifname intf["interfaces"][0]["nvPairs"][ "ENABLE_ORPHAN_PORT"] = delem[profile]["orphan_port"] + intf["interfaces"][0]["nvPairs"][ + "CDP_ENABLE"] = delem[profile]["enable_cdp"] + intf["interfaces"][0]["nvPairs"][ + "ENABLE_PFC"] = delem[profile]["enable_pfc"] + intf["interfaces"][0]["nvPairs"][ + "ENABLE_MONITOR"] = delem[profile]["enable_monitor"] intf["interfaces"][0]["nvPairs"][ "PORT_DUPLEX_MODE"] = delem[profile]["duplex"] if delem[profile]["mode"] == "access": @@ -3266,6 +3322,12 @@ def dcnm_intf_get_eth_payload(self, delem, intf, profile): intf["interfaces"][0]["nvPairs"]["INTF_NAME"] = ifname intf["interfaces"][0]["nvPairs"][ "ENABLE_ORPHAN_PORT"] = delem[profile]["orphan_port"] + intf["interfaces"][0]["nvPairs"][ + "CDP_ENABLE"] = delem[profile]["enable_cdp"] + intf["interfaces"][0]["nvPairs"][ + "ENABLE_PFC"] = delem[profile]["enable_pfc"] + intf["interfaces"][0]["nvPairs"][ + "ENABLE_MONITOR"] = delem[profile]["enable_monitor"] intf["interfaces"][0]["nvPairs"][ "PORT_DUPLEX_MODE"] = delem[profile]["duplex"] if delem[profile]["mode"] == "routed": diff --git a/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_configs.json b/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_configs.json index 896f3c042..98aa80c27 100644 --- a/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_configs.json +++ b/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_configs.json @@ -94,6 +94,9 @@ "allowed_vlans": "none", "native_vlan": 10, "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "duplex": "auto", "cmds": [ "no shutdown" @@ -219,6 +222,9 @@ "allowed_vlans": "all", "native_vlan": 10, "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "duplex": "auto", "cmds": [ "no shutdown", @@ -469,6 +475,9 @@ "allowed_vlans": "all", "native_vlan": 10, "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "duplex": "auto", "cmds": [ "no shutdown", @@ -500,6 +509,9 @@ "allowed_vlans": "all", "native_vlan": 10, "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "duplex": "auto", "cmds": [ "no shutdown", diff --git a/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_payloads.json b/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_payloads.json index e1fcba524..aaae412be 100644 --- a/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_payloads.json +++ b/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_payloads.json @@ -21,7 +21,10 @@ "PORT_DUPLEX_MODE": "auto", "DESC": "eth interface acting as trunk", "NATIVE_VLAN": "10", - "ENABLE_ORPHAN_PORT": false + "ENABLE_ORPHAN_PORT": false, + "ENABLE_PFC": false, + "ENABLE_CDP": true, + "ENABLE_MONITOR": false }, "ifName": "Ethernet1/30", "serialNumber": "SAL1819SAN8", @@ -53,6 +56,9 @@ "BPDUGUARD_ENABLED": "True", "SPEED": "auto", "ENABLE_ORPHAN_PORT": false, + "ENABLE_PFC": false, + "ENABLE_CDP": true, + "ENABLE_MONITOR": false, "PORT_DUPLEX_MODE": "auto", "DESC": "eth interface acting as access" }, diff --git a/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_configs.json b/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_configs.json index 4b28d1528..f305552f7 100644 --- a/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_configs.json +++ b/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_configs.json @@ -97,6 +97,9 @@ "allowed_vlans": "none", "native_vlan": "10", "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "speed": "Auto", "duplex": "auto", "cmds": [ @@ -167,6 +170,9 @@ "allowed_vlans": "none", "native_vlan": "10", "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "cmds": [ "no shutdown" ], @@ -252,6 +258,9 @@ "allowed_vlans": "none", "native_vlan": "10", "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "speed": "Auto", "duplex": "auto", "cmds": [ @@ -322,6 +331,9 @@ "allowed_vlans": "none", "native_vlan": "10", "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "cmds": [ "spanning-tree bpduguard enable" ], diff --git a/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_payloads.json b/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_payloads.json index c2e1d84cb..3e97b2d0c 100644 --- a/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_payloads.json +++ b/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_payloads.json @@ -29,6 +29,9 @@ "ALLOWED_VLANS": "none", "NATIVE_VLAN": "10", "ENABLE_ORPHAN_PORT": false, + "ENABLE_PFC": false, + "ENABLE_CDP": true, + "ENABLE_MONITOR": false, "DESC": "port channel acting as trunk" } }], @@ -69,6 +72,9 @@ "DESC": "port channel acting as trunk", "CONF": "no shutdown", "ENABLE_ORPHAN_PORT": false, + "ENABLE_PFC": false, + "ENABLE_CDP": true, + "ENABLE_MONITOR": false, "ADMIN_STATE": "true" } } @@ -147,6 +153,9 @@ "DESC": "eth interface acting as trunk", "CONF": "no shutdown", "ENABLE_ORPHAN_PORT": false, + "ENABLE_PFC": false, + "ENABLE_CDP": true, + "ENABLE_MONITOR": false, "ADMIN_STATE": "true" } } diff --git a/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_configs.json b/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_configs.json index 360492993..618fa8a31 100644 --- a/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_configs.json +++ b/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_configs.json @@ -154,6 +154,9 @@ "admin_state": "True", "access_vlan": 200, "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "cmds": [ "no shutdown" ], @@ -217,6 +220,9 @@ "allowed_vlans": "none", "native_vlan": "10", "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "speed": "Auto", "duplex": "auto", "cmds": [ @@ -249,6 +255,9 @@ "admin_state": "False", "ifname": "Port-channel301", "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "cmds": [ "no shutdown" ], @@ -474,6 +483,9 @@ "allowed_vlans": "all", "native_vlan": "10", "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "speed": "Auto", "duplex": "auto", "cmds": [ @@ -507,6 +519,9 @@ "admin_state": "True", "ifname": "Port-channel301", "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "cmds": [ "no shutdown", "no shutdown" @@ -584,6 +599,9 @@ "allowed_vlans": "none", "native_vlan": "10", "orphan_port": false, + "enable_pfc": false, + "enable_cdp": true, + "enable_monitor": false, "speed": "Auto", "duplex": "auto", "cmds": [ diff --git a/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_payloads.json b/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_payloads.json index 661269a2c..b6da5946d 100644 --- a/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_payloads.json +++ b/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_payloads.json @@ -28,6 +28,9 @@ "ALLOWED_VLANS": "none", "NATIVE_VLAN": "10", "ENABLE_ORPHAN_PORT": false, + "ENABLE_PFC": false, + "ENABLE_CDP": true, + "ENABLE_MONITOR": false, "DESC": "port channel acting as trunk" } }], @@ -65,7 +68,10 @@ "ADMIN_STATE": "False", "POLICY_ID": "POLICY-1849730", "DESC": "port channel acting as access", - "ENABLE_ORPHAN_PORT": false + "ENABLE_ORPHAN_PORT": false, + "ENABLE_PFC": false, + "ENABLE_CDP": true, + "ENABLE_MONITOR": false } }], "skipResourceCheck": "True" From d53e9e9b9767e3eec54c65953676a2bc9c305790 Mon Sep 17 00:00:00 2001 From: mkilar Date: Thu, 19 Jun 2025 00:01:14 +0200 Subject: [PATCH 3/7] correcting CDP related key in test payloads --- .../unit/modules/dcnm/fixtures/dcnm_intf_eth_payloads.json | 4 ++-- .../dcnm/fixtures/dcnm_intf_multi_intf_payloads.json | 6 +++--- tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_payloads.json | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_payloads.json b/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_payloads.json index aaae412be..a1701db08 100644 --- a/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_payloads.json +++ b/tests/unit/modules/dcnm/fixtures/dcnm_intf_eth_payloads.json @@ -23,7 +23,7 @@ "NATIVE_VLAN": "10", "ENABLE_ORPHAN_PORT": false, "ENABLE_PFC": false, - "ENABLE_CDP": true, + "CDP_ENABLE": true, "ENABLE_MONITOR": false }, "ifName": "Ethernet1/30", @@ -57,7 +57,7 @@ "SPEED": "auto", "ENABLE_ORPHAN_PORT": false, "ENABLE_PFC": false, - "ENABLE_CDP": true, + "CDP_ENABLE": true, "ENABLE_MONITOR": false, "PORT_DUPLEX_MODE": "auto", "DESC": "eth interface acting as access" diff --git a/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_payloads.json b/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_payloads.json index 3e97b2d0c..3413254c2 100644 --- a/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_payloads.json +++ b/tests/unit/modules/dcnm/fixtures/dcnm_intf_multi_intf_payloads.json @@ -30,7 +30,7 @@ "NATIVE_VLAN": "10", "ENABLE_ORPHAN_PORT": false, "ENABLE_PFC": false, - "ENABLE_CDP": true, + "CDP_ENABLE": true, "ENABLE_MONITOR": false, "DESC": "port channel acting as trunk" } @@ -73,7 +73,7 @@ "CONF": "no shutdown", "ENABLE_ORPHAN_PORT": false, "ENABLE_PFC": false, - "ENABLE_CDP": true, + "CDP_ENABLE": true, "ENABLE_MONITOR": false, "ADMIN_STATE": "true" } @@ -154,7 +154,7 @@ "CONF": "no shutdown", "ENABLE_ORPHAN_PORT": false, "ENABLE_PFC": false, - "ENABLE_CDP": true, + "CDP_ENABLE": true, "ENABLE_MONITOR": false, "ADMIN_STATE": "true" } diff --git a/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_payloads.json b/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_payloads.json index b6da5946d..35f6c7310 100644 --- a/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_payloads.json +++ b/tests/unit/modules/dcnm/fixtures/dcnm_intf_pc_payloads.json @@ -29,7 +29,7 @@ "NATIVE_VLAN": "10", "ENABLE_ORPHAN_PORT": false, "ENABLE_PFC": false, - "ENABLE_CDP": true, + "CDP_ENABLE": true, "ENABLE_MONITOR": false, "DESC": "port channel acting as trunk" } @@ -70,7 +70,7 @@ "DESC": "port channel acting as access", "ENABLE_ORPHAN_PORT": false, "ENABLE_PFC": false, - "ENABLE_CDP": true, + "CDP_ENABLE": true, "ENABLE_MONITOR": false } }], From 4402a91978f30a8d557156d9b8dbdb411a1002da Mon Sep 17 00:00:00 2001 From: mkilar Date: Thu, 26 Jun 2025 14:26:18 +0200 Subject: [PATCH 4/7] fixing documentation errors --- plugins/modules/dcnm_interface.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/modules/dcnm_interface.py b/plugins/modules/dcnm_interface.py index 58a0131c0..f045e847d 100644 --- a/plugins/modules/dcnm_interface.py +++ b/plugins/modules/dcnm_interface.py @@ -182,17 +182,17 @@ choices: ['auto', 'full', 'half'] default: auto enable_pfc: - description + description: - State of Priority Flow Control (PFC) on the interface type: bool default: false enable_cdp: - description + description: - State of CDP protocol on the interface type: bool default: true enable_monitor: - description + description: - State of Switchport Monitor for SPAN/ERSPAN type: bool default: false @@ -580,17 +580,17 @@ type: bool default: true enable_pfc: - description + description: - State of Priority Flow Control (PFC) on the interface type: bool default: false enable_cdp: - description + description: - State of CDP protocol on the interface type: bool default: true enable_monitor: - description + description: - State of Switchport Monitor for SPAN/ERSPAN type: bool default: false From f9cd2dcb0b2c41a4c2db80ab7c92f1dbf8f664fb Mon Sep 17 00:00:00 2001 From: mkilar Date: Mon, 30 Jun 2025 23:21:52 +0200 Subject: [PATCH 5/7] fix boolean comparison for ENABLE_PFC, ENABLE_MONITOR, CDP_ENABLE --- plugins/modules/dcnm_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/dcnm_interface.py b/plugins/modules/dcnm_interface.py index f045e847d..a1b167c96 100644 --- a/plugins/modules/dcnm_interface.py +++ b/plugins/modules/dcnm_interface.py @@ -3953,7 +3953,7 @@ def dcnm_intf_compare_elements( else: t_e2 = e2 - if k == 'ENABLE_ORPHAN_PORT': + if k in ['ENABLE_ORPHAN_PORT','ENABLE_PFC','ENABLE_MONITOR','CDP_ENABLE']: # This is a special case where the value is a boolean and we need to compare it as such t_e1 = str(t_e1).lower() t_e2 = str(t_e2).lower() From 46dfc53a896a502f628301ba0c317ab3b031e7c7 Mon Sep 17 00:00:00 2001 From: mkilar Date: Mon, 30 Jun 2025 23:34:22 +0200 Subject: [PATCH 6/7] updated documentation with newly supported interface settings --- README.md | 4 +- docs/cisco.dcnm.dcnm_interface_module.rst | 126 ++++++++++++++++++++++ 2 files changed, 127 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ba008ae84..55356b95d 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,8 @@ This collection is intended for use with the following release versions: ## Ansible version compatibility -This collection has been tested against following Ansible versions: **>=2.15.0**. +This collection has been tested against the following Ansible versions: **>=2.15.0**. -For collections that support Ansible 2.9, please ensure you update your `network_os` to use the -fully qualified collection name (for example, `cisco.ios.ios`). Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible. diff --git a/docs/cisco.dcnm.dcnm_interface_module.rst b/docs/cisco.dcnm.dcnm_interface_module.rst index e0764f565..56b7c5f12 100644 --- a/docs/cisco.dcnm.dcnm_interface_module.rst +++ b/docs/cisco.dcnm.dcnm_interface_module.rst @@ -562,6 +562,69 @@ Parameters
Duplex of the interface. Speed must be set to use duplex.
+ + + + +
+ enable_cdp + +
+ boolean +
+ + +
    Choices: +
  • no
  • +
  • yes ←
  • +
+ + +
State of CDP protocol on the interface
+ + + + + + +
+ enable_monitor + +
+ boolean +
+ + +
    Choices: +
  • no ←
  • +
  • yes
  • +
+ + +
State of Switchport Monitor for SPAN/ERSPAN
+ + + + + + +
+ enable_pfc + +
+ boolean +
+ + +
    Choices: +
  • no ←
  • +
  • yes
  • +
+ + +
State of Priority Flow Control (PFC) on the interface
+ + @@ -1105,6 +1168,69 @@ Parameters
Duplex of the interface. Speed must be set to use duplex.
+ + + + +
+ enable_cdp + +
+ boolean +
+ + +
    Choices: +
  • no
  • +
  • yes ←
  • +
+ + +
State of CDP protocol on the interface
+ + + + + + +
+ enable_monitor + +
+ boolean +
+ + +
    Choices: +
  • no ←
  • +
  • yes
  • +
+ + +
State of Switchport Monitor for SPAN/ERSPAN
+ + + + + + +
+ enable_pfc + +
+ boolean +
+ + +
    Choices: +
  • no ←
  • +
  • yes
  • +
+ + +
State of Priority Flow Control (PFC) on the interface
+ + From 924581a43223aabf732123d6d20978d5009c67d1 Mon Sep 17 00:00:00 2001 From: mkilar Date: Tue, 1 Jul 2025 15:44:03 +0200 Subject: [PATCH 7/7] corrected pep8 issues --- plugins/modules/dcnm_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/dcnm_interface.py b/plugins/modules/dcnm_interface.py index a1b167c96..7a29c3ebd 100644 --- a/plugins/modules/dcnm_interface.py +++ b/plugins/modules/dcnm_interface.py @@ -3953,7 +3953,7 @@ def dcnm_intf_compare_elements( else: t_e2 = e2 - if k in ['ENABLE_ORPHAN_PORT','ENABLE_PFC','ENABLE_MONITOR','CDP_ENABLE']: + if k in ['ENABLE_ORPHAN_PORT', 'ENABLE_PFC', 'ENABLE_MONITOR', 'CDP_ENABLE']: # This is a special case where the value is a boolean and we need to compare it as such t_e1 = str(t_e1).lower() t_e2 = str(t_e2).lower()