Skip to content

Commit

Permalink
Add nxos_vrf_global resource module (#870)
Browse files Browse the repository at this point in the history
* vrf_global init

* added parsers

* chore: auto fixes from pre-commit.com hooks

* add final parsers

* chore: auto fixes from pre-commit.com hooks

* minor changes in parser

* fixed parsers for ssm_translate

* chore: auto fixes from pre-commit.com hooks

* fixed and added some parsers

* chore: auto fixes from pre-commit.com hooks

* fixed wrong model issue

* chore: auto fixes from pre-commit.com hooks

* chore: auto fixes from pre-commit.com hooks

* config side code

* chore: auto fixes from pre-commit.com hooks

* pre-commit fix

* chore: auto fixes from pre-commit.com hooks

* more pre-commit fix

* more pre-commit

* added unit test

* chore: auto fixes from pre-commit.com hooks

* fix syntax

* fixed parsed

* fix sanity

* added commands

* added examples

* chore: auto fixes from pre-commit.com hooks

* fix lint

* added intergration test

* chore: auto fixes from pre-commit.com hooks

* added more tests

* replaced

* changes to tests

* fixed domain names

* added rendered

* rtt

* fix lint

* fix docs

* chore: auto fixes from pre-commit.com hooks

* fix intend

* fix spacing

* update deprecation

* chore: auto fixes from pre-commit.com hooks

* edit runtime

* fix lint

* chore: auto fixes from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
roverflow and pre-commit-ci[bot] authored Jul 26, 2024
1 parent a69be39 commit 3f9912d
Show file tree
Hide file tree
Showing 35 changed files with 4,577 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ Name | Description
[cisco.nxos.nxos_vlans](https://github.com/ansible-collections/cisco.nxos/blob/main/docs/cisco.nxos.nxos_vlans_module.rst)|VLANs resource module
[cisco.nxos.nxos_vpc](https://github.com/ansible-collections/cisco.nxos/blob/main/docs/cisco.nxos.nxos_vpc_module.rst)|Manages global VPC configuration
[cisco.nxos.nxos_vpc_interface](https://github.com/ansible-collections/cisco.nxos/blob/main/docs/cisco.nxos.nxos_vpc_interface_module.rst)|Manages interface VPC configuration
[cisco.nxos.nxos_vrf](https://github.com/ansible-collections/cisco.nxos/blob/main/docs/cisco.nxos.nxos_vrf_module.rst)|Manages global VRF configuration.
[cisco.nxos.nxos_vrf](https://github.com/ansible-collections/cisco.nxos/blob/main/docs/cisco.nxos.nxos_vrf_module.rst)|(deprecated, removed after 2026-07-25) Manages global VRF configuration.
[cisco.nxos.nxos_vrf_af](https://github.com/ansible-collections/cisco.nxos/blob/main/docs/cisco.nxos.nxos_vrf_af_module.rst)|Manages VRF AF.
[cisco.nxos.nxos_vrf_global](https://github.com/ansible-collections/cisco.nxos/blob/main/docs/cisco.nxos.nxos_vrf_global_module.rst)|Resource module to configure VRF definitions.
[cisco.nxos.nxos_vrf_interface](https://github.com/ansible-collections/cisco.nxos/blob/main/docs/cisco.nxos.nxos_vrf_interface_module.rst)|Manages interface specific VRF configuration.
[cisco.nxos.nxos_vrrp](https://github.com/ansible-collections/cisco.nxos/blob/main/docs/cisco.nxos.nxos_vrrp_module.rst)|Manages VRRP configuration on NX-OS switches.
[cisco.nxos.nxos_vsan](https://github.com/ansible-collections/cisco.nxos/blob/main/docs/cisco.nxos.nxos_vsan_module.rst)|Configuration of vsan for Cisco NXOS MDS Switches.
Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/nxos_vrf_global.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- Add nxos_vrf_global resource module in favor of nxos_vrf module (https://github.com/ansible-collections/cisco.nxos/pull/870).
2 changes: 1 addition & 1 deletion docs/cisco.nxos.nxos_vrf_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
cisco.nxos.nxos_vrf
*******************

**Manages global VRF configuration.**
**(deprecated, removed after 2026-07-25) Manages global VRF configuration.**


Version added: 1.0.0
Expand Down
5 changes: 5 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ plugin_routing:
redirect: cisco.nxos.nxos_vpc_interface
vrf:
redirect: cisco.nxos.nxos_vrf
deprecation:
removal_date: "2026-07-25"
warning_text: See the plugin documentation for more details
vrf_af:
redirect: cisco.nxos.nxos_vrf_af
vrf_interface:
Expand All @@ -200,3 +203,5 @@ plugin_routing:
redirect: cisco.nxos.nxos_vxlan_vtep_vni
zone_zoneset:
redirect: cisco.nxos.nxos_zone_zoneset
vrf_global:
redirect: cisco.nxos.nxos_vrf_global
1 change: 1 addition & 0 deletions plugins/action/vrf_global.py
Empty file added plugins/lookup/__init__.py
Empty file.
Empty file.
260 changes: 260 additions & 0 deletions plugins/module_utils/network/nxos/argspec/vrf_global/vrf_global.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
# -*- coding: utf-8 -*-
# Copyright 2024 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import absolute_import, division, print_function


__metaclass__ = type

#############################################
# WARNING #
#############################################
#
# This file is auto generated by the
# ansible.content_builder.
#
# Manually editing this file is not advised.
#
# To update the argspec make the desired changes
# in the documentation in the module file and re-run
# ansible.content_builder commenting out
# the path to external 'docstring' in build.yaml.
#
##############################################

"""
The arg spec for the nxos_vrf_global module
"""


class Vrf_globalArgs(object): # pylint: disable=R0903
"""The arg spec for the nxos_vrf_global module"""

argument_spec = {
"config": {
"type": "dict",
"options": {
"vrfs": {
"type": "list",
"elements": "dict",
"options": {
"name": {"required": True, "type": "str"},
"description": {"type": "str"},
"ip": {
"type": "dict",
"options": {
"auto_discard": {"type": "bool"},
"domain_list": {"type": "list", "elements": "str"},
"domain_name": {"type": "str"},
"icmp_err": {
"type": "dict",
"options": {
"source_interface": {
"type": "dict",
"options": {
"interface": {
"type": "str",
"choices": [
"loopback",
"ethernet",
"port-channel",
],
},
"interface_value": {"type": "str"},
},
},
},
},
"igmp": {
"type": "dict",
"options": {
"ssm_translate": {
"type": "list",
"elements": "dict",
"options": {
"group": {"type": "str"},
"source": {"type": "str"},
},
},
},
},
"mroutes": {
"type": "list",
"elements": "dict",
"options": {
"group": {"type": "str"},
"source": {"type": "str"},
"preference": {"type": "int"},
"vrf": {"type": "str"},
},
},
"multicast": {
"type": "dict",
"options": {
"group_range_prefix_list": {"type": "str"},
"multipath": {
"type": "dict",
"options": {
"resilient": {"type": "bool"},
"splitting_type": {
"type": "dict",
"mutually_exclusive": [
[
"legacy",
"nbm",
"none",
"sg_hash",
"sg_hash_next_hop",
],
],
"options": {
"none": {"type": "bool"},
"legacy": {"type": "bool"},
"nbm": {"type": "bool"},
"sg_hash": {
"type": "bool",
},
"sg_hash_next_hop": {
"type": "bool",
},
},
},
},
},
"rpf": {
"type": "list",
"elements": "dict",
"options": {
"vrf_name": {"type": "str"},
"group_list_range": {
"type": "str",
},
},
},
},
},
"name_server": {
"type": "dict",
"options": {
"address_list": {
"type": "list",
"elements": "str",
},
"use_vrf": {
"type": "dict",
"options": {
"vrf": {"type": "str"},
"source_address": {"type": "str"},
},
},
},
},
"route": {
"type": "list",
"elements": "dict",
"mutually_exclusive": [
["tags", "vrf", "track"],
],
"options": {
"source": {"type": "str"},
"destination": {"type": "str"},
"tags": {
"type": "dict",
"options": {
"tag_value": {"type": "int"},
"route_pref": {"type": "int"},
},
},
"vrf": {"type": "str"},
"track": {"type": "str"},
},
},
},
},
"vni": {
"type": "dict",
"options": {
"vni_number": {"type": "int"},
"layer_3": {"type": "bool"},
},
},
"multicast": {
"type": "dict",
"options": {
"service_reflect": {
"type": "list",
"elements": "dict",
"options": {
"service_interface": {"type": "str"},
"map_to": {"type": "str"},
},
},
},
},
"ipv6": {
"type": "dict",
"options": {
"mld_ssm_translate": {
"type": "list",
"elements": "dict",
"options": {
"icmp": {"type": "bool"},
"group": {"type": "str"},
"source": {"type": "str"},
},
},
"multicast": {
"type": "dict",
"options": {
"group_range_prefix_list": {"type": "str"},
"multipath": {
"type": "dict",
"options": {
"resilient": {"type": "bool"},
"splitting_type": {
"type": "dict",
"mutually_exclusive": [
[
"none",
"sg_hash",
"sg_hash_next_hop",
],
],
"options": {
"none": {"type": "bool"},
"sg_hash": {
"type": "bool",
},
"sg_hash_next_hop": {
"type": "bool",
},
},
},
},
},
},
},
},
},
},
},
},
},
"running_config": {"type": "str"},
"state": {
"choices": [
"parsed",
"gathered",
"deleted",
"merged",
"replaced",
"rendered",
"overridden",
"purged",
],
"default": "merged",
"type": "str",
},
} # pylint: disable=C0301
Empty file.
Loading

0 comments on commit 3f9912d

Please sign in to comment.