From 27b0dad9cb86bdf809b87c8ecb0fcb1c8d37a748 Mon Sep 17 00:00:00 2001 From: Ruchi Pakhle Date: Thu, 28 Nov 2024 15:12:30 +0530 Subject: [PATCH 1/2] Add nxos vrf interface --- .../vrf_interfaces/nxos_vrf_interfaces.yaml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 models/nxos/vrf_interfaces/nxos_vrf_interfaces.yaml diff --git a/models/nxos/vrf_interfaces/nxos_vrf_interfaces.yaml b/models/nxos/vrf_interfaces/nxos_vrf_interfaces.yaml new file mode 100644 index 000000000..41901dcb2 --- /dev/null +++ b/models/nxos/vrf_interfaces/nxos_vrf_interfaces.yaml @@ -0,0 +1,65 @@ +module: nxos_vrf_interfaces +short_description: Resource module to configure VRF interfaces. +description: This module configures and manages the VRF configuration in interface on NX-OS platforms. +version_added: 10.3.0 +author: Ruchi Pakhle (@Ruchip16) +notes: + - Tested against Cisco NX-OS. + - This module works with connection C(network_cli). +options: + config: + description: A list of VRF interfaces options. + type: list + elements: dict + suboptions: + name: + description: + - Full name of the interface excluding any logical unit number, + i.e. Ethernet1/1. + type: str + required: true + vrf_name: + description: + - Vrf that is to be added to the interface. + type: str + required: true + running_config: + description: + - This option is used only with state I(parsed). + - The value of this option should be the output received from the IOS + device by executing the command B(sh running-config interface). + - The state I(parsed) reads the configuration from C(running_config) + option and transforms it into Ansible structured data as per the + resource module's argspec and the value is then returned in the + I(parsed) key within the result. + type: str + state: + description: + - The state the configuration should be left in + - The states I(rendered), I(gathered) and I(parsed) does not perform any + change on the device. + - The state I(rendered) will transform the configuration in C(config) + option to platform specific CLI commands which will be returned in the + I(rendered) key within the result. For state I(rendered) active + connection to remote host is not required. + - The state I(gathered) will fetch the running configuration from device + and transform it into structured data in the format as per the resource + module argspec and the value is returned in the I(gathered) key within + the result. + - The state I(parsed) reads the configuration from C(running_config) + option and transforms it into JSON format as per the resource module + parameters and the value is returned in the I(parsed) key within the + result. The value of C(running_config) option should be the same format + as the output of command I(show running-config | include ip route|ipv6 + route) executed on device. For state I(parsed) active connection to + remote host is not required. + type: str + choices: + - merged + - replaced + - overridden + - deleted + - gathered + - rendered + - parsed + default: merged \ No newline at end of file From 24aee8aff37775a345af15b563a0b1efe23bbec0 Mon Sep 17 00:00:00 2001 From: Ruchi Pakhle Date: Mon, 2 Dec 2024 02:52:33 +0530 Subject: [PATCH 2/2] changes push --- models/nxos/vrf_interfaces/nxos_vrf_interfaces.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/nxos/vrf_interfaces/nxos_vrf_interfaces.yaml b/models/nxos/vrf_interfaces/nxos_vrf_interfaces.yaml index 41901dcb2..b41c9f8b3 100644 --- a/models/nxos/vrf_interfaces/nxos_vrf_interfaces.yaml +++ b/models/nxos/vrf_interfaces/nxos_vrf_interfaces.yaml @@ -1,7 +1,7 @@ module: nxos_vrf_interfaces short_description: Resource module to configure VRF interfaces. description: This module configures and manages the VRF configuration in interface on NX-OS platforms. -version_added: 10.3.0 +version_added: 9.2.1 author: Ruchi Pakhle (@Ruchip16) notes: - Tested against Cisco NX-OS. @@ -26,7 +26,7 @@ options: running_config: description: - This option is used only with state I(parsed). - - The value of this option should be the output received from the IOS + - The value of this option should be the output received from the NX-OS device by executing the command B(sh running-config interface). - The state I(parsed) reads the configuration from C(running_config) option and transforms it into Ansible structured data as per the