From 9e5dab62f28f8182075a6f36e70dc396516cb624 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:06:37 +0530 Subject: [PATCH 1/3] chore: pre-commit autoupdate (#514) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/psf/black: 24.8.0 → 24.10.0](https://github.com/psf/black/compare/24.8.0...24.10.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 20f531d9..3f17d189 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: update-docs - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-merge-conflict - id: check-symlinks @@ -46,7 +46,7 @@ repos: args: ["--filter-files"] - repo: https://github.com/psf/black - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black From d1d6a336671b6210395f12cd8ae41f29de0610c7 Mon Sep 17 00:00:00 2001 From: Sagar Paul Date: Thu, 17 Oct 2024 18:42:51 +0530 Subject: [PATCH 2/3] iosxr_route_policy - resource module (#512) The ios_route_policy resource module --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- README.md | 1 + changelogs/fragments/iosxr_route_maps.yaml | 3 + docs/cisco.iosxr.iosxr_route_maps_module.rst | 20911 ++++++++++++++++ ....iosxr.iosxr_vrf_address_family_module.rst | 1342 + docs/cisco.iosxr.iosxr_vrf_global_module.rst | 1001 + .../iosxr/argspec/route_maps/__init__.py | 0 .../iosxr/argspec/route_maps/route_maps.py | 1828 ++ .../iosxr/config/route_maps/__init__.py | 0 .../iosxr/config/route_maps/route_maps.py | 290 + .../module_utils/network/iosxr/facts/facts.py | 4 + .../iosxr/facts/route_maps/__init__.py | 0 .../iosxr/facts/route_maps/route_maps.py | 258 + .../network/iosxr/rm_templates/route_maps.py | 1170 + plugins/modules/iosxr_route_maps.py | 1487 ++ .../iosxr_route_maps/defaults/main.yml | 2 + .../targets/iosxr_route_maps/meta/main.yml | 0 .../targets/iosxr_route_maps/tasks/cli.yaml | 22 + .../targets/iosxr_route_maps/tasks/main.yaml | 5 + .../iosxr_route_maps/tests/common/_parsed.cfg | 33 + .../tests/common/_populate_config.yaml | 41 + .../tests/common/_remove_config.yaml | 7 + .../tests/common/empty_config.yaml | 50 + .../tests/common/gathered.yaml | 20 + .../iosxr_route_maps/tests/common/merged.yaml | 62 + .../tests/common/overridden.yaml | 50 + .../iosxr_route_maps/tests/common/parsed.yaml | 14 + .../iosxr_route_maps/tests/common/purged.yaml | 31 + .../tests/common/rendered.yaml | 53 + .../targets/iosxr_route_maps/vars/main.yaml | 207 + .../modules/network/iosxr/test_hostname.py | 1 - .../iosxr/test_iosxr_acl_interfaces.py | 1 - .../network/iosxr/test_iosxr_bgp_templates.py | 1 - .../network/iosxr/test_iosxr_l2_interfaces.py | 2 - .../network/iosxr/test_iosxr_l3_interfaces.py | 1 - .../iosxr/test_iosxr_lacp_interfaces.py | 1 - .../iosxr/test_iosxr_lag_interfaces.py | 1 - .../iosxr/test_iosxr_lldp_interfaces.py | 1 - .../network/iosxr/test_iosxr_ntp_global.py | 1 - .../modules/network/iosxr/test_iosxr_ping.py | 1 - .../network/iosxr/test_iosxr_route_maps.py | 1278 + .../network/iosxr/test_iosxr_snmp_server.py | 1 - 41 files changed, 30170 insertions(+), 12 deletions(-) create mode 100644 changelogs/fragments/iosxr_route_maps.yaml create mode 100644 docs/cisco.iosxr.iosxr_route_maps_module.rst create mode 100644 docs/cisco.iosxr.iosxr_vrf_address_family_module.rst create mode 100644 docs/cisco.iosxr.iosxr_vrf_global_module.rst create mode 100644 plugins/module_utils/network/iosxr/argspec/route_maps/__init__.py create mode 100644 plugins/module_utils/network/iosxr/argspec/route_maps/route_maps.py create mode 100644 plugins/module_utils/network/iosxr/config/route_maps/__init__.py create mode 100644 plugins/module_utils/network/iosxr/config/route_maps/route_maps.py create mode 100644 plugins/module_utils/network/iosxr/facts/route_maps/__init__.py create mode 100644 plugins/module_utils/network/iosxr/facts/route_maps/route_maps.py create mode 100644 plugins/module_utils/network/iosxr/rm_templates/route_maps.py create mode 100644 plugins/modules/iosxr_route_maps.py create mode 100644 tests/integration/targets/iosxr_route_maps/defaults/main.yml create mode 100644 tests/integration/targets/iosxr_route_maps/meta/main.yml create mode 100644 tests/integration/targets/iosxr_route_maps/tasks/cli.yaml create mode 100644 tests/integration/targets/iosxr_route_maps/tasks/main.yaml create mode 100644 tests/integration/targets/iosxr_route_maps/tests/common/_parsed.cfg create mode 100644 tests/integration/targets/iosxr_route_maps/tests/common/_populate_config.yaml create mode 100644 tests/integration/targets/iosxr_route_maps/tests/common/_remove_config.yaml create mode 100644 tests/integration/targets/iosxr_route_maps/tests/common/empty_config.yaml create mode 100644 tests/integration/targets/iosxr_route_maps/tests/common/gathered.yaml create mode 100644 tests/integration/targets/iosxr_route_maps/tests/common/merged.yaml create mode 100644 tests/integration/targets/iosxr_route_maps/tests/common/overridden.yaml create mode 100644 tests/integration/targets/iosxr_route_maps/tests/common/parsed.yaml create mode 100644 tests/integration/targets/iosxr_route_maps/tests/common/purged.yaml create mode 100644 tests/integration/targets/iosxr_route_maps/tests/common/rendered.yaml create mode 100644 tests/integration/targets/iosxr_route_maps/vars/main.yaml create mode 100644 tests/unit/modules/network/iosxr/test_iosxr_route_maps.py diff --git a/README.md b/README.md index 0e205c72..4c11d039 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ Name | Description [cisco.iosxr.iosxr_ospfv3](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_ospfv3_module.rst)|Resource module to configure OSPFv3. [cisco.iosxr.iosxr_ping](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_ping_module.rst)|Tests reachability using ping from IOSXR switch. [cisco.iosxr.iosxr_prefix_lists](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_prefix_lists_module.rst)|Resource module to configure prefix lists. +[cisco.iosxr.iosxr_route_maps](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_route_maps_module.rst)|Resource module to configure route maps. [cisco.iosxr.iosxr_snmp_server](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_snmp_server_module.rst)|Resource module to configure snmp server. [cisco.iosxr.iosxr_static_routes](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_static_routes_module.rst)|Resource module to configure static routes. [cisco.iosxr.iosxr_system](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_system_module.rst)|Module to manage the system attributes. diff --git a/changelogs/fragments/iosxr_route_maps.yaml b/changelogs/fragments/iosxr_route_maps.yaml new file mode 100644 index 00000000..4832c05e --- /dev/null +++ b/changelogs/fragments/iosxr_route_maps.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: + - Added iosxr_route_maps resource module, that helps with configuration of route-policy. diff --git a/docs/cisco.iosxr.iosxr_route_maps_module.rst b/docs/cisco.iosxr.iosxr_route_maps_module.rst new file mode 100644 index 00000000..94824ca0 --- /dev/null +++ b/docs/cisco.iosxr.iosxr_route_maps_module.rst @@ -0,0 +1,20911 @@ +.. _cisco.iosxr.iosxr_route_maps_module: + + +**************************** +cisco.iosxr.iosxr_route_maps +**************************** + +**Resource module to configure route maps.** + + +Version added: 10.2.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- This module configures and manages the attributes of Route maps on Cisco IOSXR. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ list + / elements=dictionary +
+
+ +
A list of configurations for route policy.
+
+
+ else_section + +
+ dictionary +
+
+ +
A dictionary of configurations that would be considered in the else block
+
+
+ else_section + +
+ dictionary +
+
+ +
A dictionary of configurations for nested else, does not support if/ elseif
+
+
+ add + +
+ dictionary +
+
+ +
Add offset to the existing value
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ rip_metric + +
+ integer +
+
+ +
<0-16> RIP metric attribute
+
+
+ apply + +
+ list + / elements=dictionary +
+
+ +
Apply a route policy
+
+
+ route_policy + +
+ string +
+
+ +
Apply a specific route policy
+
+
+ route_policy_input + +
+ string +
+
+ +
ipv4/ ipv6 / name-string
+
+
+ drop + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Reject this route with no further processing
+
+
+ pass + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Pass this route for further processing
+
+
+ prepend + +
+ dictionary +
+
+ +
Prepend to BGP AS-path
+
+
+ as_path + +
+ integer +
+
+ +
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path
+
+
+ most_recent + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Most recent Autonomous System Number
+
+
+ number_of_times + +
+ integer +
+
+ +
number of times to prepend
+
+
+ own_as + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Local Autonomous System Number
+
+
+ remove + +
+ dictionary +
+
+ +
Remove all private-as entries
+
+
+ entire_aspath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove private-AS from entire aspath
+
+
+ set + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove all private-as entries (remove as-path private-as)
+
+
+ set + +
+ dictionary +
+
+ +
Set a route attribute
+
+
+ administrative_distance + +
+ integer +
+
+ +
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe
+
+
+ aigp_metric + +
+ dictionary +
+
+ +
AIGP metric attribute
+
+
+ decrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
- Decrement the attribute by specified value
+
+
+ icrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
+ Increment the attribute with specified value
+
+
+ igp_cost + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Internal routing protocol cost
+
+
+ metric_number + +
+ integer +
+
+ +
<0-4294967295> 32-bit decimal number
+
+
+ attribute_set + +
+ string +
+
+ +
TE attribute-set name <0-4294967295> 32-bit decimal number
+
+
+ c_multicast_routing + +
+ dictionary +
+
+ +
Multicast Customer routing type
+
+
+ bgp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP customer-multicast routing
+
+
+ pim + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM customer-multicast routing
+
+
+ community + +
+ dictionary +
+
+ +
BGP community attribute
+
+
+ additive + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Add to the existing community
+
+
+ community_name + +
+ string +
+
+ +
Community set name
+
+
+ core_tree + +
+ dictionary +
+
+ +
Multicast Distribution Tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ ingress_replication_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Default MDT core
+
+
+ ingress_replication_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Partitioned MDT core
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ mldp_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Default MDT core
+
+
+ mldp_inband + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Inband core
+
+
+ mldp_partitioned_mp2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned MP2MP MDT core
+
+
+ mldp_partitioned_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned P2MP MDT core
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ p2mp_te_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Default MDT core
+
+
+ p2mp_te_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Partitioned MDT core
+
+
+ pim_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM Default MDT core
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ dampening + +
+ dictionary +
+
+ +
BGP route flap dampening parameters
+
+
+ halflife + +
+ integer +
+
+ +
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15
+
+
+ max_suppress + +
+ integer +
+
+ +
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60
+
+
+ reuse + +
+ integer +
+
+ +
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750
+
+
+ suppress + +
+ integer +
+
+ +
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000
+
+
+ downstream_core_tree + +
+ dictionary +
+
+ +
BGP I-PMSI/S-PMSI core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ fallback_vrf_lookup + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
fallback vrf look-up
+
+
+ flow_tag + +
+ integer +
+
+ +
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1
+
+
+ forward_class + +
+ integer +
+
+ +
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1
+
+
+ ip_precedence + +
+ integer +
+
+ +
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1
+
+
+ isis_metric + +
+ integer +
+
+ +
IS-IS metric attribute, <0-16777215> 24 bit decimal number
+
+
+ label + +
+ integer +
+
+ +
Set BGP label value, <0-1048575> 20 bit decimal number
+
+
+ label_index + +
+ integer +
+
+ +
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number
+
+
+ label_mode + +
+ dictionary +
+
+ +
Set BGP label-mode value
+
+
+ per_ce + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-ce
+
+
+ per_prefix + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-prefix
+
+
+ per_vrf + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-vrf
+
+
+ large_community + +
+ string +
+
+ +
BGP large community attribute
+
+
+ level + +
+ dictionary +
+
+ +
Where to import route
+
+
+ level_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 routes
+
+
+ level_1_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 and level-2 routes
+
+
+ level_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-2 routes
+
+
+ load_balance + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Load-balance for ECMP ecmp-consistent
+
+
+ lsm_root + +
+ string +
+
+ +
Label Switched Multicast Root address
+
+
+ metric_type + +
+ dictionary +
+
+ +
Type of metric for destination routing protocol
+
+
+ external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rib_metric_as_external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ rib_metric_as_internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS internal metric-type
+
+
+ type_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-1 route
+
+
+ type_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-2 route
+
+
+ mpls + +
+ string +
+
+ +
MPLS traffic-eng attributeset name-string
+
+
+ next_hop + +
+ dictionary +
+
+ +
Next hop address specified in this route
+
+
+ address + +
+ string +
+
+ +
next hop address
+
+
+ origin + +
+ dictionary +
+
+ +
BGP origin code
+
+
+ egp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ igp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rincomplete + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ ospf_metric + +
+ integer +
+
+ +
OSPF metric attribute
+
+
+ path_color + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP Path Color for RIB (path-color external-reach)
+
+
+ path_selection + +
+ dictionary +
+
+ +
BGP path selection
+
+
+ all + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP all advertise
+
+
+ backup + +
+ dictionary +
+
+ +
BGP backup
+
+
+ advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise the path
+
+
+ backup_decimal + +
+ integer +
+
+ +
<1>, decimal number 1
+
+
+ install + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Install the path
+
+
+ best_path + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP best path
+
+
+ group_best + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP group-best advertise
+
+
+ multiplath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP multipath advertise
+
+
+ qos_group + +
+ integer +
+
+ +
QoS Group to classify packets
+
+
+ rib_metric + +
+ integer +
+
+ +
RIB metric for table-policy
+
+
+ rip_metric + +
+ integer +
+
+ +
RIP metric attribute
+
+
+ rip_tag + +
+ integer +
+
+ +
RIP Route tag attribute
+
+
+ rt_set + +
+ integer +
+
+ +
Limit on routes with paths with an RT-set
+
+
+ s_pmsi + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
S-PMSI Advertisement type (star-g)
+
+
+ spf_priority + +
+ dictionary +
+
+ +
OSPF SPF priority
+
+
+ critical + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Critical priority
+
+
+ high + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
High priority
+
+
+ medium + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Medium priority
+
+
+ static_p2mp_te + +
+ string +
+
+ +
Static P2MP-TE tunnel
+
+
+ tag + +
+ integer +
+
+ +
Route tag attribute
+
+
+ traffic_index + +
+ dictionary +
+
+ +
Traffic-index for BGP policy accounting
+
+
+ ignore + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove any traffic-index setting
+
+
+ index_number + +
+ integer +
+
+ +
6 bit decimal number starting from 1 <1-63>
+
+
+ upstream_core_tree + +
+ dictionary +
+
+ +
BGP Leaf AD core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ vpn_distinguisher + +
+ integer +
+
+ +
BGP VPN distinguisher (VD) attribute
+
+
+ weight + +
+ integer +
+
+ +
Weight attribute for route selection
+
+
+ suppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Suppress specific routes when aggregating
+
+
+ unsuppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Unsuppress specific aggregated routes
+
+
+ elseif_section + +
+ list + / elements=dictionary +
+
+ +
A list of elif configurations that would follow along with the top level if
+
+
+ add + +
+ dictionary +
+
+ +
Add offset to the existing value
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ rip_metric + +
+ integer +
+
+ +
<0-16> RIP metric attribute
+
+
+ apply + +
+ list + / elements=dictionary +
+
+ +
Apply a route policy
+
+
+ route_policy + +
+ string +
+
+ +
Apply a specific route policy
+
+
+ route_policy_input + +
+ string +
+
+ +
ipv4/ ipv6 / name-string
+
+
+ condition + +
+ string +
+
+ +
the condition string, eg - aigp-metric eq 23 and as-path in tmp1 and community is-empty and community matches-any test1 (don't add then at end)
+
+
+ drop + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Reject this route with no further processing
+
+
+ pass + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Pass this route for further processing
+
+
+ prepend + +
+ dictionary +
+
+ +
Prepend to BGP AS-path
+
+
+ as_path + +
+ integer +
+
+ +
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path
+
+
+ most_recent + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Most recent Autonomous System Number
+
+
+ number_of_times + +
+ integer +
+
+ +
number of times to prepend
+
+
+ own_as + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Local Autonomous System Number
+
+
+ remove + +
+ dictionary +
+
+ +
Remove all private-as entries
+
+
+ entire_aspath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove private-AS from entire aspath
+
+
+ set + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove all private-as entries (remove as-path private-as)
+
+
+ set + +
+ dictionary +
+
+ +
Set a route attribute
+
+
+ administrative_distance + +
+ integer +
+
+ +
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe
+
+
+ aigp_metric + +
+ dictionary +
+
+ +
AIGP metric attribute
+
+
+ decrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
- Decrement the attribute by specified value
+
+
+ icrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
+ Increment the attribute with specified value
+
+
+ igp_cost + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Internal routing protocol cost
+
+
+ metric_number + +
+ integer +
+
+ +
<0-4294967295> 32-bit decimal number
+
+
+ attribute_set + +
+ string +
+
+ +
TE attribute-set name <0-4294967295> 32-bit decimal number
+
+
+ c_multicast_routing + +
+ dictionary +
+
+ +
Multicast Customer routing type
+
+
+ bgp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP customer-multicast routing
+
+
+ pim + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM customer-multicast routing
+
+
+ community + +
+ dictionary +
+
+ +
BGP community attribute
+
+
+ additive + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Add to the existing community
+
+
+ community_name + +
+ string +
+
+ +
Community set name
+
+
+ core_tree + +
+ dictionary +
+
+ +
Multicast Distribution Tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ ingress_replication_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Default MDT core
+
+
+ ingress_replication_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Partitioned MDT core
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ mldp_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Default MDT core
+
+
+ mldp_inband + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Inband core
+
+
+ mldp_partitioned_mp2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned MP2MP MDT core
+
+
+ mldp_partitioned_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned P2MP MDT core
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ p2mp_te_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Default MDT core
+
+
+ p2mp_te_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Partitioned MDT core
+
+
+ pim_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM Default MDT core
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ dampening + +
+ dictionary +
+
+ +
BGP route flap dampening parameters
+
+
+ halflife + +
+ integer +
+
+ +
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15
+
+
+ max_suppress + +
+ integer +
+
+ +
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60
+
+
+ reuse + +
+ integer +
+
+ +
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750
+
+
+ suppress + +
+ integer +
+
+ +
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000
+
+
+ downstream_core_tree + +
+ dictionary +
+
+ +
BGP I-PMSI/S-PMSI core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ fallback_vrf_lookup + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
fallback vrf look-up
+
+
+ flow_tag + +
+ integer +
+
+ +
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1
+
+
+ forward_class + +
+ integer +
+
+ +
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1
+
+
+ ip_precedence + +
+ integer +
+
+ +
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1
+
+
+ isis_metric + +
+ integer +
+
+ +
IS-IS metric attribute, <0-16777215> 24 bit decimal number
+
+
+ label + +
+ integer +
+
+ +
Set BGP label value, <0-1048575> 20 bit decimal number
+
+
+ label_index + +
+ integer +
+
+ +
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number
+
+
+ label_mode + +
+ dictionary +
+
+ +
Set BGP label-mode value
+
+
+ per_ce + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-ce
+
+
+ per_prefix + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-prefix
+
+
+ per_vrf + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-vrf
+
+
+ large_community + +
+ string +
+
+ +
BGP large community attribute
+
+
+ level + +
+ dictionary +
+
+ +
Where to import route
+
+
+ level_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 routes
+
+
+ level_1_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 and level-2 routes
+
+
+ level_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-2 routes
+
+
+ load_balance + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Load-balance for ECMP ecmp-consistent
+
+
+ lsm_root + +
+ string +
+
+ +
Label Switched Multicast Root address
+
+
+ metric_type + +
+ dictionary +
+
+ +
Type of metric for destination routing protocol
+
+
+ external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rib_metric_as_external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ rib_metric_as_internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS internal metric-type
+
+
+ type_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-1 route
+
+
+ type_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-2 route
+
+
+ mpls + +
+ string +
+
+ +
MPLS traffic-eng attributeset name-string
+
+
+ next_hop + +
+ dictionary +
+
+ +
Next hop address specified in this route
+
+
+ address + +
+ string +
+
+ +
next hop address
+
+
+ origin + +
+ dictionary +
+
+ +
BGP origin code
+
+
+ egp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ igp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rincomplete + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ ospf_metric + +
+ integer +
+
+ +
OSPF metric attribute
+
+
+ path_color + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP Path Color for RIB (path-color external-reach)
+
+
+ path_selection + +
+ dictionary +
+
+ +
BGP path selection
+
+
+ all + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP all advertise
+
+
+ backup + +
+ dictionary +
+
+ +
BGP backup
+
+
+ advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise the path
+
+
+ backup_decimal + +
+ integer +
+
+ +
<1>, decimal number 1
+
+
+ install + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Install the path
+
+
+ best_path + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP best path
+
+
+ group_best + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP group-best advertise
+
+
+ multiplath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP multipath advertise
+
+
+ qos_group + +
+ integer +
+
+ +
QoS Group to classify packets
+
+
+ rib_metric + +
+ integer +
+
+ +
RIB metric for table-policy
+
+
+ rip_metric + +
+ integer +
+
+ +
RIP metric attribute
+
+
+ rip_tag + +
+ integer +
+
+ +
RIP Route tag attribute
+
+
+ rt_set + +
+ integer +
+
+ +
Limit on routes with paths with an RT-set
+
+
+ s_pmsi + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
S-PMSI Advertisement type (star-g)
+
+
+ spf_priority + +
+ dictionary +
+
+ +
OSPF SPF priority
+
+
+ critical + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Critical priority
+
+
+ high + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
High priority
+
+
+ medium + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Medium priority
+
+
+ static_p2mp_te + +
+ string +
+
+ +
Static P2MP-TE tunnel
+
+
+ tag + +
+ integer +
+
+ +
Route tag attribute
+
+
+ traffic_index + +
+ dictionary +
+
+ +
Traffic-index for BGP policy accounting
+
+
+ ignore + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove any traffic-index setting
+
+
+ index_number + +
+ integer +
+
+ +
6 bit decimal number starting from 1 <1-63>
+
+
+ upstream_core_tree + +
+ dictionary +
+
+ +
BGP Leaf AD core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ vpn_distinguisher + +
+ integer +
+
+ +
BGP VPN distinguisher (VD) attribute
+
+
+ weight + +
+ integer +
+
+ +
Weight attribute for route selection
+
+
+ suppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Suppress specific routes when aggregating
+
+
+ unsuppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Unsuppress specific aggregated routes
+
+
+ global + +
+ dictionary +
+
+ +
A dictionary of configurations for route policy without any conditions
+
+
+ add + +
+ dictionary +
+
+ +
Add offset to the existing value
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ rip_metric + +
+ integer +
+
+ +
<0-16> RIP metric attribute
+
+
+ apply + +
+ list + / elements=dictionary +
+
+ +
Apply a route policy
+
+
+ route_policy + +
+ string +
+
+ +
Apply a specific route policy
+
+
+ route_policy_input + +
+ string +
+
+ +
ipv4/ ipv6 / name-string
+
+
+ drop + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Reject this route with no further processing
+
+
+ pass + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Pass this route for further processing
+
+
+ prepend + +
+ dictionary +
+
+ +
Prepend to BGP AS-path
+
+
+ as_path + +
+ integer +
+
+ +
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path
+
+
+ most_recent + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Most recent Autonomous System Number
+
+
+ number_of_times + +
+ integer +
+
+ +
number of times to prepend
+
+
+ own_as + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Local Autonomous System Number
+
+
+ remove + +
+ dictionary +
+
+ +
Remove all private-as entries
+
+
+ entire_aspath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove private-AS from entire aspath
+
+
+ set + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove all private-as entries (remove as-path private-as)
+
+
+ set + +
+ dictionary +
+
+ +
Set a route attribute
+
+
+ administrative_distance + +
+ integer +
+
+ +
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe
+
+
+ aigp_metric + +
+ dictionary +
+
+ +
AIGP metric attribute
+
+
+ decrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
- Decrement the attribute by specified value
+
+
+ icrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
+ Increment the attribute with specified value
+
+
+ igp_cost + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Internal routing protocol cost
+
+
+ metric_number + +
+ integer +
+
+ +
<0-4294967295> 32-bit decimal number
+
+
+ attribute_set + +
+ string +
+
+ +
TE attribute-set name <0-4294967295> 32-bit decimal number
+
+
+ c_multicast_routing + +
+ dictionary +
+
+ +
Multicast Customer routing type
+
+
+ bgp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP customer-multicast routing
+
+
+ pim + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM customer-multicast routing
+
+
+ community + +
+ dictionary +
+
+ +
BGP community attribute
+
+
+ additive + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Add to the existing community
+
+
+ community_name + +
+ string +
+
+ +
Community set name
+
+
+ core_tree + +
+ dictionary +
+
+ +
Multicast Distribution Tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ ingress_replication_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Default MDT core
+
+
+ ingress_replication_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Partitioned MDT core
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ mldp_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Default MDT core
+
+
+ mldp_inband + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Inband core
+
+
+ mldp_partitioned_mp2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned MP2MP MDT core
+
+
+ mldp_partitioned_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned P2MP MDT core
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ p2mp_te_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Default MDT core
+
+
+ p2mp_te_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Partitioned MDT core
+
+
+ pim_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM Default MDT core
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ dampening + +
+ dictionary +
+
+ +
BGP route flap dampening parameters
+
+
+ halflife + +
+ integer +
+
+ +
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15
+
+
+ max_suppress + +
+ integer +
+
+ +
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60
+
+
+ reuse + +
+ integer +
+
+ +
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750
+
+
+ suppress + +
+ integer +
+
+ +
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000
+
+
+ downstream_core_tree + +
+ dictionary +
+
+ +
BGP I-PMSI/S-PMSI core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ fallback_vrf_lookup + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
fallback vrf look-up
+
+
+ flow_tag + +
+ integer +
+
+ +
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1
+
+
+ forward_class + +
+ integer +
+
+ +
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1
+
+
+ ip_precedence + +
+ integer +
+
+ +
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1
+
+
+ isis_metric + +
+ integer +
+
+ +
IS-IS metric attribute, <0-16777215> 24 bit decimal number
+
+
+ label + +
+ integer +
+
+ +
Set BGP label value, <0-1048575> 20 bit decimal number
+
+
+ label_index + +
+ integer +
+
+ +
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number
+
+
+ label_mode + +
+ dictionary +
+
+ +
Set BGP label-mode value
+
+
+ per_ce + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-ce
+
+
+ per_prefix + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-prefix
+
+
+ per_vrf + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-vrf
+
+
+ large_community + +
+ string +
+
+ +
BGP large community attribute
+
+
+ level + +
+ dictionary +
+
+ +
Where to import route
+
+
+ level_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 routes
+
+
+ level_1_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 and level-2 routes
+
+
+ level_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-2 routes
+
+
+ load_balance + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Load-balance for ECMP ecmp-consistent
+
+
+ lsm_root + +
+ string +
+
+ +
Label Switched Multicast Root address
+
+
+ metric_type + +
+ dictionary +
+
+ +
Type of metric for destination routing protocol
+
+
+ external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rib_metric_as_external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ rib_metric_as_internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS internal metric-type
+
+
+ type_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-1 route
+
+
+ type_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-2 route
+
+
+ mpls + +
+ string +
+
+ +
MPLS traffic-eng attributeset name-string
+
+
+ next_hop + +
+ dictionary +
+
+ +
Next hop address specified in this route
+
+
+ address + +
+ string +
+
+ +
next hop address
+
+
+ origin + +
+ dictionary +
+
+ +
BGP origin code
+
+
+ egp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ igp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rincomplete + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ ospf_metric + +
+ integer +
+
+ +
OSPF metric attribute
+
+
+ path_color + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP Path Color for RIB (path-color external-reach)
+
+
+ path_selection + +
+ dictionary +
+
+ +
BGP path selection
+
+
+ all + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP all advertise
+
+
+ backup + +
+ dictionary +
+
+ +
BGP backup
+
+
+ advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise the path
+
+
+ backup_decimal + +
+ integer +
+
+ +
<1>, decimal number 1
+
+
+ install + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Install the path
+
+
+ best_path + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP best path
+
+
+ group_best + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP group-best advertise
+
+
+ multiplath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP multipath advertise
+
+
+ qos_group + +
+ integer +
+
+ +
QoS Group to classify packets
+
+
+ rib_metric + +
+ integer +
+
+ +
RIB metric for table-policy
+
+
+ rip_metric + +
+ integer +
+
+ +
RIP metric attribute
+
+
+ rip_tag + +
+ integer +
+
+ +
RIP Route tag attribute
+
+
+ rt_set + +
+ integer +
+
+ +
Limit on routes with paths with an RT-set
+
+
+ s_pmsi + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
S-PMSI Advertisement type (star-g)
+
+
+ spf_priority + +
+ dictionary +
+
+ +
OSPF SPF priority
+
+
+ critical + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Critical priority
+
+
+ high + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
High priority
+
+
+ medium + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Medium priority
+
+
+ static_p2mp_te + +
+ string +
+
+ +
Static P2MP-TE tunnel
+
+
+ tag + +
+ integer +
+
+ +
Route tag attribute
+
+
+ traffic_index + +
+ dictionary +
+
+ +
Traffic-index for BGP policy accounting
+
+
+ ignore + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove any traffic-index setting
+
+
+ index_number + +
+ integer +
+
+ +
6 bit decimal number starting from 1 <1-63>
+
+
+ upstream_core_tree + +
+ dictionary +
+
+ +
BGP Leaf AD core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ vpn_distinguisher + +
+ integer +
+
+ +
BGP VPN distinguisher (VD) attribute
+
+
+ weight + +
+ integer +
+
+ +
Weight attribute for route selection
+
+
+ suppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Suppress specific routes when aggregating
+
+
+ unsuppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Unsuppress specific aggregated routes
+
+
+ if_section + +
+ dictionary +
+
+ +
A dictionary of configurations for route policy for the nested if condition, under top level else
+
+
+ add + +
+ dictionary +
+
+ +
Add offset to the existing value
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ rip_metric + +
+ integer +
+
+ +
<0-16> RIP metric attribute
+
+
+ apply + +
+ list + / elements=dictionary +
+
+ +
Apply a route policy
+
+
+ route_policy + +
+ string +
+
+ +
Apply a specific route policy
+
+
+ route_policy_input + +
+ string +
+
+ +
ipv4/ ipv6 / name-string
+
+
+ condition + +
+ string +
+
+ +
the condition string, eg - aigp-metric eq 23 and as-path in tmp1 and community is-empty and community matches-any test1 (don't add then at end)
+
+
+ drop + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Reject this route with no further processing
+
+
+ pass + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Pass this route for further processing
+
+
+ prepend + +
+ dictionary +
+
+ +
Prepend to BGP AS-path
+
+
+ as_path + +
+ integer +
+
+ +
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path
+
+
+ most_recent + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Most recent Autonomous System Number
+
+
+ number_of_times + +
+ integer +
+
+ +
number of times to prepend
+
+
+ own_as + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Local Autonomous System Number
+
+
+ remove + +
+ dictionary +
+
+ +
Remove all private-as entries
+
+
+ entire_aspath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove private-AS from entire aspath
+
+
+ set + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove all private-as entries (remove as-path private-as)
+
+
+ set + +
+ dictionary +
+
+ +
Set a route attribute
+
+
+ administrative_distance + +
+ integer +
+
+ +
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe
+
+
+ aigp_metric + +
+ dictionary +
+
+ +
AIGP metric attribute
+
+
+ decrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
- Decrement the attribute by specified value
+
+
+ icrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
+ Increment the attribute with specified value
+
+
+ igp_cost + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Internal routing protocol cost
+
+
+ metric_number + +
+ integer +
+
+ +
<0-4294967295> 32-bit decimal number
+
+
+ attribute_set + +
+ string +
+
+ +
TE attribute-set name <0-4294967295> 32-bit decimal number
+
+
+ c_multicast_routing + +
+ dictionary +
+
+ +
Multicast Customer routing type
+
+
+ bgp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP customer-multicast routing
+
+
+ pim + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM customer-multicast routing
+
+
+ community + +
+ dictionary +
+
+ +
BGP community attribute
+
+
+ additive + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Add to the existing community
+
+
+ community_name + +
+ string +
+
+ +
Community set name
+
+
+ core_tree + +
+ dictionary +
+
+ +
Multicast Distribution Tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ ingress_replication_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Default MDT core
+
+
+ ingress_replication_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Partitioned MDT core
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ mldp_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Default MDT core
+
+
+ mldp_inband + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Inband core
+
+
+ mldp_partitioned_mp2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned MP2MP MDT core
+
+
+ mldp_partitioned_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned P2MP MDT core
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ p2mp_te_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Default MDT core
+
+
+ p2mp_te_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Partitioned MDT core
+
+
+ pim_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM Default MDT core
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ dampening + +
+ dictionary +
+
+ +
BGP route flap dampening parameters
+
+
+ halflife + +
+ integer +
+
+ +
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15
+
+
+ max_suppress + +
+ integer +
+
+ +
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60
+
+
+ reuse + +
+ integer +
+
+ +
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750
+
+
+ suppress + +
+ integer +
+
+ +
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000
+
+
+ downstream_core_tree + +
+ dictionary +
+
+ +
BGP I-PMSI/S-PMSI core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ fallback_vrf_lookup + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
fallback vrf look-up
+
+
+ flow_tag + +
+ integer +
+
+ +
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1
+
+
+ forward_class + +
+ integer +
+
+ +
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1
+
+
+ ip_precedence + +
+ integer +
+
+ +
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1
+
+
+ isis_metric + +
+ integer +
+
+ +
IS-IS metric attribute, <0-16777215> 24 bit decimal number
+
+
+ label + +
+ integer +
+
+ +
Set BGP label value, <0-1048575> 20 bit decimal number
+
+
+ label_index + +
+ integer +
+
+ +
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number
+
+
+ label_mode + +
+ dictionary +
+
+ +
Set BGP label-mode value
+
+
+ per_ce + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-ce
+
+
+ per_prefix + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-prefix
+
+
+ per_vrf + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-vrf
+
+
+ large_community + +
+ string +
+
+ +
BGP large community attribute
+
+
+ level + +
+ dictionary +
+
+ +
Where to import route
+
+
+ level_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 routes
+
+
+ level_1_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 and level-2 routes
+
+
+ level_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-2 routes
+
+
+ load_balance + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Load-balance for ECMP ecmp-consistent
+
+
+ lsm_root + +
+ string +
+
+ +
Label Switched Multicast Root address
+
+
+ metric_type + +
+ dictionary +
+
+ +
Type of metric for destination routing protocol
+
+
+ external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rib_metric_as_external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ rib_metric_as_internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS internal metric-type
+
+
+ type_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-1 route
+
+
+ type_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-2 route
+
+
+ mpls + +
+ string +
+
+ +
MPLS traffic-eng attributeset name-string
+
+
+ next_hop + +
+ dictionary +
+
+ +
Next hop address specified in this route
+
+
+ address + +
+ string +
+
+ +
next hop address
+
+
+ origin + +
+ dictionary +
+
+ +
BGP origin code
+
+
+ egp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ igp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rincomplete + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ ospf_metric + +
+ integer +
+
+ +
OSPF metric attribute
+
+
+ path_color + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP Path Color for RIB (path-color external-reach)
+
+
+ path_selection + +
+ dictionary +
+
+ +
BGP path selection
+
+
+ all + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP all advertise
+
+
+ backup + +
+ dictionary +
+
+ +
BGP backup
+
+
+ advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise the path
+
+
+ backup_decimal + +
+ integer +
+
+ +
<1>, decimal number 1
+
+
+ install + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Install the path
+
+
+ best_path + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP best path
+
+
+ group_best + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP group-best advertise
+
+
+ multiplath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP multipath advertise
+
+
+ qos_group + +
+ integer +
+
+ +
QoS Group to classify packets
+
+
+ rib_metric + +
+ integer +
+
+ +
RIB metric for table-policy
+
+
+ rip_metric + +
+ integer +
+
+ +
RIP metric attribute
+
+
+ rip_tag + +
+ integer +
+
+ +
RIP Route tag attribute
+
+
+ rt_set + +
+ integer +
+
+ +
Limit on routes with paths with an RT-set
+
+
+ s_pmsi + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
S-PMSI Advertisement type (star-g)
+
+
+ spf_priority + +
+ dictionary +
+
+ +
OSPF SPF priority
+
+
+ critical + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Critical priority
+
+
+ high + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
High priority
+
+
+ medium + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Medium priority
+
+
+ static_p2mp_te + +
+ string +
+
+ +
Static P2MP-TE tunnel
+
+
+ tag + +
+ integer +
+
+ +
Route tag attribute
+
+
+ traffic_index + +
+ dictionary +
+
+ +
Traffic-index for BGP policy accounting
+
+
+ ignore + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove any traffic-index setting
+
+
+ index_number + +
+ integer +
+
+ +
6 bit decimal number starting from 1 <1-63>
+
+
+ upstream_core_tree + +
+ dictionary +
+
+ +
BGP Leaf AD core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ vpn_distinguisher + +
+ integer +
+
+ +
BGP VPN distinguisher (VD) attribute
+
+
+ weight + +
+ integer +
+
+ +
Weight attribute for route selection
+
+
+ suppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Suppress specific routes when aggregating
+
+
+ unsuppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Unsuppress specific aggregated routes
+
+
+ elseif_section + +
+ list + / elements=dictionary +
+
+ +
A list of elif configurations that would follow along with the top level if
+
+
+ add + +
+ dictionary +
+
+ +
Add offset to the existing value
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ rip_metric + +
+ integer +
+
+ +
<0-16> RIP metric attribute
+
+
+ apply + +
+ list + / elements=dictionary +
+
+ +
Apply a route policy
+
+
+ route_policy + +
+ string +
+
+ +
Apply a specific route policy
+
+
+ route_policy_input + +
+ string +
+
+ +
ipv4/ ipv6 / name-string
+
+
+ condition + +
+ string +
+
+ +
the condition string, eg - aigp-metric eq 23 and as-path in tmp1 and community is-empty and community matches-any test1 (don't add then at end)
+
+
+ drop + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Reject this route with no further processing
+
+
+ pass + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Pass this route for further processing
+
+
+ prepend + +
+ dictionary +
+
+ +
Prepend to BGP AS-path
+
+
+ as_path + +
+ integer +
+
+ +
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path
+
+
+ most_recent + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Most recent Autonomous System Number
+
+
+ number_of_times + +
+ integer +
+
+ +
number of times to prepend
+
+
+ own_as + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Local Autonomous System Number
+
+
+ remove + +
+ dictionary +
+
+ +
Remove all private-as entries
+
+
+ entire_aspath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove private-AS from entire aspath
+
+
+ set + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove all private-as entries (remove as-path private-as)
+
+
+ set + +
+ dictionary +
+
+ +
Set a route attribute
+
+
+ administrative_distance + +
+ integer +
+
+ +
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe
+
+
+ aigp_metric + +
+ dictionary +
+
+ +
AIGP metric attribute
+
+
+ decrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
- Decrement the attribute by specified value
+
+
+ icrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
+ Increment the attribute with specified value
+
+
+ igp_cost + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Internal routing protocol cost
+
+
+ metric_number + +
+ integer +
+
+ +
<0-4294967295> 32-bit decimal number
+
+
+ attribute_set + +
+ string +
+
+ +
TE attribute-set name <0-4294967295> 32-bit decimal number
+
+
+ c_multicast_routing + +
+ dictionary +
+
+ +
Multicast Customer routing type
+
+
+ bgp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP customer-multicast routing
+
+
+ pim + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM customer-multicast routing
+
+
+ community + +
+ dictionary +
+
+ +
BGP community attribute
+
+
+ additive + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Add to the existing community
+
+
+ community_name + +
+ string +
+
+ +
Community set name
+
+
+ core_tree + +
+ dictionary +
+
+ +
Multicast Distribution Tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ ingress_replication_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Default MDT core
+
+
+ ingress_replication_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Partitioned MDT core
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ mldp_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Default MDT core
+
+
+ mldp_inband + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Inband core
+
+
+ mldp_partitioned_mp2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned MP2MP MDT core
+
+
+ mldp_partitioned_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned P2MP MDT core
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ p2mp_te_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Default MDT core
+
+
+ p2mp_te_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Partitioned MDT core
+
+
+ pim_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM Default MDT core
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ dampening + +
+ dictionary +
+
+ +
BGP route flap dampening parameters
+
+
+ halflife + +
+ integer +
+
+ +
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15
+
+
+ max_suppress + +
+ integer +
+
+ +
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60
+
+
+ reuse + +
+ integer +
+
+ +
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750
+
+
+ suppress + +
+ integer +
+
+ +
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000
+
+
+ downstream_core_tree + +
+ dictionary +
+
+ +
BGP I-PMSI/S-PMSI core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ fallback_vrf_lookup + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
fallback vrf look-up
+
+
+ flow_tag + +
+ integer +
+
+ +
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1
+
+
+ forward_class + +
+ integer +
+
+ +
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1
+
+
+ ip_precedence + +
+ integer +
+
+ +
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1
+
+
+ isis_metric + +
+ integer +
+
+ +
IS-IS metric attribute, <0-16777215> 24 bit decimal number
+
+
+ label + +
+ integer +
+
+ +
Set BGP label value, <0-1048575> 20 bit decimal number
+
+
+ label_index + +
+ integer +
+
+ +
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number
+
+
+ label_mode + +
+ dictionary +
+
+ +
Set BGP label-mode value
+
+
+ per_ce + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-ce
+
+
+ per_prefix + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-prefix
+
+
+ per_vrf + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-vrf
+
+
+ large_community + +
+ string +
+
+ +
BGP large community attribute
+
+
+ level + +
+ dictionary +
+
+ +
Where to import route
+
+
+ level_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 routes
+
+
+ level_1_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 and level-2 routes
+
+
+ level_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-2 routes
+
+
+ load_balance + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Load-balance for ECMP ecmp-consistent
+
+
+ lsm_root + +
+ string +
+
+ +
Label Switched Multicast Root address
+
+
+ metric_type + +
+ dictionary +
+
+ +
Type of metric for destination routing protocol
+
+
+ external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rib_metric_as_external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ rib_metric_as_internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS internal metric-type
+
+
+ type_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-1 route
+
+
+ type_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-2 route
+
+
+ mpls + +
+ string +
+
+ +
MPLS traffic-eng attributeset name-string
+
+
+ next_hop + +
+ dictionary +
+
+ +
Next hop address specified in this route
+
+
+ address + +
+ string +
+
+ +
next hop address
+
+
+ origin + +
+ dictionary +
+
+ +
BGP origin code
+
+
+ egp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ igp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rincomplete + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ ospf_metric + +
+ integer +
+
+ +
OSPF metric attribute
+
+
+ path_color + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP Path Color for RIB (path-color external-reach)
+
+
+ path_selection + +
+ dictionary +
+
+ +
BGP path selection
+
+
+ all + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP all advertise
+
+
+ backup + +
+ dictionary +
+
+ +
BGP backup
+
+
+ advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise the path
+
+
+ backup_decimal + +
+ integer +
+
+ +
<1>, decimal number 1
+
+
+ install + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Install the path
+
+
+ best_path + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP best path
+
+
+ group_best + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP group-best advertise
+
+
+ multiplath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP multipath advertise
+
+
+ qos_group + +
+ integer +
+
+ +
QoS Group to classify packets
+
+
+ rib_metric + +
+ integer +
+
+ +
RIB metric for table-policy
+
+
+ rip_metric + +
+ integer +
+
+ +
RIP metric attribute
+
+
+ rip_tag + +
+ integer +
+
+ +
RIP Route tag attribute
+
+
+ rt_set + +
+ integer +
+
+ +
Limit on routes with paths with an RT-set
+
+
+ s_pmsi + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
S-PMSI Advertisement type (star-g)
+
+
+ spf_priority + +
+ dictionary +
+
+ +
OSPF SPF priority
+
+
+ critical + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Critical priority
+
+
+ high + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
High priority
+
+
+ medium + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Medium priority
+
+
+ static_p2mp_te + +
+ string +
+
+ +
Static P2MP-TE tunnel
+
+
+ tag + +
+ integer +
+
+ +
Route tag attribute
+
+
+ traffic_index + +
+ dictionary +
+
+ +
Traffic-index for BGP policy accounting
+
+
+ ignore + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove any traffic-index setting
+
+
+ index_number + +
+ integer +
+
+ +
6 bit decimal number starting from 1 <1-63>
+
+
+ upstream_core_tree + +
+ dictionary +
+
+ +
BGP Leaf AD core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ vpn_distinguisher + +
+ integer +
+
+ +
BGP VPN distinguisher (VD) attribute
+
+
+ weight + +
+ integer +
+
+ +
Weight attribute for route selection
+
+
+ suppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Suppress specific routes when aggregating
+
+
+ unsuppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Unsuppress specific aggregated routes
+
+
+ global + +
+ dictionary +
+
+ +
A dictionary of configurations for route policy without any conditions
+
+
+ add + +
+ dictionary +
+
+ +
Add offset to the existing value
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ rip_metric + +
+ integer +
+
+ +
<0-16> RIP metric attribute
+
+
+ apply + +
+ list + / elements=dictionary +
+
+ +
Apply a route policy
+
+
+ route_policy + +
+ string +
+
+ +
Apply a specific route policy
+
+
+ route_policy_input + +
+ string +
+
+ +
ipv4/ ipv6 / name-string
+
+
+ drop + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Reject this route with no further processing
+
+
+ pass + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Pass this route for further processing
+
+
+ prepend + +
+ dictionary +
+
+ +
Prepend to BGP AS-path
+
+
+ as_path + +
+ integer +
+
+ +
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path
+
+
+ most_recent + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Most recent Autonomous System Number
+
+
+ number_of_times + +
+ integer +
+
+ +
number of times to prepend
+
+
+ own_as + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Local Autonomous System Number
+
+
+ remove + +
+ dictionary +
+
+ +
Remove all private-as entries
+
+
+ entire_aspath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove private-AS from entire aspath
+
+
+ set + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove all private-as entries (remove as-path private-as)
+
+
+ set + +
+ dictionary +
+
+ +
Set a route attribute
+
+
+ administrative_distance + +
+ integer +
+
+ +
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe
+
+
+ aigp_metric + +
+ dictionary +
+
+ +
AIGP metric attribute
+
+
+ decrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
- Decrement the attribute by specified value
+
+
+ icrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
+ Increment the attribute with specified value
+
+
+ igp_cost + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Internal routing protocol cost
+
+
+ metric_number + +
+ integer +
+
+ +
<0-4294967295> 32-bit decimal number
+
+
+ attribute_set + +
+ string +
+
+ +
TE attribute-set name <0-4294967295> 32-bit decimal number
+
+
+ c_multicast_routing + +
+ dictionary +
+
+ +
Multicast Customer routing type
+
+
+ bgp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP customer-multicast routing
+
+
+ pim + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM customer-multicast routing
+
+
+ community + +
+ dictionary +
+
+ +
BGP community attribute
+
+
+ additive + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Add to the existing community
+
+
+ community_name + +
+ string +
+
+ +
Community set name
+
+
+ core_tree + +
+ dictionary +
+
+ +
Multicast Distribution Tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ ingress_replication_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Default MDT core
+
+
+ ingress_replication_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Partitioned MDT core
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ mldp_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Default MDT core
+
+
+ mldp_inband + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Inband core
+
+
+ mldp_partitioned_mp2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned MP2MP MDT core
+
+
+ mldp_partitioned_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned P2MP MDT core
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ p2mp_te_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Default MDT core
+
+
+ p2mp_te_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Partitioned MDT core
+
+
+ pim_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM Default MDT core
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ dampening + +
+ dictionary +
+
+ +
BGP route flap dampening parameters
+
+
+ halflife + +
+ integer +
+
+ +
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15
+
+
+ max_suppress + +
+ integer +
+
+ +
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60
+
+
+ reuse + +
+ integer +
+
+ +
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750
+
+
+ suppress + +
+ integer +
+
+ +
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000
+
+
+ downstream_core_tree + +
+ dictionary +
+
+ +
BGP I-PMSI/S-PMSI core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ fallback_vrf_lookup + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
fallback vrf look-up
+
+
+ flow_tag + +
+ integer +
+
+ +
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1
+
+
+ forward_class + +
+ integer +
+
+ +
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1
+
+
+ ip_precedence + +
+ integer +
+
+ +
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1
+
+
+ isis_metric + +
+ integer +
+
+ +
IS-IS metric attribute, <0-16777215> 24 bit decimal number
+
+
+ label + +
+ integer +
+
+ +
Set BGP label value, <0-1048575> 20 bit decimal number
+
+
+ label_index + +
+ integer +
+
+ +
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number
+
+
+ label_mode + +
+ dictionary +
+
+ +
Set BGP label-mode value
+
+
+ per_ce + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-ce
+
+
+ per_prefix + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-prefix
+
+
+ per_vrf + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-vrf
+
+
+ large_community + +
+ string +
+
+ +
BGP large community attribute
+
+
+ level + +
+ dictionary +
+
+ +
Where to import route
+
+
+ level_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 routes
+
+
+ level_1_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 and level-2 routes
+
+
+ level_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-2 routes
+
+
+ load_balance + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Load-balance for ECMP ecmp-consistent
+
+
+ lsm_root + +
+ string +
+
+ +
Label Switched Multicast Root address
+
+
+ metric_type + +
+ dictionary +
+
+ +
Type of metric for destination routing protocol
+
+
+ external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rib_metric_as_external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ rib_metric_as_internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS internal metric-type
+
+
+ type_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-1 route
+
+
+ type_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-2 route
+
+
+ mpls + +
+ string +
+
+ +
MPLS traffic-eng attributeset name-string
+
+
+ next_hop + +
+ dictionary +
+
+ +
Next hop address specified in this route
+
+
+ address + +
+ string +
+
+ +
next hop address
+
+
+ origin + +
+ dictionary +
+
+ +
BGP origin code
+
+
+ egp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ igp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rincomplete + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ ospf_metric + +
+ integer +
+
+ +
OSPF metric attribute
+
+
+ path_color + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP Path Color for RIB (path-color external-reach)
+
+
+ path_selection + +
+ dictionary +
+
+ +
BGP path selection
+
+
+ all + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP all advertise
+
+
+ backup + +
+ dictionary +
+
+ +
BGP backup
+
+
+ advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise the path
+
+
+ backup_decimal + +
+ integer +
+
+ +
<1>, decimal number 1
+
+
+ install + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Install the path
+
+
+ best_path + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP best path
+
+
+ group_best + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP group-best advertise
+
+
+ multiplath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP multipath advertise
+
+
+ qos_group + +
+ integer +
+
+ +
QoS Group to classify packets
+
+
+ rib_metric + +
+ integer +
+
+ +
RIB metric for table-policy
+
+
+ rip_metric + +
+ integer +
+
+ +
RIP metric attribute
+
+
+ rip_tag + +
+ integer +
+
+ +
RIP Route tag attribute
+
+
+ rt_set + +
+ integer +
+
+ +
Limit on routes with paths with an RT-set
+
+
+ s_pmsi + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
S-PMSI Advertisement type (star-g)
+
+
+ spf_priority + +
+ dictionary +
+
+ +
OSPF SPF priority
+
+
+ critical + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Critical priority
+
+
+ high + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
High priority
+
+
+ medium + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Medium priority
+
+
+ static_p2mp_te + +
+ string +
+
+ +
Static P2MP-TE tunnel
+
+
+ tag + +
+ integer +
+
+ +
Route tag attribute
+
+
+ traffic_index + +
+ dictionary +
+
+ +
Traffic-index for BGP policy accounting
+
+
+ ignore + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove any traffic-index setting
+
+
+ index_number + +
+ integer +
+
+ +
6 bit decimal number starting from 1 <1-63>
+
+
+ upstream_core_tree + +
+ dictionary +
+
+ +
BGP Leaf AD core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ vpn_distinguisher + +
+ integer +
+
+ +
BGP VPN distinguisher (VD) attribute
+
+
+ weight + +
+ integer +
+
+ +
Weight attribute for route selection
+
+
+ suppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Suppress specific routes when aggregating
+
+
+ unsuppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Unsuppress specific aggregated routes
+
+
+ if_section + +
+ dictionary +
+
+ +
A dictionary of configurations for route policy for the top level if condition for the policy
+
+
+ add + +
+ dictionary +
+
+ +
Add offset to the existing value
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ rip_metric + +
+ integer +
+
+ +
<0-16> RIP metric attribute
+
+
+ apply + +
+ list + / elements=dictionary +
+
+ +
Apply a route policy
+
+
+ route_policy + +
+ string +
+
+ +
Apply a specific route policy
+
+
+ route_policy_input + +
+ string +
+
+ +
ipv4/ ipv6 / name-string
+
+
+ condition + +
+ string +
+
+ +
the condition string, eg - aigp-metric eq 23 and as-path in tmp1 and community is-empty and community matches-any test1 (don't add then at end)
+
+
+ drop + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Reject this route with no further processing
+
+
+ pass + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Pass this route for further processing
+
+
+ prepend + +
+ dictionary +
+
+ +
Prepend to BGP AS-path
+
+
+ as_path + +
+ integer +
+
+ +
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path
+
+
+ most_recent + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Most recent Autonomous System Number
+
+
+ number_of_times + +
+ integer +
+
+ +
number of times to prepend
+
+
+ own_as + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Local Autonomous System Number
+
+
+ remove + +
+ dictionary +
+
+ +
Remove all private-as entries
+
+
+ entire_aspath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove private-AS from entire aspath
+
+
+ set + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove all private-as entries (remove as-path private-as)
+
+
+ set + +
+ dictionary +
+
+ +
Set a route attribute
+
+
+ administrative_distance + +
+ integer +
+
+ +
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe
+
+
+ aigp_metric + +
+ dictionary +
+
+ +
AIGP metric attribute
+
+
+ decrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
- Decrement the attribute by specified value
+
+
+ icrement + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
+ Increment the attribute with specified value
+
+
+ igp_cost + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Internal routing protocol cost
+
+
+ metric_number + +
+ integer +
+
+ +
<0-4294967295> 32-bit decimal number
+
+
+ attribute_set + +
+ string +
+
+ +
TE attribute-set name <0-4294967295> 32-bit decimal number
+
+
+ c_multicast_routing + +
+ dictionary +
+
+ +
Multicast Customer routing type
+
+
+ bgp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP customer-multicast routing
+
+
+ pim + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM customer-multicast routing
+
+
+ community + +
+ dictionary +
+
+ +
BGP community attribute
+
+
+ additive + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Add to the existing community
+
+
+ community_name + +
+ string +
+
+ +
Community set name
+
+
+ core_tree + +
+ dictionary +
+
+ +
Multicast Distribution Tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ ingress_replication_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Default MDT core
+
+
+ ingress_replication_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication Partitioned MDT core
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ mldp_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Default MDT core
+
+
+ mldp_inband + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Inband core
+
+
+ mldp_partitioned_mp2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned MP2MP MDT core
+
+
+ mldp_partitioned_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP Partitioned P2MP MDT core
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ p2mp_te_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Default MDT core
+
+
+ p2mp_te_partitioned + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE Partitioned MDT core
+
+
+ pim_default + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
PIM Default MDT core
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ dampening + +
+ dictionary +
+
+ +
BGP route flap dampening parameters
+
+
+ halflife + +
+ integer +
+
+ +
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15
+
+
+ max_suppress + +
+ integer +
+
+ +
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60
+
+
+ reuse + +
+ integer +
+
+ +
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750
+
+
+ suppress + +
+ integer +
+
+ +
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000
+
+
+ downstream_core_tree + +
+ dictionary +
+
+ +
BGP I-PMSI/S-PMSI core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ eigrp_metric + +
+ dictionary +
+
+ +
EIGRP metric attribute
+
+
+ bandwidth + +
+ integer +
+
+ +
<0-4294967295> Bandwidth in Kbits per second
+
+
+ delay + +
+ integer +
+
+ +
<0-4294967295> Delay metric in 10 microsecond units
+
+
+ effective_bandwith + +
+ integer +
+
+ +
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded
+
+
+ max_transmission + +
+ integer +
+
+ +
<0-65535> Maximum Transmission Unit metric of the path
+
+
+ reliability + +
+ integer +
+
+ +
<0-255> Reliability metric where 255 is 100% reliable
+
+
+ fallback_vrf_lookup + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
fallback vrf look-up
+
+
+ flow_tag + +
+ integer +
+
+ +
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1
+
+
+ forward_class + +
+ integer +
+
+ +
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1
+
+
+ ip_precedence + +
+ integer +
+
+ +
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1
+
+
+ isis_metric + +
+ integer +
+
+ +
IS-IS metric attribute, <0-16777215> 24 bit decimal number
+
+
+ label + +
+ integer +
+
+ +
Set BGP label value, <0-1048575> 20 bit decimal number
+
+
+ label_index + +
+ integer +
+
+ +
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number
+
+
+ label_mode + +
+ dictionary +
+
+ +
Set BGP label-mode value
+
+
+ per_ce + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-ce
+
+
+ per_prefix + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-prefix
+
+
+ per_vrf + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Set the label mode to per-vrf
+
+
+ large_community + +
+ string +
+
+ +
BGP large community attribute
+
+
+ level + +
+ dictionary +
+
+ +
Where to import route
+
+
+ level_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 routes
+
+
+ level_1_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-1 and level-2 routes
+
+
+ level_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
IS-IS level-2 routes
+
+
+ load_balance + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Load-balance for ECMP ecmp-consistent
+
+
+ lsm_root + +
+ string +
+
+ +
Label Switched Multicast Root address
+
+
+ metric_type + +
+ dictionary +
+
+ +
Type of metric for destination routing protocol
+
+
+ external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rib_metric_as_external + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ rib_metric_as_internal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS internal metric-type
+
+
+ type_1 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-1 route
+
+
+ type_2 + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
OSPF type-2 route
+
+
+ mpls + +
+ string +
+
+ +
MPLS traffic-eng attributeset name-string
+
+
+ next_hop + +
+ dictionary +
+
+ +
Next hop address specified in this route
+
+
+ address + +
+ string +
+
+ +
next hop address
+
+
+ origin + +
+ dictionary +
+
+ +
BGP origin code
+
+
+ egp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS external metric-type
+
+
+ igp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
ISIS internal metric-type
+
+
+ rincomplete + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Use RIB metric and set ISIS external metric-type
+
+
+ ospf_metric + +
+ integer +
+
+ +
OSPF metric attribute
+
+
+ path_color + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP Path Color for RIB (path-color external-reach)
+
+
+ path_selection + +
+ dictionary +
+
+ +
BGP path selection
+
+
+ all + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP all advertise
+
+
+ backup + +
+ dictionary +
+
+ +
BGP backup
+
+
+ advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise the path
+
+
+ backup_decimal + +
+ integer +
+
+ +
<1>, decimal number 1
+
+
+ install + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Install the path
+
+
+ best_path + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP best path
+
+
+ group_best + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP group-best advertise
+
+
+ multiplath + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
BGP multipath advertise
+
+
+ qos_group + +
+ integer +
+
+ +
QoS Group to classify packets
+
+
+ rib_metric + +
+ integer +
+
+ +
RIB metric for table-policy
+
+
+ rip_metric + +
+ integer +
+
+ +
RIP metric attribute
+
+
+ rip_tag + +
+ integer +
+
+ +
RIP Route tag attribute
+
+
+ rt_set + +
+ integer +
+
+ +
Limit on routes with paths with an RT-set
+
+
+ s_pmsi + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
S-PMSI Advertisement type (star-g)
+
+
+ spf_priority + +
+ dictionary +
+
+ +
OSPF SPF priority
+
+
+ critical + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Critical priority
+
+
+ high + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
High priority
+
+
+ medium + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Medium priority
+
+
+ static_p2mp_te + +
+ string +
+
+ +
Static P2MP-TE tunnel
+
+
+ tag + +
+ integer +
+
+ +
Route tag attribute
+
+
+ traffic_index + +
+ dictionary +
+
+ +
Traffic-index for BGP policy accounting
+
+
+ ignore + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Remove any traffic-index setting
+
+
+ index_number + +
+ integer +
+
+ +
6 bit decimal number starting from 1 <1-63>
+
+
+ upstream_core_tree + +
+ dictionary +
+
+ +
BGP Leaf AD core tree type
+
+
+ ingress_replication + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Ingress Replication core segment
+
+
+ mldp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
MLDP core segment
+
+
+ p2mp_te + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
P2MP TE core segment
+
+
+ sr_p2mp + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Segment-Routing P2MP core
+
+
+ vpn_distinguisher + +
+ integer +
+
+ +
BGP VPN distinguisher (VD) attribute
+
+
+ weight + +
+ integer +
+
+ +
Weight attribute for route selection
+
+
+ suppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Suppress specific routes when aggregating
+
+
+ unsuppress_route + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Unsuppress specific aggregated routes
+
+
+ name + +
+ string +
+
+ +
Name of the route policy.
+
+
+ running_config + +
+ string +
+
+ +
This option is used only with state parsed.
+
The value of this option should be and aggregate of the output received from the IOS XR device by executing the command show running-config route-policy <policy_name> for per route-policy.
+
The state parsed reads the configuration from 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 parsed key within the result.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • merged ←
  • +
  • replaced
  • +
  • overridden
  • +
  • purged
  • +
  • rendered
  • +
  • gathered
  • +
  • parsed
  • +
+
+
The state the configuration should be left in
+
The states rendered, gathered and parsed does not perform any change on the device.
+
The state rendered will transform the configuration in config option to platform specific CLI commands which will be returned in the rendered key within the result. For state rendered active connection to remote host is not required.
+
The state 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 gathered key within the result.
+
The state parsed reads the configuration from running_config option and transforms it into JSON format as per the resource module parameters and the value is returned in the parsed key within the result. The value of running_config option should be the aggregate of the output of command show running-config route-policy <policy_name> that gives individual route-policy details and executed on device. For state parsed active connection to remote host is not required.
+
+
+ + +Notes +----- + +.. note:: + - Tested against Cisco IOS-XR 7.2.2. + - This module works with connection ``network_cli``. + + + +Examples +-------- + +.. code-block:: yaml + + # Using merged + + # Before state: + # ------------- + # + # viosxr#show running-config | include route-policy + # + + - name: Merge route-policy configuration + cisco.iosxr.iosxr_route_maps: + state: merged + config: + - global: + apply: + - route_policy: A_NEW_ROUTE_POLICY + set: + community: + additive: true + community_name: (11011:1001) + weight: 20000 + name: SIMPLE_GLOBAL_ROUTE_POLICY + - else_section: + global: + drop: true + if_section: + condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + pass: true + name: SIMPLE_CONDITION_ROUTE_POLICY + - else_section: + else_section: + drop: true + if_section: + condition: destination in A_RANDOM_POLICY + pass: true + set: + community: + additive: true + community_name: (101010:1) + if_section: + condition: as-path in (ios-regex '_3117_', ios-regex '_600_') + drop: true + name: COMPLEX_ROUTE_POLICY + - else_section: + global: + pass: true + if_section: + condition: community matches-any (9119:1001) or community matches-any (11100:1001) + drop: true + name: COMPLEX_CONDITION_ROUTE_POLICY + + # Task Output + # ----------- + # + # before: + # - {} + # commands: + # - route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # - apply A_NEW_ROUTE_POLICY + # - set community (11011:1001) additive + # - set weight 20000 + # - end-policy + # - route-policy SIMPLE_CONDITION_ROUTE_POLICY + # - if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # - pass + # - else + # - drop + # - endif + # - end-policy + # - route-policy COMPLEX_ROUTE_POLICY + # - if as-path in (ios-regex '_3117_', ios-regex '_600_') then + # - drop + # - else + # - if destination in A_RANDOM_POLICY then + # - pass + # - set community (101010:1) additive + # - else + # - drop + # - endif + # - endif + # - end-policy + # - route-policy COMPLEX_CONDITION_ROUTE_POLICY + # - if community matches-any (9119:1001) or community matches-any (11100:1001) then + # - drop + # - else + # - pass + # - endif + # - end-policy + # after: + # - global: + # apply: + # - route_policy: A_NEW_ROUTE_POLICY + # set: + # community: + # additive: true + # community_name: (11011:1001) + # weight: 20000 + # name: SIMPLE_GLOBAL_ROUTE_POLICY + # - else_section: + # global: + # drop: true + # if_section: + # condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + # pass: true + # name: SIMPLE_CONDITION_ROUTE_POLICY + # - else_section: + # else_section: + # drop: true + # if_section: + # condition: destination in A_RANDOM_POLICY + # pass: true + # set: + # community: + # additive: true + # community_name: (101010:1) + # if_section: + # condition: as-path in (ios-regex '_3117_', ios-regex '_600_') + # drop: true + # name: COMPLEX_ROUTE_POLICY + # - else_section: + # global: + # pass: true + # if_section: + # condition: community matches-any (9119:1001) or community matches-any (11100:1001) + # drop: true + # name: COMPLEX_CONDITION_ROUTE_POLICY + + # After state: + # ------------- + # + # viosxr#show running-config | include route-policy + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy COMPLEX_ROUTE_POLICY + # route-policy COMPLEX_CONDITION_ROUTE_POLICY + # + # viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # set weight 20000 + # set local-preference 200 + # set community (11011:1001) additive + # apply A_NEW_ROUTE_POLICY + # end-policy + # viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # pass + # else + # drop + # endif + # end-policy + # viosxr#show running-config route-policy COMPLEX_ROUTE_POLICY + # route-policy COMPLEX_ROUTE_POLICY + # if as-path in (ios-regex '_3117_', ios-regex '_600_') then + # drop + # else + # if destination in A_RANDOM_POLICY then + # pass + # set community (101010:1) additive + # set local-preference 200 + # else + # drop + # endif + # endif + # end-policy + # viosxr#show running-config route-policy COMPLEX_CONDITION_ROUTE_POLICY + # route-policy COMPLEX_CONDITION_ROUTE_POLICY + # if community matches-any (9119:1001) or community matches-any (11100:1001) then + # drop + # else + # pass + # endif + # end-policy + + # Using replaced + + # Before state: + # ------------- + # + # viosxr#show running-config | include route-policy + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy COMPLEX_ROUTE_POLICY + # route-policy COMPLEX_CONDITION_ROUTE_POLICY + # + # viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # set weight 20000 + # set local-preference 200 + # set community (11011:1001) additive + # apply A_NEW_ROUTE_POLICY + # end-policy + # viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # pass + # else + # drop + # endif + # end-policy + # viosxr#show running-config route-policy COMPLEX_ROUTE_POLICY + # route-policy COMPLEX_ROUTE_POLICY + # if as-path in (ios-regex '_3117_', ios-regex '_600_') then + # drop + # else + # if destination in A_RANDOM_POLICY then + # pass + # set community (101010:1) additive + # set local-preference 200 + # else + # drop + # endif + # endif + # end-policy + # viosxr#show running-config route-policy COMPLEX_CONDITION_ROUTE_POLICY + # route-policy COMPLEX_CONDITION_ROUTE_POLICY + # if community matches-any (9119:1001) or community matches-any (11100:1001) then + # drop + # else + # pass + # endif + # end-policy + + - name: Replace the route-policy configuration + cisco.iosxr.iosxr_route_maps: + state: replaced + config: + - global: + apply: + - route_policy: A_NEW_ROUTE_POLICY + set: + community: + additive: true + community_name: (11011:1001) + weight: 20000 + name: SIMPLE_GLOBAL_ROUTE_POLICY + - else_section: + global: + drop: true + if_section: + condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + pass: true + name: VERY_SIMPLE_CONDITION_ROUTE_POLICY + + # Task Output + # ----------- + # + # before: + # - global: + # apply: + # - route_policy: A_NEW_ROUTE_POLICY + # set: + # community: + # additive: true + # community_name: (11011:1001) + # weight: 20000 + # name: SIMPLE_GLOBAL_ROUTE_POLICY + # - else_section: + # global: + # drop: true + # if_section: + # condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + # pass: true + # name: SIMPLE_CONDITION_ROUTE_POLICY + # - else_section: + # else_section: + # drop: true + # if_section: + # condition: destination in A_RANDOM_POLICY + # pass: true + # set: + # community: + # additive: true + # community_name: (101010:1) + # if_section: + # condition: as-path in (ios-regex '_3117_', ios-regex '_600_') + # drop: true + # name: COMPLEX_ROUTE_POLICY + # - else_section: + # global: + # pass: true + # if_section: + # condition: community matches-any (9119:1001) or community matches-any (11100:1001) + # drop: true + # name: COMPLEX_CONDITION_ROUTE_POLICY + # commands: + # - route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY + # - if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # - pass + # - else + # - drop + # - endif + # - end-policy + # after: + # - global: + # apply: + # - route_policy: A_NEW_ROUTE_POLICY + # set: + # community: + # additive: true + # community_name: (11011:1001) + # weight: 20000 + # name: SIMPLE_GLOBAL_ROUTE_POLICY + # - else_section: + # global: + # drop: true + # if_section: + # condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + # pass: true + # name: SIMPLE_CONDITION_ROUTE_POLICY + # - else_section: + # else_section: + # drop: true + # if_section: + # condition: destination in A_RANDOM_POLICY + # pass: true + # set: + # community: + # additive: true + # community_name: (101010:1) + # if_section: + # condition: as-path in (ios-regex '_3117_', ios-regex '_600_') + # drop: true + # name: COMPLEX_ROUTE_POLICY + # - else_section: + # global: + # pass: true + # if_section: + # condition: community matches-any (9119:1001) or community matches-any (11100:1001) + # drop: true + # name: COMPLEX_CONDITION_ROUTE_POLICY + # - else_section: + # global: + # drop: true + # if_section: + # condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + # pass: true + # name: VERY_SIMPLE_CONDITION_ROUTE_POLICY + + # After state: + # ------------- + # + # viosxr#show running-config | include route-policy + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy COMPLEX_ROUTE_POLICY + # route-policy COMPLEX_CONDITION_ROUTE_POLICY + # route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY + # + # viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # set weight 20000 + # set local-preference 200 + # set community (11011:1001) additive + # apply A_NEW_ROUTE_POLICY + # end-policy + # viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # pass + # else + # drop + # endif + # end-policy + # viosxr#show running-config route-policy COMPLEX_ROUTE_POLICY + # route-policy COMPLEX_ROUTE_POLICY + # if as-path in (ios-regex '_3117_', ios-regex '_600_') then + # drop + # else + # if destination in A_RANDOM_POLICY then + # pass + # set community (101010:1) additive + # set local-preference 200 + # else + # drop + # endif + # endif + # end-policy + # viosxr#show running-config route-policy COMPLEX_CONDITION_ROUTE_POLICY + # route-policy COMPLEX_CONDITION_ROUTE_POLICY + # if community matches-any (9119:1001) or community matches-any (11100:1001) then + # drop + # else + # pass + # endif + # end-policy + # viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # pass + # else + # drop + # endif + # end-policy + # viosxr#show running-config route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # pass + # else + # drop + # endif + # end-policy + + # Using overridden + + # Before state: + # ------------- + # + # viosxr#show running-config | include route-policy + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy COMPLEX_ROUTE_POLICY + # route-policy COMPLEX_CONDITION_ROUTE_POLICY + # + # viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # set weight 20000 + # set local-preference 200 + # set community (11011:1001) additive + # apply A_NEW_ROUTE_POLICY + # end-policy + # viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # pass + # else + # drop + # endif + # end-policy + # viosxr#show running-config route-policy COMPLEX_ROUTE_POLICY + # route-policy COMPLEX_ROUTE_POLICY + # if as-path in (ios-regex '_3117_', ios-regex '_600_') then + # drop + # else + # if destination in A_RANDOM_POLICY then + # pass + # set community (101010:1) additive + # set local-preference 200 + # else + # drop + # endif + # endif + # end-policy + # viosxr#show running-config route-policy COMPLEX_CONDITION_ROUTE_POLICY + # route-policy COMPLEX_CONDITION_ROUTE_POLICY + # if community matches-any (9119:1001) or community matches-any (11100:1001) then + # drop + # else + # pass + # endif + # end-policy + + - name: Override the route-policy configuration + cisco.iosxr.iosxr_route_maps: + state: overridden + config: + - global: + apply: + - route_policy: A_NEW_ROUTE_POLICY + set: + community: + additive: true + community_name: (11011:1001) + weight: 20000 + name: SIMPLE_GLOBAL_ROUTE_POLICY + - else_section: + global: + drop: true + if_section: + condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + pass: true + name: VERY_SIMPLE_CONDITION_ROUTE_POLICY + + # Task Output + # ----------- + # + # before: + # - global: + # apply: + # - route_policy: A_NEW_ROUTE_POLICY + # set: + # community: + # additive: true + # community_name: (11011:1001) + # weight: 20000 + # name: SIMPLE_GLOBAL_ROUTE_POLICY + # - else_section: + # global: + # drop: true + # if_section: + # condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + # pass: true + # name: SIMPLE_CONDITION_ROUTE_POLICY + # - else_section: + # else_section: + # drop: true + # if_section: + # condition: destination in A_RANDOM_POLICY + # pass: true + # set: + # community: + # additive: true + # community_name: (101010:1) + # if_section: + # condition: as-path in (ios-regex '_3117_', ios-regex '_600_') + # drop: true + # name: COMPLEX_ROUTE_POLICY + # - else_section: + # global: + # pass: true + # if_section: + # condition: community matches-any (9119:1001) or community matches-any (11100:1001) + # drop: true + # name: COMPLEX_CONDITION_ROUTE_POLICY + # commands: + # - route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY + # - if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # - pass + # - else + # - drop + # - endif + # - end-policy + # - no route-policy SIMPLE_CONDITION_ROUTE_POLICY + # - no route-policy COMPLEX_ROUTE_POLICY + # - no route-policy COMPLEX_CONDITION_ROUTE_POLICY + # after: + # - global: + # apply: + # - route_policy: A_NEW_ROUTE_POLICY + # set: + # community: + # additive: true + # community_name: (11011:1001) + # weight: 20000 + # name: SIMPLE_GLOBAL_ROUTE_POLICY + # - else_section: + # global: + # drop: true + # if_section: + # condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + # pass: true + # name: VERY_SIMPLE_CONDITION_ROUTE_POLICY + + # After state: + # ------------- + # + # viosxr#show running-config | include route-policy + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY + # + # viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # set weight 20000 + # set local-preference 200 + # set community (11011:1001) additive + # apply A_NEW_ROUTE_POLICY + # end-policy + # viosxr#show running-config route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # pass + # else + # drop + # endif + # end-policy + + # Using purged + + # Before state: + # ------------- + # + # viosxr#show running-config | include route-policy + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy COMPLEX_ROUTE_POLICY + # + # viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # set weight 20000 + # set local-preference 200 + # set community (11011:1001) additive + # apply A_NEW_ROUTE_POLICY + # end-policy + # viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # pass + # else + # drop + # endif + # end-policy + # viosxr#show running-config route-policy COMPLEX_ROUTE_POLICY + # route-policy COMPLEX_ROUTE_POLICY + # if as-path in (ios-regex '_3117_', ios-regex '_600_') then + # drop + # else + # if destination in A_RANDOM_POLICY then + # pass + # set community (101010:1) additive + # set local-preference 200 + # else + # drop + # endif + # endif + # end-policy + + - name: Purge or remove route-policy configuration + cisco.iosxr.iosxr_route_maps: + state: purged + config: + - name: COMPLEX_ROUTE_POLICY_NO_EXIST + - name: COMPLEX_ROUTE_POLICY + + # Task Output + # ----------- + # + # before: + # - global: + # apply: + # - route_policy: A_NEW_ROUTE_POLICY + # set: + # community: + # additive: true + # community_name: (11011:1001) + # weight: 20000 + # name: SIMPLE_GLOBAL_ROUTE_POLICY + # - else_section: + # global: + # drop: true + # if_section: + # condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + # pass: true + # name: SIMPLE_CONDITION_ROUTE_POLICY + # - else_section: + # else_section: + # drop: true + # if_section: + # condition: destination in A_RANDOM_POLICY + # pass: true + # set: + # community: + # additive: true + # community_name: (101010:1) + # if_section: + # condition: as-path in (ios-regex '_3117_', ios-regex '_600_') + # drop: true + # name: COMPLEX_ROUTE_POLICY + # commands: + # - no route-policy COMPLEX_CONDITION_ROUTE_POLICY + # after: + # - global: + # apply: + # - route_policy: A_NEW_ROUTE_POLICY + # set: + # community: + # additive: true + # community_name: (11011:1001) + # weight: 20000 + # name: SIMPLE_GLOBAL_ROUTE_POLICY + # - else_section: + # global: + # drop: true + # if_section: + # condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + # pass: true + # name: SIMPLE_CONDITION_ROUTE_POLICY + + # After state: + # ------------- + # + # viosxr#show running-config | include route-policy + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # + # viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # set weight 20000 + # set local-preference 200 + # set community (11011:1001) additive + # apply A_NEW_ROUTE_POLICY + # end-policy + # viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # pass + # else + # drop + # endif + # end-policy + + # Using rendered + + - name: Render route-policy configuration + cisco.iosxr.iosxr_route_maps: + state: rendered + config: + - global: + apply: + - route_policy: A_NEW_ROUTE_POLICY + set: + community: + additive: true + community_name: (11011:1001) + weight: 20000 + name: SIMPLE_GLOBAL_ROUTE_POLICY + - else_section: + global: + drop: true + if_section: + condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + pass: true + name: SIMPLE_CONDITION_ROUTE_POLICY + - else_section: + else_section: + drop: true + if_section: + condition: destination in A_RANDOM_POLICY + pass: true + set: + community: + additive: true + community_name: (101010:1) + if_section: + condition: as-path in (ios-regex '_3117_', ios-regex '_600_') + drop: true + name: COMPLEX_ROUTE_POLICY + - else_section: + global: + pass: true + if_section: + condition: community matches-any (9119:1001) or community matches-any (11100:1001) + drop: true + name: COMPLEX_CONDITION_ROUTE_POLICY + + # Task Output + # ----------- + # + # rendered: + # - route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # - apply A_NEW_ROUTE_POLICY + # - set community (11011:1001) additive + # - set weight 20000 + # - end-policy + # - route-policy SIMPLE_CONDITION_ROUTE_POLICY + # - if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # - pass + # - else + # - drop + # - endif + # - end-policy + # - route-policy COMPLEX_ROUTE_POLICY + # - if as-path in (ios-regex '_3117_', ios-regex '_600_') then + # - drop + # - else + # - if destination in A_RANDOM_POLICY then + # - pass + # - set community (101010:1) additive + # - else + # - drop + # - endif + # - endif + # - end-policy + # - route-policy COMPLEX_CONDITION_ROUTE_POLICY + # - if community matches-any (9119:1001) or community matches-any (11100:1001) then + # - drop + # - else + # - pass + # - endif + # - end-policy + + # Using parsed + + # File: parsed.cfg + # ---------------- + # + # route-policy SIMPLE_GLOBAL_ROUTE_POLICY + # set weight 20000 + # set local-preference 200 + # set community (11011:1001) additive + # apply A_NEW_ROUTE_POLICY + # end-policy + # ! + # route-policy SIMPLE_CONDITION_ROUTE_POLICY + # if destination in SIMPLE_CONDITION_ROUTE_POLICY then + # pass + # else + # drop + # endif + # end-policy + # ! + # route-policy COMPLEX_ROUTE_POLICY + # if as-path in (ios-regex '_3117_', ios-regex '_600_') then + # drop + # else + # if destination in A_RANDOM_POLICY then + # pass + # set community (101010:1) additive + # set local-preference 200 + # else + # drop + # endif + # endif + # end-policy + # ! + # route-policy COMPLEX_CONDITION_ROUTE_POLICY + # if community matches-any (9119:1001) or community matches-any (11100:1001) then + # drop + # else + # pass + # endif + # end-policy + + - name: Parse the provided configuration + cisco.iosxr.iosxr_route_maps: + running_config: "{{ lookup('file', 'iosxr_route_maps_conf.cfg') }}" + state: parsed + + # Task Output + # ----------- + # + # parsed: + # - global: + # apply: + # - route_policy: A_NEW_ROUTE_POLICY + # set: + # community: + # additive: true + # community_name: (11011:1001) + # weight: 20000 + # name: SIMPLE_GLOBAL_ROUTE_POLICY + # - else_section: + # global: + # drop: true + # if_section: + # condition: destination in SIMPLE_CONDITION_ROUTE_POLICY + # pass: true + # name: SIMPLE_CONDITION_ROUTE_POLICY + # - else_section: + # else_section: + # drop: true + # if_section: + # condition: destination in A_RANDOM_POLICY + # pass: true + # set: + # community: + # additive: true + # community_name: (101010:1) + # if_section: + # condition: as-path in (ios-regex '_3117_', ios-regex '_600_') + # drop: true + # name: COMPLEX_ROUTE_POLICY + # - else_section: + # global: + # pass: true + # if_section: + # condition: community matches-any (9119:1001) or community matches-any (11100:1001) + # drop: true + # name: COMPLEX_CONDITION_ROUTE_POLICY + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ dictionary +
+
when changed +
The resulting configuration after module execution.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ before + +
+ dictionary +
+
when state is merged, replaced, overridden, purged or purged +
The configuration prior to the module execution.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ commands + +
+ list +
+
when state is merged, replaced, overridden, purged or purged +
The set of commands pushed to the remote device.
+
+
Sample:
+
['route-policy APPLY_TEST_ROUTE_POLICY_COMPLEX', 'if destination in DEFAULT then', 'pass']
+
+
+ gathered + +
+ list +
+
when state is gathered +
Facts about the network resource gathered from the remote device as structured data.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ parsed + +
+ list +
+
when state is parsed +
The device native config provided in running_config option parsed into structured data as per module argspec.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ rendered + +
+ list +
+
when state is rendered +
The provided configuration in the task rendered in device-native format (offline).
+
+
Sample:
+
['route-policy APPLY_TEST_ROUTE_POLICY_COMPLEX', 'if destination in DEFAULT then', 'pass']
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Sagar Paul (@KB-perByte) diff --git a/docs/cisco.iosxr.iosxr_vrf_address_family_module.rst b/docs/cisco.iosxr.iosxr_vrf_address_family_module.rst new file mode 100644 index 00000000..5eb54892 --- /dev/null +++ b/docs/cisco.iosxr.iosxr_vrf_address_family_module.rst @@ -0,0 +1,1342 @@ +.. _cisco.iosxr.iosxr_vrf_address_family_module: + + +************************************ +cisco.iosxr.iosxr_vrf_address_family +************************************ + +**Resource module to configure VRF Address family.** + + +Version added: 10.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- This module configures and manages the attributes of VRF address family on Cisco IOS-XR devices. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ list + / elements=dictionary +
+
+ +
VRF address family configuration.
+
+
+ address_families + +
+ list + / elements=dictionary +
+
+ +
Enable address family and enter its config mode - AFI/SAFI configuration
+
+
+ afi + +
+ string +
+
+
    Choices: +
  • ipv4
  • +
  • ipv6
  • +
+
+
Address Family Identifier (AFI)
+
+
+ export + +
+ dictionary +
+
+ +
VRF export
+
+
+ route_policy + +
+ string +
+
+ +
Use route_policy for export
+
+
+ route_target + +
+ string +
+
+ +
Specify export route target extended communities.
+
+
+ to + +
+ dictionary +
+
+ +
Export routes to a VRF
+
+
+ default_vrf + +
+ dictionary +
+
+ +
Export routes to default VRF
+
+
+ route_policy + +
+ string +
+
+ +
Use route_policy for export
+
+
+ vrf + +
+ dictionary +
+
+ +
Export routes to a VRF
+
+
+ allow_imported_vpn + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Allow export of imported VPN routes to non-default VRF
+
+
+ import_config + +
+ dictionary +
+
+ +
VRF import
+
+
+ from_config + +
+ dictionary +
+
+ +
Import routes from a VRF
+
+
+ bridge_domain + +
+ dictionary +
+
+ +
VRF import
+
+
+ advertise_as_vpn + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise local EVPN imported routes to PEs
+
+
+ default_vrf + +
+ dictionary +
+
+ +
Export routes to default VRF
+
+
+ route_policy + +
+ string +
+
+ +
Use route_policy for export
+
+
+ vrf + +
+ dictionary +
+
+ +
Import routes from a VRF
+
+
+ advertise_as_vpn + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise local EVPN imported routes to PEs
+
+
+ route_policy + +
+ string +
+
+ +
Use route_policy for export
+
+
+ route_target + +
+ string +
+
+ +
Specify export route target extended communities.
+
+
+ maximum + +
+ dictionary +
+
+ +
Set maximum prefix limit
+
+
+ prefix + +
+ integer +
+
+ +
Set table's maximum prefix limit.
+
+
+ safi + +
+ string +
+
+
    Choices: +
  • flowspec
  • +
  • multicast
  • +
  • unicast
  • +
+
+
Address Family modifier
+
+
+ name + +
+ string + / required +
+
+ +
Name of the VRF.
+
+
+ running_config + +
+ string +
+
+ +
This option is used only with state parsed.
+
The value of this option should be the output received from the IOS-XR device by executing the command show running-config vrf.
+
The state parsed reads the configuration from 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 parsed key within the result.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • parsed
  • +
  • gathered
  • +
  • deleted
  • +
  • merged ←
  • +
  • replaced
  • +
  • rendered
  • +
  • overridden
  • +
+
+
The state the configuration should be left in
+
The states rendered, gathered and parsed does not perform any change on the device.
+
The state rendered will transform the configuration in config option to platform specific CLI commands which will be returned in the rendered key within the result. For state rendered active connection to remote host is not required.
+
The state 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 gathered key within the result.
+
The state parsed reads the configuration from running_config option and transforms it into JSON format as per the resource module parameters and the value is returned in the parsed key within the result. The value of running_config option should be the same format as the output of command show running-config vrf. connection to remote host is not required.
+
+
+ + +Notes +----- + +.. note:: + - Tested against Cisco IOSXR Version 10.0.0 + - This module works with connection ``network_cli``. See `the IOS_XR Platform Options <../network/user_guide/platform_iosxr.html>`_ + - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide ` + - For more information on using Ansible to manage Cisco devices see the `Cisco integration page `. + + + +Examples +-------- + +.. code-block:: yaml + + # Using merged + # + # Before state: + # ------------- + # + # RP/0/0/CPU0:iosxr#show running-config vrf + # vrf test + # + + - name: Merge provided configuration with device configuration + cisco.iosxr.iosxr_vrf_address_family: + config: + - name: VRF4 + address_families: + - afi: "ipv4" + safi: "unicast" + export: + route_target: "192.0.2.1:400" + route_policy: "rm-policy" + to: + default_vrf: + route_policy: "rm-policy" + vrf: + allow_imported_vpn: true + import_config: + route_target: "192.0.2.6:200" + route_policy: "test-policy" + from_config: + bridge_domain: + advertise_as_vpn: true + default_vrf: + route_policy: "test-policy" + vrf: + advertise_as_vpn: true + maximum: + prefix: 100 + state: merged + + # Task Output: + # ------------ + # + # before: [] + # + # commands: + # - vrf VRF4 + # - address-family ipv4 unicast + # - export route-policy rm-policy + # - export route-target 192.0.2.1:400 + # - export to default-vrf route-policy rm-policy + # - export to vrf allow-imported-vpn + # - import route-target 192.0.2.6:200 + # - import route-policy test-policy + # - import from bridge-domain advertise-as-vpn + # - import from default-vrf route-policy test-policy + # - import from vrf advertise-as-vpn + # - maximum prefix 100 + # + # after: + # - name: VRF4 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # export: + # route_target: "192.0.2.1:400" + # route_policy: "rm-policy" + # to: + # default_vrf: + # route_policy: "rm-policy" + # vrf: + # allow_imported_vpn: true + # import_config: + # route_target: "192.0.2.6:200" + # route_policy: "test-policy" + # from_config: + # bridge_domain: + # advertise_as_vpn: true + # default_vrf: + # route_policy: "test-policy" + # vrf: + # advertise_as_vpn: true + # maximum: + # prefix: 100 + # + # After state: + # ------------ + # + # RP/0/0/CPU0:iosxr#show running-config vrf + # vrf VRF4 + # address-family ipv4 unicast + # export route-policy rm-policy + # export route-target 192.0.2.1:400 + # export to default-vrf route-policy rm-policy + # export to vrf allow-imported-vpn + # import route-target 192.0.2.6:200 + # import route-policy test-policy + # import from bridge-domain advertise-as-vpn + # import from default-vrf route-policy test-policy + # import from vrf advertise-as-vpn + # maximum prefix 100 + + # Using replaced + # + # Before state: + # ------------- + # + # RP/0/0/CPU0:iosxr#show running-config vrf + # vrf VRF4 + # address-family ipv4 unicast + # export route-policy rm-policy + # export route-target 192.0.2.1:400 + # export to default-vrf route-policy rm-policy + # export to vrf allow-imported-vpn + # import route-target 192.0.2.6:200 + # import route-policy test-policy + # import from bridge-domain advertise-as-vpn + # import from default-vrf route-policy test-policy + # import from vrf advertise-as-vpn + # maximum prefix 100 + + - name: Replace the provided configuration with the existing running configuration + cisco.iosxr.iosxr_vrf_address_family: + config: + - name: VRF7 + address_families: + - afi: "ipv4" + safi: "unicast" + export: + route_target: "192.0.2.2:400" + route_policy: "rm-policy" + to: + default_vrf: + route_policy: "rm-policy" + vrf: + allow_imported_vpn: true + import_config: + route_target: "192.0.2.4:400" + route_policy: "test-policy" + from_config: + bridge_domain: + advertise_as_vpn: true + default_vrf: + route_policy: "test-policy" + vrf: + advertise_as_vpn: true + maximum: + prefix: 200 + state: replaced + + # Task Output: + # ------------ + # + # - name: VRF4 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # export: + # route_target: "192.0.2.1:400" + # route_policy: "rm-policy" + # to: + # default_vrf: + # route_policy: "rm-policy" + # vrf: + # allow_imported_vpn: true + # import_config: + # route_target: "192.0.2.6:200" + # route_policy: "test-policy" + # from_config: + # bridge_domain: + # advertise_as_vpn: true + # default_vrf: + # route_policy: "test-policy" + # vrf: + # advertise_as_vpn: true + # maximum: + # prefix: 100 + # + # commands: + # - vrf VRF7 + # - address-family ipv4 unicast + # - export route-policy rm-policy + # - export route-target 192.0.2.2:400 + # - export to default-vrf route-policy rm-policy + # - export to vrf allow-imported-vpn + # - import route-target 192.0.2.4:400 + # - import route-policy test-policy + # - import from bridge-domain advertise-as-vpn + # - import from default-vrf route-policy test-policy + # - import from vrf advertise-as-vpn + # - maximum prefix 200 + # + # after: + # - name: VRF7 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # export: + # route_target: "192.0.2.2:400" + # route_policy: "rm-policy" + # to: + # default_vrf: + # route_policy: "rm-policy" + # vrf: + # allow_imported_vpn: true + # import_config: + # route_target: "192.0.2.4:400" + # route_policy: "test-policy" + # from_config: + # bridge_domain: + # advertise_as_vpn: true + # default_vrf: + # route_policy: "test-policy" + # vrf: + # advertise_as_vpn: true + # maximum: + # prefix: 200 + # + # After state: + # ------------ + # + # RP/0/RP0/CPU0:iosxr(config)#show running-config vrf + # vrf VRF7 + # address-family ipv4 unicast + # import route-policy test-policy + # import from bridge-domain advertise-as-vpn + # import from default-vrf route-policy test-policy + # import from vrf advertise-as-vpn + # import route-target + # 192.0.2.4:400 + # ! + # export route-policy rm-policy + # export to vrf allow-imported-vpn + # export to default-vrf route-policy rm-policy + # export route-target + # 192.0.2.2:400 + # ! + # maximum prefix 200 + + # Using overridden + # + # Before state: + # ------------- + # + # RP/0/RP0/CPU0:iosxr(config)#show running-config vrf + # vrf VRF7 + # address-family ipv4 unicast + # import route-policy test-policy + # import from bridge-domain advertise-as-vpn + # import from default-vrf route-policy test-policy + # import from vrf advertise-as-vpn + # import route-target + # 192.0.2.4:400 + # ! + # export route-policy rm-policy + # export to vrf allow-imported-vpn + # export to default-vrf route-policy rm-policy + # export route-target + # 192.0.2.2:400 + # ! + # maximum prefix 200 + + - name: Override the provided configuration with the existing running configuration + cisco.iosxr.iosxr_vrf_address_family: + state: overridden + config: + - name: VRF6 + address_families: + - afi: "ipv4" + safi: "unicast" + export: + route_target: "192.0.2.8:200" + route_policy: "rm-policy1" + to: + default_vrf: + route_policy: "rm-policy" + vrf: + allow_imported_vpn: "true" + import_config: + route_target: "192.0.2.2:200" + route_policy: "test-policy" + from_config: + bridge_domain: + advertise_as_vpn: "true" + default_vrf: + route_policy: "test-policy" + vrf: + advertise_as_vpn: "true" + maximum: + prefix: 500 + # Task Output: + # ------------ + # + # before: + # - name: VRF7 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # export: + # route_target: "192.0.2.2:400" + # route_policy: "rm-policy" + # to: + # default_vrf: + # route_policy: "rm-policy" + # vrf: + # allow_imported_vpn: true + # import_config: + # route_target: "192.0.2.4:400" + # route_policy: "test-policy" + # from_config: + # bridge_domain: + # advertise_as_vpn: true + # default_vrf: + # route_policy: "test-policy" + # vrf: + # advertise_as_vpn: true + # maximum: + # prefix: 200 + # + # commands: + # - vrf VRF7 + # - address-family ipv4 unicast + # - no import route-policy test-policy + # - no import from bridge-domain advertise-as-vpn + # - no import from default-vrf route-policy test-policy + # - no import from vrf advertise-as-vpn + # - no import route-target 192.0.2.4:400 + # - no export route-policy rm-policy + # - no export route-target 192.0.2.2:400 + # - no export to default-vrf route-policy rm-policy + # - no export to vrf allow-imported-vpn + # - no maximum prefix 200 + # - vrf VRF6 + # - address-family ipv4 unicast + # - export route-policy rm-policy1 + # - export route-target 192.0.2.8:200 + # - export to default-vrf route-policy rm-policy + # - export to vrf allow-imported-vpn + # - import route-target 192.0.2.2:200 + # - import route-policy test-policy + # - import from bridge-domain advertise-as-vpn + # - import from default-vrf route-policy test-policy + # - import from vrf advertise-as-vpn + # - maximum prefix 500 + # + # after: + # - name: VRF4 + # - name: VRF6 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # export: + # route_target: "192.0.2.8:200" + # route_policy: "rm-policy1" + # to: + # default_vrf: + # route_policy: "rm-policy" + # vrf: + # allow_imported_vpn: "true" + # import_config: + # route_target: "192.0.2.2:200" + # route_policy: "test-policy" + # from_config: + # bridge_domain: + # advertise_as_vpn: "true" + # default_vrf: + # route_policy: "test-policy" + # vrf: + # advertise_as_vpn: "true" + # maximum: + # prefix: 500 + # - name: VRF7 + # + # After state: + # ------------- + # RP/0/RP0/CPU0:iosxr(config)#show running-config vrf + # vrf VRF4 + # vrf VRF6 + # address-family ipv4 unicast + # import route-policy test-policy + # import from bridge-domain advertise-as-vpn + # import from default-vrf route-policy test-policy + # import from vrf advertise-as-vpn + # import route-target + # 192.0.2.2:200 + # export route-policy rm-policy1 + # export to vrf allow-imported-vpn + # export to default-vrf route-policy rm-policy + # export route-target + # 192.0.2.8:200 + # maximum prefix 500 + # vrf VRF7 + + # Using deleted + # + # Before state: + # ------------- + # + # RP/0/RP0/CPU0:iosxr(config)#show running-config vrf + # vrf VRF4 + # vrf VRF6 + # address-family ipv4 unicast + # import route-policy test-policy + # import from bridge-domain advertise-as-vpn + # import from default-vrf route-policy test-policy + # import from vrf advertise-as-vpn + # import route-target + # 192.0.2.2:200 + # export route-policy rm-policy1 + # export to vrf allow-imported-vpn + # export to default-vrf route-policy rm-policy + # export route-target + # 192.0.2.8:200 + # maximum prefix 500 + # vrf VRF7 + + - name: Delete the provided configuration + cisco.iosxr.iosxr_vrf_address_family: + config: + state: deleted + + # Task Output: + # ------------ + # + # before: + # - name: VRF4 + # - name: VRF6 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # export: + # route_target: "192.0.2.8:200" + # route_policy: "rm-policy1" + # to: + # default_vrf: + # route_policy: "rm-policy" + # vrf: + # allow_imported_vpn: "true" + # import_config: + # route_target: "192.0.2.2:200" + # route_policy: "test-policy" + # from_config: + # bridge_domain: + # advertise_as_vpn: "true" + # default_vrf: + # route_policy: "test-policy" + # vrf: + # advertise_as_vpn: "true" + # maximum: + # prefix: 500 + # - name: VRF7 + + # commands: + # - vrf VRF4 + # - vrf VRF6 + # - no address-family ipv4 unicast + # - vrf VRF7 + # + # after: + # - name: VRF4 + # - name: VRF6 + # - name: VRF7 + # + # After state: + # ------------ + # + # RP/0/RP0/CPU0:iosxr(config)#show running-config vrf + # vrf VRF4 + # vrf VRF6 + # vrf VRF7 + + # Using rendered + # + - name: Render provided configuration with device configuration + cisco.iosxr.iosxr_vrf_address_family: + config: + - name: VRF4 + address_families: + - afi: "ipv4" + safi: "unicast" + export: + route_target: "192.0.2.1:400" + route_policy: "rm-policy" + to: + default_vrf: + route_policy: "rm-policy" + vrf: + allow_imported_vpn: true + import_config: + route_target: "192.0.2.6:200" + route_policy: "test-policy" + from_config: + bridge_domain: + advertise_as_vpn: true + default_vrf: + route_policy: "test-policy" + vrf: + advertise_as_vpn: true + maximum: + prefix: 100 + state: rendered + + # Task Output: + # ------------ + # + # rendered: + # - vrf VRF4 + # - address-family ipv4 unicast + # - export route-policy rm-policy + # - export route-target 192.0.2.1:400 + # - export to default-vrf route-policy rm-policy + # - export to vrf allow-imported-vpn + # - import route-target 192.0.2.6:200 + # - import route-policy test-policy + # - import from bridge-domain advertise-as-vpn + # - import from default-vrf route-policy test-policy + # - import from vrf advertise-as-vpn + # - maximum prefix 100 + + # Using gathered + # + # Before state: + # ------------- + # + # RP/0/RP0/CPU0:iosxr(config)#show running-config vrf + # vrf VRF4 + # address-family ipv4 unicast + # export route-policy rm-policy + # export route-target 192.0.2.1:400 + # export to default-vrf route-policy rm-policy + # export to vrf allow-imported-vpn + # import route-target 192.0.2.6:200 + # import route-policy test-policy + # import from bridge-domain advertise-as-vpn + # import from default-vrf route-policy test-policy + # import from vrf advertise-as-vpn + # maximum prefix 100 + + - name: Gather existing running configuration + cisco.iosxr.iosxr_vrf_address_family: + state: gathered + + # Task Output: + # ------------ + # + # gathered: + # - name: VRF4 + # address_families: + # - afi: "ipv4" + # safi: "unicast" + # export: + # route_target: "192.0.2.1:400" + # route_policy: "rm-policy" + # to: + # default_vrf: + # route_policy: "rm-policy" + # vrf: + # allow_imported_vpn: true + # import_config: + # route_target: "192.0.2.6:200" + # route_policy: "test-policy" + # from_config: + # bridge_domain: + # advertise_as_vpn: true + # default_vrf: + # route_policy: "test-policy" + # vrf: + # advertise_as_vpn: true + # maximum: + # prefix: 100 + + # Using parsed + # + # File: parsed.cfg + # ---------------- + # + # vrf test + # address-family ipv4 unicast + # export to default-vrf route-policy "rm-policy" + # export to vrf allow-imported-vpn + # export route-policy "export-policy" + # export route-target + # 192.0.2.1:400 + # import route-target + # 192.0.2.2:200 + # import route-policy "test-policy" + # import from bridge-domain advertise-as-vpn + # import from default-vrf route-policy "new-policy" + # import from vrf advertise-as-vpn + # maximum prefix 23 + + - name: Parse the provided configuration + cisco.iosxr.iosxr_vrf_address_family: + running_config: "{{ lookup('file', 'parsed.cfg') }}" + state: parsed + + # Task Output: + # ------------ + # + # parsed: + # - address_families: + # - afi: ipv4 + # export: + # route_policy: export-policy + # route_target: 192.0.2.1:400 + # to: + # default_vrf: + # route_policy: rm-policy + # vrf: + # allow_imported_vpn: true + # import_config: + # from_config: + # bridge_domain: + # advertise_as_vpn: true + # default_vrf: + # route_policy: new-policy + # vrf: + # advertise_as_vpn: true + # route_policy: test-policy + # route_target: 192.0.2.2:200 + # maximum: + # prefix: 23 + # safi: unicast + # name: test + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ list +
+
when changed +
The resulting configuration model invocation.
+
+
Sample:
+
The configuration returned will always be in the same format + of the parameters above.
+
+
+ before + +
+ list +
+
always +
The configuration prior to the model invocation.
+
+
Sample:
+
The configuration returned will always be in the same format + of the parameters above.
+
+
+ commands + +
+ list +
+
always +
The set of commands pushed to the remote device.
+
+
Sample:
+
['vrf VRF7', 'address-family ipv4 unicast', 'export route-policy rm-policy', 'import route-policy test-policy']
+
+
+ gathered + +
+ list +
+
when state is gathered +
Facts about the network resource gathered from the remote device as structured data.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ parsed + +
+ list +
+
when state is parsed +
The device native config provided in running_config option parsed into structured data as per module argspec.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ rendered + +
+ list +
+
when state is rendered +
The provided configuration in the task rendered in device-native format (offline).
+
+
Sample:
+
['vrf VRF4', 'address-family ipv4 unicast', 'export route-policy rm-policy']
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Ruchi Pakhle (@Ruchip16) diff --git a/docs/cisco.iosxr.iosxr_vrf_global_module.rst b/docs/cisco.iosxr.iosxr_vrf_global_module.rst new file mode 100644 index 00000000..aab51e16 --- /dev/null +++ b/docs/cisco.iosxr.iosxr_vrf_global_module.rst @@ -0,0 +1,1001 @@ +.. _cisco.iosxr.iosxr_vrf_global_module: + + +**************************** +cisco.iosxr.iosxr_vrf_global +**************************** + +**Manages global VRF configuration.** + + +Version added: 9.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- This module manages VRF configurations on Cisco IOS-XR devices. +- It enables playbooks to handle either individual VRFs or the complete VRF collection. +- It also permits removing non-explicitly stated VRF definitions from the setup. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ list + / elements=dictionary +
+
+ +
A dictionary of options for VRF configurations.
+
+
+ description + +
+ string +
+
+ +
A description for the VRF.
+
+
+ evpn_route_sync + +
+ integer +
+
+ +
EVPN Instance VPN ID used to synchronize the VRF route(s).
+
+
+ fallback_vrf + +
+ string +
+
+ +
Fallback VRF name
+
+
+ mhost + +
+ dictionary +
+
+ +
Multicast host stack options
+
+
+ afi + +
+ string +
+
+
    Choices: +
  • ipv4
  • +
  • ipv6
  • +
+
+
Address Family Identifier (AFI)
+
+
+ default_interface + +
+ string +
+
+ +
Default interface for multicast.
+
+
+ name + +
+ string + / required +
+
+ +
Name of the VRF.
+
+
+ rd + +
+ string +
+
+ +
VPN Route Distinguisher (RD).
+
+
+ remote_route_filtering + +
+ dictionary +
+
+ +
Enable/Disable remote route filtering per VRF
+
+
+ disable + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Disable remote route filtering per VRF
+
+
+ vpn + +
+ dictionary +
+
+ +
VPN ID for the VRF
+
+
+ id + +
+ string +
+
+ +
VPN ID for the VRF.
+
+
+ running_config + +
+ string +
+
+ +
This option is used only with state parsed.
+
The value of this option should be the output received from the IOS-XR device by executing the command show running-config vrf.
+
The state parsed reads the configuration from 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 parsed key within the result.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • parsed
  • +
  • gathered
  • +
  • deleted
  • +
  • merged ←
  • +
  • replaced
  • +
  • rendered
  • +
  • overridden
  • +
  • purged
  • +
+
+
The state the configuration should be left in
+
The states rendered, gathered and parsed does not perform any change on the device.
+
The state rendered will transform the configuration in config option to platform specific CLI commands which will be returned in the rendered key within the result. For state rendered active connection to remote host is not required.
+
The state 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 gathered key within the result.
+
The state parsed reads the configuration from running_config option and transforms it into JSON format as per the resource module parameters and the value is returned in the parsed key within the result. The value of running_config option should be the same format as the output of command show running-config vrf. connection to remote host is not required.
+
The state purged removes all the VRF configurations from the target device. Use caution with this state.
+
The state deleted only removes the VRF attributes that this module manages and does not negate the VRF completely. Thereby, preserving address-family related configurations under VRF context.
+
Refer to examples for more details.
+
+
+ + +Notes +----- + +.. note:: + - Tested against Cisco IOS-XR Version 9.0.0 + - This module works with connection ``network_cli``. + - See `the IOS_XR Platform Options `_. + - The module examples uses callback plugin (stdout_callback = yaml) to generate task output in yaml format. + + + +Examples +-------- + +.. code-block:: yaml + + # Using merged + # + # Before state: + # ------------- + # + # RP/0/0/CPU0:iosxr-02#show running-config vrf + # Fri Feb 9 07:02:35.789 UTC + # ! + # vrf test + # + + - name: Merge provided configuration with device configuration + cisco.iosxr.iosxr_vrf_global: + config: + - name: VRF4 + description: VRF4 Description + evpn_route_sync: 793 + fallback_vrf: "test-vrf" + remote_route_filtering: + disable: "true" + rd: "3:4" + mhost: + afi: "ipv4" + default_interface: "Loopback0" + vpn: + id: "2:3" + state: merged + + # Task Output: + # ------------ + # + # before: [] + # + # commands: + # - vrf VRF4 + # - description VRF4 Description + # - evpn-route-sync 793 + # - fallback-vrf test-vrf + # - mhost ipv4 default-interface Loopback0 + # - rd 3:4 + # - remote-route-filtering disable + # - vpn id 2:3 + # + # after: + # - name: VRF4 + # description: VRF4 Description + # evpn_route_sync: 793 + # fallback_vrf: "test-vrf" + # mhost: + # afi: "ipv4" + # default_interface: "Loopback0" + # rd: "3:4" + # remote_route_filtering: + # disable: "true" + # vpn: + # id: "2:3" + # + # After state: + # ------------ + # + # RP/0/0/CPU0:iosxr-02#show running-config vrf + # Sat Feb 20 03:49:43.618 UTC + # vrf VRF4 + # description "VRF4 Description" + # mhost ipv4 default-interface Loopback0 + # evpn-route-sync 793 + # vpn id 2:3 + # fallback-vrf "test-vrf" + # remote-route-filtering disable + # rd "3:4" + + # Using replaced + # + # Before state: + # ------------- + # + # RP/0/0/CPU0:iosxr-02#show running-config vrf + # Sat Feb 20 03:49:43.618 UTC + # vrf VRF4 + # description "VRF4 Description" + # mhost ipv4 default-interface Loopback0 + # evpn-route-sync 793 + # vpn id 2:3 + # fallback-vrf "test-vrf" + # remote-route-filtering disable + # rd "3:4" + + - name: Replace the provided configuration with the existing running configuration + cisco.iosxr.iosxr_vrf_global: + config: + - name: VRF7 + description: VRF7 description + evpn_route_sync: 398 + fallback_vrf: "replaced-vrf" + remote_route_filtering: + disable: "true" + rd: "67:9" + mhost: + afi: "ipv4" + default_interface: "Loopback0" + vpn: + id: "4:5" + state: replaced + + # Task Output: + # ------------ + # + # before: + # - name: VRF4 + # description: VRF4 Description + # evpn_route_sync: 793 + # fallback_vrf: "test-vrf" + # mhost: + # afi: "ipv4" + # default_interface: "Loopback0" + # rd: "3:4" + # remote_route_filtering: + # disable: "true" + # vpn: + # id: "2:3" + # + # commands: + # - vrf VRF4 + # - no vpn id 2:3 + # - vrf VRF7 + # - description VRF7 description + # - evpn-route-sync 398 + # - fallback-vrf replaced-vrf + # - mhost ipv4 default-interface Loopback0 + # - rd 6:9 + # - remote-route-filtering disable + # - vpn id 4:5 + # + # after: + # - name: VRF4 + # description: VRF4 Description + # evpn_route_sync: 793 + # fallback_vrf: "test-vrf" + # mhost: + # afi: "ipv4" + # default_interface: "Loopback0" + # rd: "3:4" + # remote_route_filtering: + # disable: "true" + # - name: VRF7 + # description: VRF7 description + # evpn_route_sync: 398 + # fallback_vrf: "replaced-vrf" + # remote_route_filtering: + # disable: true + # rd: "67:9" + # mhost: + # afi: "ipv4" + # default_interface: "Loopback0" + # vpn: + # id: "4:5" + # + # After state: + # ------------ + # + # RP/0/RP0/CPU0:ios(config)#show running-config vrf + # Sun Mar 10 16:48:53.204 UTC + # vrf VRF4 + # mhost ipv4 default-interface Loopback0 + # evpn-route-sync 793 + # description VRF4 Description + # fallback-vrf test-vrf + # remote-route-filtering disable + # rd 3:4 + # ! + # vrf VRF7 + # mhost ipv4 default-interface Loopback0 + # evpn-route-sync 398 + # description VRF7 description + # vpn id 4:5 + # fallback-vrf replaced-vrf + # remote-route-filtering disable + # rd 67:9 + # ! + # ! + + # Using overridden + # + # Before state: + # ------------- + # + # RP/0/RP0/CPU0:ios(config)#show running-config vrf + # Sun Mar 10 16:48:53.204 UTC + # vrf VRF4 + # mhost ipv4 default-interface Loopback0 + # evpn-route-sync 793 + # description VRF4 Description + # fallback-vrf test-vrf + # remote-route-filtering disable + # rd 3:4 + # ! + # ! + # vrf VRF7 + # mhost ipv4 default-interface Loopback0 + # evpn-route-sync 398 + # description VRF7 description + # vpn id 4:5 + # fallback-vrf replaced-vrf + # remote-route-filtering disable + # rd 67:9 + # ! + # ! + + - name: Override the provided configuration with the existing running configuration + cisco.iosxr.iosxr_vrf_global: + state: overridden + config: + - name: VRF6 + description: VRF6 Description + evpn_route_sync: 101 + fallback_vrf: "overridden-vrf" + remote_route_filtering: + disable: "true" + rd: "9:8" + mhost: + afi: "ipv4" + default_interface: "Loopback0" + vpn: + id: "23:3" + + # Task Output: + # ------------ + # + # before: + # - name: VRF4 + # description: VRF4 Description + # evpn_route_sync: 793 + # fallback_vrf: "test-vrf" + # mhost: + # afi: "ipv4" + # default_interface: "Loopback0" + # rd: "3:4" + # remote_route_filtering: + # disable: "true" + # - name: VRF7 + # description: VRF7 description + # evpn_route_sync: 398 + # fallback_vrf: "replaced-vrf" + # remote_route_filtering: + # disable: true + # rd: "67:9" + # mhost: + # afi: "ipv4" + # default_interface: "Loopback0" + # vpn: + # id: "4:5" + # + # commands: + # - vrf VRF4 + # - no description VRF4 Description + # - no evpn-route-sync 793 + # - no fallback-vrf test-vrf + # - no mhost ipv4 default-interface Loopback0 + # - no rd 3:4 + # - no remote-route-filtering disable + # - vrf VRF7 + # - no description VRF7 description + # - no evpn-route-sync 398 + # - no fallback-vrf replaced-vrf + # - no mhost ipv4 default-interface Loopback0 + # - no rd 67:9 + # - no remote-route-filtering disable + # - no vpn id 4:5 + # - vrf VRF6 + # - description VRF6 Description + # - evpn-route-sync 101 + # - fallback-vrf overridden-vrf + # - mhost ipv4 default-interface Loopback0 + # - rd 9:8 + # - remote-route-filtering disable + # - vpn id 23:3 + # + # after: + # - name: VRF4 + # - name: VRF6 + # description: VRF6 Description + # evpn_route_sync: 101 + # fallback_vrf: "overridden-vrf" + # remote_route_filtering: + # disable: "true" + # rd: "9:8" + # mhost: + # afi: "ipv4" + # default_interface: "Loopback0" + # vpn: + # id: "23:3" + # - name: VRF7 + # + # After state: + # ------------- + # RP/0/RP0/CPU0:ios(config)#show running-config vrf + # Sun Mar 10 16:54:53.007 UTC + # vrf VRF4 + # vrf VRF6 + # mhost ipv4 default-interface Loopback0 + # evpn-route-sync 101 + # description VRF6 Description + # vpn id 23:3 + # fallback-vrf overridden-vrf + # remote-route-filtering disable + # rd 9:8 + # vrf VRF7 + + # Using deleted + # + # Before state: + # ------------- + # + # RP/0/RP0/CPU0:ios(config)#show running-config vrf + # Sun Mar 10 16:54:53.007 UTC + # vrf VRF4 + # vrf VRF6 + # mhost ipv4 default-interface Loopback0 + # evpn-route-sync 101 + # description VRF6 Description + # vpn id 23:3 + # fallback-vrf overridden-vrf + # remote-route-filtering disable + # rd 9:8 + # vrf VRF7 + + - name: Delete the provided configuration + cisco.iosxr.iosxr_vrf_global: + config: + state: deleted + + # Task Output: + # ------------ + # + # before: + # - name: VRF4 + # - name: VRF6 + # description: VRF6 Description + # evpn_route_sync: 101 + # fallback_vrf: "overridden-vrf" + # remote_route_filtering: + # disable: "true" + # rd: "9:8" + # mhost: + # afi: "ipv4" + # default_interface: "Loopback0" + # vpn: + # id: "23:3" + # - name: VRF7 + + # commands: + # - vrf VRF4 + # - vrf VRF6 + # - no description VRF6 Description + # - no evpn-route-sync 101 + # - no fallback-vrf overridden-vrf + # - no mhost ipv4 default-interface Loopback0 + # - no rd 9:8 + # - no remote-route-filtering disable + # - no vpn id 23:3 + # - vrf VRF7 + # + # after: + # - name: VRF4 + # - name: VRF6 + # - name: VRF7 + # + # After state: + # ------------ + # + # RP/0/RP0/CPU0:ios(config)#show running-config vrf + # Sun Mar 10 17:02:38.981 UTC + # vrf VRF4 + # vrf VRF6 + # vrf VRF7 + + # Using purged + # + # Before state: + # ------------- + # + # RP/0/RP0/CPU0:ios(config)#show running-config vrf + # vrf VRF4 + # vrf VRF6 + # vrf VRF7 + + - name: Purge all the configuration from the device + cisco.iosxr.iosxr_vrf_global: + state: purged + + # Task Output: + # ------------ + # + # before: + # - name: VRF4 + # - name: VRF6 + # - name: VRF7 + # + # commands: + # - no vrf VRF4 + # - no vrf VRF6 + # - no vrf VRF7 + # + # after: [] + # + # After state: + # ------------- + # RP/0/RP0/CPU0:ios(config)#show running-config vrf + # Sun Mar 10 17:02:38.981 UTC + # - + + # Using rendered + # + - name: Render provided configuration with device configuration + cisco.iosxr.iosxr_vrf_global: + config: + - name: VRF4 + description: VRF4 Description + evpn_route_sync: 793 + fallback_vrf: "test-vrf" + remote_route_filtering: + disable: "true" + rd: "3:4" + mhost: + afi: "ipv4" + default_interface: "Loopback0" + vpn: + id: "2:3" + state: rendered + + # Task Output: + # ------------ + # + # rendered: + # - vrf VRF4 + # - description VRF4 Description + # - evpn-route-sync 793 + # - fallback-vrf test-vrf + # - mhost ipv4 default-interface Loopback0 + # - rd 3:4 + # - remote-route-filtering disable + # - vpn id 2:3 + + # Using gathered + # + # Before state: + # ------------- + # + # RP/0/RP0/CPU0:ios(config)#show running-config vrf + # Sun Mar 10 17:02:38.981 UTC + # vrf VRF4 + # description "VRF4 Description" + # mhost ipv4 default-interface Loopback0 + # evpn-route-sync 793 + # vpn id 2:3 + # fallback-vrf "test-vrf" + # remote-route-filtering disable + # rd "3:4" + + - name: Gather existing running configuration + cisco.iosxr.iosxr_vrf_global: + state: gathered + + # Task Output: + # ------------ + # + # gathered: + # - name: VRF4 + # description: VRF4 Description + # evpn_route_sync: 793 + # fallback_vrf: "test-vrf" + # mhost: + # afi: "ipv4" + # default_interface: "Loopback0" + # rd: "3:4" + # remote_route_filtering: + # disable: "true" + # vpn: + # id: "2:3" + + # Using parsed + # + # File: parsed.cfg + # ---------------- + # + # vrf test + # description "This is test VRF" + # mhost ipv4 default-interface Loopback0 + # evpn-route-sync 456 + # vpn id 56 + # fallback-vrf "test-vrf" + # remote-route-filtering disable + # rd "testing" + # ! + # ! + # vrf my_vrf + # mhost ipv4 default-interface Loopback0 + # evpn-route-sync 235 + # description "this is sample vrf for feature testing" + # fallback-vrf "parsed-vrf" + # rd "2:3" + # remote-route-filtering disable + # vpn id 23 + # ! + # ! + + - name: Parse the provided configuration + cisco.iosxr.iosxr_vrf_global: + running_config: "{{ lookup('file', 'parsed.cfg') }}" + state: parsed + + # Task Output: + # ------------ + # + # parsed: + # - description: This is test VRF + # evpn_route_sync: 456 + # fallback_vrf: test-vrf + # mhost: + # afi: ipv4 + # default_interface: Loopback0 + # name: test + # rd: testing + # remote_route_filtering: + # disable: true + # vpn: + # id: '56' + # - description: this is sample vrf for feature testing + # evpn_route_sync: 235 + # fallback_vrf: parsed-vrf + # mhost: + # afi: ipv4 + # default_interface: Loopback0 + # name: my_vrf + # rd: '2:3' + # remote_route_filtering: + # disable: true + # vpn: + # id: '23' + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ dictionary +
+
when changed +
The resulting configuration model invocation.
+
+
Sample:
+
The configuration returned will always be in the same format + of the parameters above.
+
+
+ before + +
+ dictionary +
+
always +
The configuration prior to the model invocation.
+
+
Sample:
+
The configuration returned will always be in the same format + of the parameters above.
+
+
+ commands + +
+ list +
+
always +
The set of commands pushed to the remote device.
+
+
Sample:
+
['vrf VRF7', 'description VRF7 description', {'rd': 4029}, 'fallback-vrf replaced-vrf']
+
+
+ gathered + +
+ list +
+
when state is gathered +
Facts about the network resource gathered from the remote device as structured data.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ parsed + +
+ list +
+
when state is parsed +
The device native config provided in running_config option parsed into structured data as per module argspec.
+
+
Sample:
+
This output will always be in the same format as the module argspec.
+
+
+ rendered + +
+ list +
+
when state is rendered +
The provided configuration in the task rendered in device-native format (offline).
+
+
Sample:
+
['vrf VRF4', 'description VRF4 Description', 'evpn-route-sync 793', 'fallback-vrf parsed-vrf']
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Ruchi Pakhle (@Ruchip16) diff --git a/plugins/module_utils/network/iosxr/argspec/route_maps/__init__.py b/plugins/module_utils/network/iosxr/argspec/route_maps/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/plugins/module_utils/network/iosxr/argspec/route_maps/route_maps.py b/plugins/module_utils/network/iosxr/argspec/route_maps/route_maps.py new file mode 100644 index 00000000..d19839cb --- /dev/null +++ b/plugins/module_utils/network/iosxr/argspec/route_maps/route_maps.py @@ -0,0 +1,1828 @@ +# -*- 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 iosxr_route_maps module +""" + + +class Route_mapsArgs(object): # pylint: disable=R0903 + """The arg spec for the iosxr_route_maps module""" + + argument_spec = { + "config": { + "type": "list", + "elements": "dict", + "options": { + "name": {"type": "str"}, + "global": { + "type": "dict", + "options": { + "add": { + "type": "dict", + "options": { + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": {"type": "int"}, + "max_transmission": {"type": "int"}, + }, + }, + "rip_metric": {"type": "int"}, + }, + }, + "apply": { + "type": "list", + "elements": "dict", + "options": { + "route_policy": {"type": "str"}, + "route_policy_input": {"type": "str"}, + }, + }, + "drop": {"type": "bool"}, + "pass": {"type": "bool"}, + "prepend": { + "type": "dict", + "options": { + "number_of_times": {"type": "int"}, + "as_path": {"type": "int"}, + "most_recent": {"type": "bool"}, + "own_as": {"type": "bool"}, + }, + }, + "suppress_route": {"type": "bool"}, + "unsuppress_route": {"type": "bool"}, + "remove": { + "type": "dict", + "options": { + "set": {"type": "bool"}, + "entire_aspath": {"type": "bool"}, + }, + }, + "set": { + "type": "dict", + "options": { + "administrative_distance": {"type": "int"}, + "aigp_metric": { + "type": "dict", + "options": { + "icrement": {"type": "bool"}, + "decrement": {"type": "bool"}, + "metric_number": {"type": "int"}, + "igp_cost": {"type": "bool"}, + }, + }, + "attribute_set": {"type": "str"}, + "c_multicast_routing": { + "type": "dict", + "options": { + "bgp": {"type": "bool"}, + "pim": {"type": "bool"}, + }, + }, + "community": { + "type": "dict", + "options": { + "community_name": {"type": "str"}, + "additive": {"type": "bool"}, + }, + }, + "core_tree": { + "type": "dict", + "options": { + "ingress_replication": {"type": "bool"}, + "ingress_replication_default": { + "type": "bool", + }, + "ingress_replication_partitioned": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "mldp_default": {"type": "bool"}, + "mldp_inband": {"type": "bool"}, + "mldp_partitioned_mp2mp": {"type": "bool"}, + "mldp_partitioned_p2mp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "p2mp_te_default": {"type": "bool"}, + "p2mp_te_partitioned": {"type": "bool"}, + "pim_default": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "dampening": { + "type": "dict", + "options": { + "halflife": {"type": "int"}, + "max_suppress": {"type": "int"}, + "reuse": {"type": "int"}, + "suppress": {"type": "int"}, + }, + }, + "downstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": {"type": "bool"}, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": {"type": "int"}, + "max_transmission": {"type": "int"}, + }, + }, + "fallback_vrf_lookup": {"type": "bool"}, + "flow_tag": {"type": "int"}, + "forward_class": {"type": "int"}, + "ip_precedence": {"type": "int"}, + "isis_metric": {"type": "int"}, + "label": {"type": "int"}, + "label_index": {"type": "int"}, + "label_mode": { + "type": "dict", + "options": { + "per_ce": {"type": "bool"}, + "per_prefix": {"type": "bool"}, + "per_vrf": {"type": "bool"}, + }, + }, + "large_community": {"type": "str"}, + "level": { + "type": "dict", + "options": { + "level_1": {"type": "bool"}, + "level_1_2": {"type": "bool"}, + "level_2": {"type": "bool"}, + }, + }, + "load_balance": {"type": "bool"}, + "lsm_root": {"type": "str"}, + "metric_type": { + "type": "dict", + "options": { + "external": {"type": "bool"}, + "internal": {"type": "bool"}, + "rib_metric_as_external": {"type": "bool"}, + "rib_metric_as_internal": {"type": "bool"}, + "type_1": {"type": "bool"}, + "type_2": {"type": "bool"}, + }, + }, + "mpls": {"type": "str"}, + "next_hop": { + "type": "dict", + "options": {"address": {"type": "str"}}, + }, + "origin": { + "type": "dict", + "options": { + "egp": {"type": "bool"}, + "igp": {"type": "bool"}, + "rincomplete": {"type": "bool"}, + }, + }, + "ospf_metric": {"type": "int"}, + "path_selection": { + "type": "dict", + "options": { + "all": {"type": "bool"}, + "backup": { + "type": "dict", + "options": { + "backup_decimal": {"type": "int"}, + "advertise": {"type": "bool"}, + "install": {"type": "bool"}, + }, + }, + "best_path": {"type": "bool"}, + "group_best": {"type": "bool"}, + "multiplath": {"type": "bool"}, + }, + }, + "path_color": {"type": "bool"}, + "qos_group": {"type": "int"}, + "rib_metric": {"type": "int"}, + "rip_metric": {"type": "int"}, + "rip_tag": {"type": "int"}, + "rt_set": {"type": "int"}, + "s_pmsi": {"type": "bool"}, + "spf_priority": { + "type": "dict", + "options": { + "critical": {"type": "bool"}, + "high": {"type": "bool"}, + "medium": {"type": "bool"}, + }, + }, + "static_p2mp_te": {"type": "str"}, + "tag": {"type": "int"}, + "traffic_index": { + "type": "dict", + "options": { + "index_number": {"type": "int"}, + "ignore": {"type": "bool"}, + }, + }, + "upstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": {"type": "bool"}, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "vpn_distinguisher": {"type": "int"}, + "weight": {"type": "int"}, + }, + }, + }, + }, + "if_section": { + "type": "dict", + "options": { + "condition": {"type": "str"}, + "add": { + "type": "dict", + "options": { + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": {"type": "int"}, + "max_transmission": {"type": "int"}, + }, + }, + "rip_metric": {"type": "int"}, + }, + }, + "apply": { + "type": "list", + "elements": "dict", + "options": { + "route_policy": {"type": "str"}, + "route_policy_input": {"type": "str"}, + }, + }, + "drop": {"type": "bool"}, + "pass": {"type": "bool"}, + "prepend": { + "type": "dict", + "options": { + "number_of_times": {"type": "int"}, + "as_path": {"type": "int"}, + "most_recent": {"type": "bool"}, + "own_as": {"type": "bool"}, + }, + }, + "suppress_route": {"type": "bool"}, + "unsuppress_route": {"type": "bool"}, + "remove": { + "type": "dict", + "options": { + "set": {"type": "bool"}, + "entire_aspath": {"type": "bool"}, + }, + }, + "set": { + "type": "dict", + "options": { + "administrative_distance": {"type": "int"}, + "aigp_metric": { + "type": "dict", + "options": { + "icrement": {"type": "bool"}, + "decrement": {"type": "bool"}, + "metric_number": {"type": "int"}, + "igp_cost": {"type": "bool"}, + }, + }, + "attribute_set": {"type": "str"}, + "c_multicast_routing": { + "type": "dict", + "options": { + "bgp": {"type": "bool"}, + "pim": {"type": "bool"}, + }, + }, + "community": { + "type": "dict", + "options": { + "community_name": {"type": "str"}, + "additive": {"type": "bool"}, + }, + }, + "core_tree": { + "type": "dict", + "options": { + "ingress_replication": {"type": "bool"}, + "ingress_replication_default": { + "type": "bool", + }, + "ingress_replication_partitioned": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "mldp_default": {"type": "bool"}, + "mldp_inband": {"type": "bool"}, + "mldp_partitioned_mp2mp": {"type": "bool"}, + "mldp_partitioned_p2mp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "p2mp_te_default": {"type": "bool"}, + "p2mp_te_partitioned": {"type": "bool"}, + "pim_default": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "dampening": { + "type": "dict", + "options": { + "halflife": {"type": "int"}, + "max_suppress": {"type": "int"}, + "reuse": {"type": "int"}, + "suppress": {"type": "int"}, + }, + }, + "downstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": {"type": "bool"}, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": {"type": "int"}, + "max_transmission": {"type": "int"}, + }, + }, + "fallback_vrf_lookup": {"type": "bool"}, + "flow_tag": {"type": "int"}, + "forward_class": {"type": "int"}, + "ip_precedence": {"type": "int"}, + "isis_metric": {"type": "int"}, + "label": {"type": "int"}, + "label_index": {"type": "int"}, + "label_mode": { + "type": "dict", + "options": { + "per_ce": {"type": "bool"}, + "per_prefix": {"type": "bool"}, + "per_vrf": {"type": "bool"}, + }, + }, + "large_community": {"type": "str"}, + "level": { + "type": "dict", + "options": { + "level_1": {"type": "bool"}, + "level_1_2": {"type": "bool"}, + "level_2": {"type": "bool"}, + }, + }, + "load_balance": {"type": "bool"}, + "lsm_root": {"type": "str"}, + "metric_type": { + "type": "dict", + "options": { + "external": {"type": "bool"}, + "internal": {"type": "bool"}, + "rib_metric_as_external": {"type": "bool"}, + "rib_metric_as_internal": {"type": "bool"}, + "type_1": {"type": "bool"}, + "type_2": {"type": "bool"}, + }, + }, + "mpls": {"type": "str"}, + "next_hop": { + "type": "dict", + "options": {"address": {"type": "str"}}, + }, + "origin": { + "type": "dict", + "options": { + "egp": {"type": "bool"}, + "igp": {"type": "bool"}, + "rincomplete": {"type": "bool"}, + }, + }, + "ospf_metric": {"type": "int"}, + "path_selection": { + "type": "dict", + "options": { + "all": {"type": "bool"}, + "backup": { + "type": "dict", + "options": { + "backup_decimal": {"type": "int"}, + "advertise": {"type": "bool"}, + "install": {"type": "bool"}, + }, + }, + "best_path": {"type": "bool"}, + "group_best": {"type": "bool"}, + "multiplath": {"type": "bool"}, + }, + }, + "path_color": {"type": "bool"}, + "qos_group": {"type": "int"}, + "rib_metric": {"type": "int"}, + "rip_metric": {"type": "int"}, + "rip_tag": {"type": "int"}, + "rt_set": {"type": "int"}, + "s_pmsi": {"type": "bool"}, + "spf_priority": { + "type": "dict", + "options": { + "critical": {"type": "bool"}, + "high": {"type": "bool"}, + "medium": {"type": "bool"}, + }, + }, + "static_p2mp_te": {"type": "str"}, + "tag": {"type": "int"}, + "traffic_index": { + "type": "dict", + "options": { + "index_number": {"type": "int"}, + "ignore": {"type": "bool"}, + }, + }, + "upstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": {"type": "bool"}, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "vpn_distinguisher": {"type": "int"}, + "weight": {"type": "int"}, + }, + }, + }, + }, + "elseif_section": { + "type": "list", + "elements": "dict", + "options": { + "condition": {"type": "str"}, + "add": { + "type": "dict", + "options": { + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": {"type": "int"}, + "max_transmission": {"type": "int"}, + }, + }, + "rip_metric": {"type": "int"}, + }, + }, + "apply": { + "type": "list", + "elements": "dict", + "options": { + "route_policy": {"type": "str"}, + "route_policy_input": {"type": "str"}, + }, + }, + "drop": {"type": "bool"}, + "pass": {"type": "bool"}, + "prepend": { + "type": "dict", + "options": { + "number_of_times": {"type": "int"}, + "as_path": {"type": "int"}, + "most_recent": {"type": "bool"}, + "own_as": {"type": "bool"}, + }, + }, + "suppress_route": {"type": "bool"}, + "unsuppress_route": {"type": "bool"}, + "remove": { + "type": "dict", + "options": { + "set": {"type": "bool"}, + "entire_aspath": {"type": "bool"}, + }, + }, + "set": { + "type": "dict", + "options": { + "administrative_distance": {"type": "int"}, + "aigp_metric": { + "type": "dict", + "options": { + "icrement": {"type": "bool"}, + "decrement": {"type": "bool"}, + "metric_number": {"type": "int"}, + "igp_cost": {"type": "bool"}, + }, + }, + "attribute_set": {"type": "str"}, + "c_multicast_routing": { + "type": "dict", + "options": { + "bgp": {"type": "bool"}, + "pim": {"type": "bool"}, + }, + }, + "community": { + "type": "dict", + "options": { + "community_name": {"type": "str"}, + "additive": {"type": "bool"}, + }, + }, + "core_tree": { + "type": "dict", + "options": { + "ingress_replication": {"type": "bool"}, + "ingress_replication_default": { + "type": "bool", + }, + "ingress_replication_partitioned": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "mldp_default": {"type": "bool"}, + "mldp_inband": {"type": "bool"}, + "mldp_partitioned_mp2mp": {"type": "bool"}, + "mldp_partitioned_p2mp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "p2mp_te_default": {"type": "bool"}, + "p2mp_te_partitioned": {"type": "bool"}, + "pim_default": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "dampening": { + "type": "dict", + "options": { + "halflife": {"type": "int"}, + "max_suppress": {"type": "int"}, + "reuse": {"type": "int"}, + "suppress": {"type": "int"}, + }, + }, + "downstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": {"type": "bool"}, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": {"type": "int"}, + "max_transmission": {"type": "int"}, + }, + }, + "fallback_vrf_lookup": {"type": "bool"}, + "flow_tag": {"type": "int"}, + "forward_class": {"type": "int"}, + "ip_precedence": {"type": "int"}, + "isis_metric": {"type": "int"}, + "label": {"type": "int"}, + "label_index": {"type": "int"}, + "label_mode": { + "type": "dict", + "options": { + "per_ce": {"type": "bool"}, + "per_prefix": {"type": "bool"}, + "per_vrf": {"type": "bool"}, + }, + }, + "large_community": {"type": "str"}, + "level": { + "type": "dict", + "options": { + "level_1": {"type": "bool"}, + "level_1_2": {"type": "bool"}, + "level_2": {"type": "bool"}, + }, + }, + "load_balance": {"type": "bool"}, + "lsm_root": {"type": "str"}, + "metric_type": { + "type": "dict", + "options": { + "external": {"type": "bool"}, + "internal": {"type": "bool"}, + "rib_metric_as_external": {"type": "bool"}, + "rib_metric_as_internal": {"type": "bool"}, + "type_1": {"type": "bool"}, + "type_2": {"type": "bool"}, + }, + }, + "mpls": {"type": "str"}, + "next_hop": { + "type": "dict", + "options": {"address": {"type": "str"}}, + }, + "origin": { + "type": "dict", + "options": { + "egp": {"type": "bool"}, + "igp": {"type": "bool"}, + "rincomplete": {"type": "bool"}, + }, + }, + "ospf_metric": {"type": "int"}, + "path_selection": { + "type": "dict", + "options": { + "all": {"type": "bool"}, + "backup": { + "type": "dict", + "options": { + "backup_decimal": {"type": "int"}, + "advertise": {"type": "bool"}, + "install": {"type": "bool"}, + }, + }, + "best_path": {"type": "bool"}, + "group_best": {"type": "bool"}, + "multiplath": {"type": "bool"}, + }, + }, + "path_color": {"type": "bool"}, + "qos_group": {"type": "int"}, + "rib_metric": {"type": "int"}, + "rip_metric": {"type": "int"}, + "rip_tag": {"type": "int"}, + "rt_set": {"type": "int"}, + "s_pmsi": {"type": "bool"}, + "spf_priority": { + "type": "dict", + "options": { + "critical": {"type": "bool"}, + "high": {"type": "bool"}, + "medium": {"type": "bool"}, + }, + }, + "static_p2mp_te": {"type": "str"}, + "tag": {"type": "int"}, + "traffic_index": { + "type": "dict", + "options": { + "index_number": {"type": "int"}, + "ignore": {"type": "bool"}, + }, + }, + "upstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": {"type": "bool"}, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "vpn_distinguisher": {"type": "int"}, + "weight": {"type": "int"}, + }, + }, + }, + }, + "else_section": { + "type": "dict", + "options": { + "global": { + "type": "dict", + "options": { + "add": { + "type": "dict", + "options": { + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": { + "type": "int", + }, + "max_transmission": { + "type": "int", + }, + }, + }, + "rip_metric": {"type": "int"}, + }, + }, + "apply": { + "type": "list", + "elements": "dict", + "options": { + "route_policy": {"type": "str"}, + "route_policy_input": {"type": "str"}, + }, + }, + "drop": {"type": "bool"}, + "pass": {"type": "bool"}, + "prepend": { + "type": "dict", + "options": { + "number_of_times": {"type": "int"}, + "as_path": {"type": "int"}, + "most_recent": {"type": "bool"}, + "own_as": {"type": "bool"}, + }, + }, + "suppress_route": {"type": "bool"}, + "unsuppress_route": {"type": "bool"}, + "remove": { + "type": "dict", + "options": { + "set": {"type": "bool"}, + "entire_aspath": {"type": "bool"}, + }, + }, + "set": { + "type": "dict", + "options": { + "administrative_distance": {"type": "int"}, + "aigp_metric": { + "type": "dict", + "options": { + "icrement": {"type": "bool"}, + "decrement": {"type": "bool"}, + "metric_number": {"type": "int"}, + "igp_cost": {"type": "bool"}, + }, + }, + "attribute_set": {"type": "str"}, + "c_multicast_routing": { + "type": "dict", + "options": { + "bgp": {"type": "bool"}, + "pim": {"type": "bool"}, + }, + }, + "community": { + "type": "dict", + "options": { + "community_name": {"type": "str"}, + "additive": {"type": "bool"}, + }, + }, + "core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "ingress_replication_default": { + "type": "bool", + }, + "ingress_replication_partitioned": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "mldp_default": {"type": "bool"}, + "mldp_inband": {"type": "bool"}, + "mldp_partitioned_mp2mp": { + "type": "bool", + }, + "mldp_partitioned_p2mp": { + "type": "bool", + }, + "p2mp_te": {"type": "bool"}, + "p2mp_te_default": { + "type": "bool", + }, + "p2mp_te_partitioned": { + "type": "bool", + }, + "pim_default": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "dampening": { + "type": "dict", + "options": { + "halflife": {"type": "int"}, + "max_suppress": {"type": "int"}, + "reuse": {"type": "int"}, + "suppress": {"type": "int"}, + }, + }, + "downstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": { + "type": "int", + }, + "max_transmission": { + "type": "int", + }, + }, + }, + "fallback_vrf_lookup": {"type": "bool"}, + "flow_tag": {"type": "int"}, + "forward_class": {"type": "int"}, + "ip_precedence": {"type": "int"}, + "isis_metric": {"type": "int"}, + "label": {"type": "int"}, + "label_index": {"type": "int"}, + "label_mode": { + "type": "dict", + "options": { + "per_ce": {"type": "bool"}, + "per_prefix": {"type": "bool"}, + "per_vrf": {"type": "bool"}, + }, + }, + "large_community": {"type": "str"}, + "level": { + "type": "dict", + "options": { + "level_1": {"type": "bool"}, + "level_1_2": {"type": "bool"}, + "level_2": {"type": "bool"}, + }, + }, + "load_balance": {"type": "bool"}, + "lsm_root": {"type": "str"}, + "metric_type": { + "type": "dict", + "options": { + "external": {"type": "bool"}, + "internal": {"type": "bool"}, + "rib_metric_as_external": { + "type": "bool", + }, + "rib_metric_as_internal": { + "type": "bool", + }, + "type_1": {"type": "bool"}, + "type_2": {"type": "bool"}, + }, + }, + "mpls": {"type": "str"}, + "next_hop": { + "type": "dict", + "options": { + "address": {"type": "str"}, + }, + }, + "origin": { + "type": "dict", + "options": { + "egp": {"type": "bool"}, + "igp": {"type": "bool"}, + "rincomplete": {"type": "bool"}, + }, + }, + "ospf_metric": {"type": "int"}, + "path_selection": { + "type": "dict", + "options": { + "all": {"type": "bool"}, + "backup": { + "type": "dict", + "options": { + "backup_decimal": { + "type": "int", + }, + "advertise": { + "type": "bool", + }, + "install": { + "type": "bool", + }, + }, + }, + "best_path": {"type": "bool"}, + "group_best": {"type": "bool"}, + "multiplath": {"type": "bool"}, + }, + }, + "path_color": {"type": "bool"}, + "qos_group": {"type": "int"}, + "rib_metric": {"type": "int"}, + "rip_metric": {"type": "int"}, + "rip_tag": {"type": "int"}, + "rt_set": {"type": "int"}, + "s_pmsi": {"type": "bool"}, + "spf_priority": { + "type": "dict", + "options": { + "critical": {"type": "bool"}, + "high": {"type": "bool"}, + "medium": {"type": "bool"}, + }, + }, + "static_p2mp_te": {"type": "str"}, + "tag": {"type": "int"}, + "traffic_index": { + "type": "dict", + "options": { + "index_number": {"type": "int"}, + "ignore": {"type": "bool"}, + }, + }, + "upstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "vpn_distinguisher": {"type": "int"}, + "weight": {"type": "int"}, + }, + }, + }, + }, + "if_section": { + "type": "dict", + "options": { + "condition": {"type": "str"}, + "add": { + "type": "dict", + "options": { + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": { + "type": "int", + }, + "max_transmission": { + "type": "int", + }, + }, + }, + "rip_metric": {"type": "int"}, + }, + }, + "apply": { + "type": "list", + "elements": "dict", + "options": { + "route_policy": {"type": "str"}, + "route_policy_input": {"type": "str"}, + }, + }, + "drop": {"type": "bool"}, + "pass": {"type": "bool"}, + "prepend": { + "type": "dict", + "options": { + "number_of_times": {"type": "int"}, + "as_path": {"type": "int"}, + "most_recent": {"type": "bool"}, + "own_as": {"type": "bool"}, + }, + }, + "suppress_route": {"type": "bool"}, + "unsuppress_route": {"type": "bool"}, + "remove": { + "type": "dict", + "options": { + "set": {"type": "bool"}, + "entire_aspath": {"type": "bool"}, + }, + }, + "set": { + "type": "dict", + "options": { + "administrative_distance": {"type": "int"}, + "aigp_metric": { + "type": "dict", + "options": { + "icrement": {"type": "bool"}, + "decrement": {"type": "bool"}, + "metric_number": {"type": "int"}, + "igp_cost": {"type": "bool"}, + }, + }, + "attribute_set": {"type": "str"}, + "c_multicast_routing": { + "type": "dict", + "options": { + "bgp": {"type": "bool"}, + "pim": {"type": "bool"}, + }, + }, + "community": { + "type": "dict", + "options": { + "community_name": {"type": "str"}, + "additive": {"type": "bool"}, + }, + }, + "core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "ingress_replication_default": { + "type": "bool", + }, + "ingress_replication_partitioned": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "mldp_default": {"type": "bool"}, + "mldp_inband": {"type": "bool"}, + "mldp_partitioned_mp2mp": { + "type": "bool", + }, + "mldp_partitioned_p2mp": { + "type": "bool", + }, + "p2mp_te": {"type": "bool"}, + "p2mp_te_default": { + "type": "bool", + }, + "p2mp_te_partitioned": { + "type": "bool", + }, + "pim_default": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "dampening": { + "type": "dict", + "options": { + "halflife": {"type": "int"}, + "max_suppress": {"type": "int"}, + "reuse": {"type": "int"}, + "suppress": {"type": "int"}, + }, + }, + "downstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": { + "type": "int", + }, + "max_transmission": { + "type": "int", + }, + }, + }, + "fallback_vrf_lookup": {"type": "bool"}, + "flow_tag": {"type": "int"}, + "forward_class": {"type": "int"}, + "ip_precedence": {"type": "int"}, + "isis_metric": {"type": "int"}, + "label": {"type": "int"}, + "label_index": {"type": "int"}, + "label_mode": { + "type": "dict", + "options": { + "per_ce": {"type": "bool"}, + "per_prefix": {"type": "bool"}, + "per_vrf": {"type": "bool"}, + }, + }, + "large_community": {"type": "str"}, + "level": { + "type": "dict", + "options": { + "level_1": {"type": "bool"}, + "level_1_2": {"type": "bool"}, + "level_2": {"type": "bool"}, + }, + }, + "load_balance": {"type": "bool"}, + "lsm_root": {"type": "str"}, + "metric_type": { + "type": "dict", + "options": { + "external": {"type": "bool"}, + "internal": {"type": "bool"}, + "rib_metric_as_external": { + "type": "bool", + }, + "rib_metric_as_internal": { + "type": "bool", + }, + "type_1": {"type": "bool"}, + "type_2": {"type": "bool"}, + }, + }, + "mpls": {"type": "str"}, + "next_hop": { + "type": "dict", + "options": { + "address": {"type": "str"}, + }, + }, + "origin": { + "type": "dict", + "options": { + "egp": {"type": "bool"}, + "igp": {"type": "bool"}, + "rincomplete": {"type": "bool"}, + }, + }, + "ospf_metric": {"type": "int"}, + "path_selection": { + "type": "dict", + "options": { + "all": {"type": "bool"}, + "backup": { + "type": "dict", + "options": { + "backup_decimal": { + "type": "int", + }, + "advertise": { + "type": "bool", + }, + "install": { + "type": "bool", + }, + }, + }, + "best_path": {"type": "bool"}, + "group_best": {"type": "bool"}, + "multiplath": {"type": "bool"}, + }, + }, + "path_color": {"type": "bool"}, + "qos_group": {"type": "int"}, + "rib_metric": {"type": "int"}, + "rip_metric": {"type": "int"}, + "rip_tag": {"type": "int"}, + "rt_set": {"type": "int"}, + "s_pmsi": {"type": "bool"}, + "spf_priority": { + "type": "dict", + "options": { + "critical": {"type": "bool"}, + "high": {"type": "bool"}, + "medium": {"type": "bool"}, + }, + }, + "static_p2mp_te": {"type": "str"}, + "tag": {"type": "int"}, + "traffic_index": { + "type": "dict", + "options": { + "index_number": {"type": "int"}, + "ignore": {"type": "bool"}, + }, + }, + "upstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "vpn_distinguisher": {"type": "int"}, + "weight": {"type": "int"}, + }, + }, + }, + }, + "elseif_section": { + "type": "list", + "elements": "dict", + "options": { + "condition": {"type": "str"}, + "add": { + "type": "dict", + "options": { + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": { + "type": "int", + }, + "max_transmission": { + "type": "int", + }, + }, + }, + "rip_metric": {"type": "int"}, + }, + }, + "apply": { + "type": "list", + "elements": "dict", + "options": { + "route_policy": {"type": "str"}, + "route_policy_input": {"type": "str"}, + }, + }, + "drop": {"type": "bool"}, + "pass": {"type": "bool"}, + "prepend": { + "type": "dict", + "options": { + "number_of_times": {"type": "int"}, + "as_path": {"type": "int"}, + "most_recent": {"type": "bool"}, + "own_as": {"type": "bool"}, + }, + }, + "suppress_route": {"type": "bool"}, + "unsuppress_route": {"type": "bool"}, + "remove": { + "type": "dict", + "options": { + "set": {"type": "bool"}, + "entire_aspath": {"type": "bool"}, + }, + }, + "set": { + "type": "dict", + "options": { + "administrative_distance": {"type": "int"}, + "aigp_metric": { + "type": "dict", + "options": { + "icrement": {"type": "bool"}, + "decrement": {"type": "bool"}, + "metric_number": {"type": "int"}, + "igp_cost": {"type": "bool"}, + }, + }, + "attribute_set": {"type": "str"}, + "c_multicast_routing": { + "type": "dict", + "options": { + "bgp": {"type": "bool"}, + "pim": {"type": "bool"}, + }, + }, + "community": { + "type": "dict", + "options": { + "community_name": {"type": "str"}, + "additive": {"type": "bool"}, + }, + }, + "core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "ingress_replication_default": { + "type": "bool", + }, + "ingress_replication_partitioned": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "mldp_default": {"type": "bool"}, + "mldp_inband": {"type": "bool"}, + "mldp_partitioned_mp2mp": { + "type": "bool", + }, + "mldp_partitioned_p2mp": { + "type": "bool", + }, + "p2mp_te": {"type": "bool"}, + "p2mp_te_default": { + "type": "bool", + }, + "p2mp_te_partitioned": { + "type": "bool", + }, + "pim_default": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "dampening": { + "type": "dict", + "options": { + "halflife": {"type": "int"}, + "max_suppress": {"type": "int"}, + "reuse": {"type": "int"}, + "suppress": {"type": "int"}, + }, + }, + "downstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": { + "type": "int", + }, + "max_transmission": { + "type": "int", + }, + }, + }, + "fallback_vrf_lookup": {"type": "bool"}, + "flow_tag": {"type": "int"}, + "forward_class": {"type": "int"}, + "ip_precedence": {"type": "int"}, + "isis_metric": {"type": "int"}, + "label": {"type": "int"}, + "label_index": {"type": "int"}, + "label_mode": { + "type": "dict", + "options": { + "per_ce": {"type": "bool"}, + "per_prefix": {"type": "bool"}, + "per_vrf": {"type": "bool"}, + }, + }, + "large_community": {"type": "str"}, + "level": { + "type": "dict", + "options": { + "level_1": {"type": "bool"}, + "level_1_2": {"type": "bool"}, + "level_2": {"type": "bool"}, + }, + }, + "load_balance": {"type": "bool"}, + "lsm_root": {"type": "str"}, + "metric_type": { + "type": "dict", + "options": { + "external": {"type": "bool"}, + "internal": {"type": "bool"}, + "rib_metric_as_external": { + "type": "bool", + }, + "rib_metric_as_internal": { + "type": "bool", + }, + "type_1": {"type": "bool"}, + "type_2": {"type": "bool"}, + }, + }, + "mpls": {"type": "str"}, + "next_hop": { + "type": "dict", + "options": { + "address": {"type": "str"}, + }, + }, + "origin": { + "type": "dict", + "options": { + "egp": {"type": "bool"}, + "igp": {"type": "bool"}, + "rincomplete": {"type": "bool"}, + }, + }, + "ospf_metric": {"type": "int"}, + "path_selection": { + "type": "dict", + "options": { + "all": {"type": "bool"}, + "backup": { + "type": "dict", + "options": { + "backup_decimal": { + "type": "int", + }, + "advertise": { + "type": "bool", + }, + "install": { + "type": "bool", + }, + }, + }, + "best_path": {"type": "bool"}, + "group_best": {"type": "bool"}, + "multiplath": {"type": "bool"}, + }, + }, + "path_color": {"type": "bool"}, + "qos_group": {"type": "int"}, + "rib_metric": {"type": "int"}, + "rip_metric": {"type": "int"}, + "rip_tag": {"type": "int"}, + "rt_set": {"type": "int"}, + "s_pmsi": {"type": "bool"}, + "spf_priority": { + "type": "dict", + "options": { + "critical": {"type": "bool"}, + "high": {"type": "bool"}, + "medium": {"type": "bool"}, + }, + }, + "static_p2mp_te": {"type": "str"}, + "tag": {"type": "int"}, + "traffic_index": { + "type": "dict", + "options": { + "index_number": {"type": "int"}, + "ignore": {"type": "bool"}, + }, + }, + "upstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "vpn_distinguisher": {"type": "int"}, + "weight": {"type": "int"}, + }, + }, + }, + }, + "else_section": { + "type": "dict", + "options": { + "add": { + "type": "dict", + "options": { + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": { + "type": "int", + }, + "max_transmission": { + "type": "int", + }, + }, + }, + "rip_metric": {"type": "int"}, + }, + }, + "apply": { + "type": "list", + "elements": "dict", + "options": { + "route_policy": {"type": "str"}, + "route_policy_input": {"type": "str"}, + }, + }, + "drop": {"type": "bool"}, + "pass": {"type": "bool"}, + "prepend": { + "type": "dict", + "options": { + "number_of_times": {"type": "int"}, + "as_path": {"type": "int"}, + "most_recent": {"type": "bool"}, + "own_as": {"type": "bool"}, + }, + }, + "suppress_route": {"type": "bool"}, + "unsuppress_route": {"type": "bool"}, + "remove": { + "type": "dict", + "options": { + "set": {"type": "bool"}, + "entire_aspath": {"type": "bool"}, + }, + }, + "set": { + "type": "dict", + "options": { + "administrative_distance": {"type": "int"}, + "aigp_metric": { + "type": "dict", + "options": { + "icrement": {"type": "bool"}, + "decrement": {"type": "bool"}, + "metric_number": {"type": "int"}, + "igp_cost": {"type": "bool"}, + }, + }, + "attribute_set": {"type": "str"}, + "c_multicast_routing": { + "type": "dict", + "options": { + "bgp": {"type": "bool"}, + "pim": {"type": "bool"}, + }, + }, + "community": { + "type": "dict", + "options": { + "community_name": {"type": "str"}, + "additive": {"type": "bool"}, + }, + }, + "core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "ingress_replication_default": { + "type": "bool", + }, + "ingress_replication_partitioned": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "mldp_default": {"type": "bool"}, + "mldp_inband": {"type": "bool"}, + "mldp_partitioned_mp2mp": { + "type": "bool", + }, + "mldp_partitioned_p2mp": { + "type": "bool", + }, + "p2mp_te": {"type": "bool"}, + "p2mp_te_default": { + "type": "bool", + }, + "p2mp_te_partitioned": { + "type": "bool", + }, + "pim_default": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "dampening": { + "type": "dict", + "options": { + "halflife": {"type": "int"}, + "max_suppress": {"type": "int"}, + "reuse": {"type": "int"}, + "suppress": {"type": "int"}, + }, + }, + "downstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "eigrp_metric": { + "type": "dict", + "options": { + "bandwidth": {"type": "int"}, + "delay": {"type": "int"}, + "reliability": {"type": "int"}, + "effective_bandwith": { + "type": "int", + }, + "max_transmission": { + "type": "int", + }, + }, + }, + "fallback_vrf_lookup": {"type": "bool"}, + "flow_tag": {"type": "int"}, + "forward_class": {"type": "int"}, + "ip_precedence": {"type": "int"}, + "isis_metric": {"type": "int"}, + "label": {"type": "int"}, + "label_index": {"type": "int"}, + "label_mode": { + "type": "dict", + "options": { + "per_ce": {"type": "bool"}, + "per_prefix": {"type": "bool"}, + "per_vrf": {"type": "bool"}, + }, + }, + "large_community": {"type": "str"}, + "level": { + "type": "dict", + "options": { + "level_1": {"type": "bool"}, + "level_1_2": {"type": "bool"}, + "level_2": {"type": "bool"}, + }, + }, + "load_balance": {"type": "bool"}, + "lsm_root": {"type": "str"}, + "metric_type": { + "type": "dict", + "options": { + "external": {"type": "bool"}, + "internal": {"type": "bool"}, + "rib_metric_as_external": { + "type": "bool", + }, + "rib_metric_as_internal": { + "type": "bool", + }, + "type_1": {"type": "bool"}, + "type_2": {"type": "bool"}, + }, + }, + "mpls": {"type": "str"}, + "next_hop": { + "type": "dict", + "options": { + "address": {"type": "str"}, + }, + }, + "origin": { + "type": "dict", + "options": { + "egp": {"type": "bool"}, + "igp": {"type": "bool"}, + "rincomplete": {"type": "bool"}, + }, + }, + "ospf_metric": {"type": "int"}, + "path_selection": { + "type": "dict", + "options": { + "all": {"type": "bool"}, + "backup": { + "type": "dict", + "options": { + "backup_decimal": { + "type": "int", + }, + "advertise": { + "type": "bool", + }, + "install": { + "type": "bool", + }, + }, + }, + "best_path": {"type": "bool"}, + "group_best": {"type": "bool"}, + "multiplath": {"type": "bool"}, + }, + }, + "path_color": {"type": "bool"}, + "qos_group": {"type": "int"}, + "rib_metric": {"type": "int"}, + "rip_metric": {"type": "int"}, + "rip_tag": {"type": "int"}, + "rt_set": {"type": "int"}, + "s_pmsi": {"type": "bool"}, + "spf_priority": { + "type": "dict", + "options": { + "critical": {"type": "bool"}, + "high": {"type": "bool"}, + "medium": {"type": "bool"}, + }, + }, + "static_p2mp_te": {"type": "str"}, + "tag": {"type": "int"}, + "traffic_index": { + "type": "dict", + "options": { + "index_number": {"type": "int"}, + "ignore": {"type": "bool"}, + }, + }, + "upstream_core_tree": { + "type": "dict", + "options": { + "ingress_replication": { + "type": "bool", + }, + "mldp": {"type": "bool"}, + "p2mp_te": {"type": "bool"}, + "sr_p2mp": {"type": "bool"}, + }, + }, + "vpn_distinguisher": {"type": "int"}, + "weight": {"type": "int"}, + }, + }, + }, + }, + }, + }, + }, + }, + "running_config": {"type": "str"}, + "state": { + "type": "str", + "choices": [ + "merged", + "replaced", + "overridden", + "purged", + "rendered", + "gathered", + "parsed", + ], + "default": "merged", + }, + } # pylint: disable=C0301 diff --git a/plugins/module_utils/network/iosxr/config/route_maps/__init__.py b/plugins/module_utils/network/iosxr/config/route_maps/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/plugins/module_utils/network/iosxr/config/route_maps/route_maps.py b/plugins/module_utils/network/iosxr/config/route_maps/route_maps.py new file mode 100644 index 00000000..815b078a --- /dev/null +++ b/plugins/module_utils/network/iosxr/config/route_maps/route_maps.py @@ -0,0 +1,290 @@ +# +# -*- 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 + +""" +The iosxr_route_maps config file. +It is in this file where the current configuration (as dict) +is compared to the provided configuration (as dict) and the command set +necessary to bring the current configuration to its desired end-state is +created. +""" + +from ansible.module_utils.six import iteritems +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.rm_base.resource_module import ( + ResourceModule, +) +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import ( + dict_merge, +) + +from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import Facts +from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.rm_templates.route_maps import ( + Route_mapsTemplate, +) + + +class Route_maps(ResourceModule): + """ + The iosxr_route_maps config class + """ + + def __init__(self, module): + super(Route_maps, self).__init__( + empty_fact_val={}, + facts_module=Facts(module), + module=module, + resource="route_maps", + tmplt=Route_mapsTemplate(), + ) + self.parsers = [ + "add.eigrp_metric", + "add.rip_metric", + "drop", + "pass", + "prepend", + "suppress_route", + "unsuppress_route", + "remove", + "set.administrative_distance", + "set.aigp_metric", + "set.attribute_set", + "set.c_multicast_routing", + "set.community", + "set.core_tree", + "set.dampening", + "set.downstream_core_tree", + "set.eigrp_metric", + "set.fallback_vrf_lookup", + "set.flow_tag", + "set.forward_class", + "set.ip_precedence", + "set.isis_metric", + "set.label", + "set.label_index", + "set.label_mode", + "set.large_community", + "set.level", + "set.load_balance", + "set.lsm_root", + "set.metric_type", + "set.mpls", + "set.next_hop", + "set.origin", + "set.ospf_metric", + "set.path_selection.all", + "set.path_selection.backup", + "set.path_selection.best_path", + "set.path_selection.group_best", + "set.path_selection.multiplath", + "set.path_color", + "set.qos_group", + "set.rib_metric", + "set.rip_metric", + "set.rip_tag", + "set.rt_set", + "set.s_pmsi", + "set.spf_priority", + "set.static_p2mp_te", + "set.tag", + "set.traffic_index", + "set.upstream_core_tree", + "set.vpn_distinguisher", + "set.weight", + ] + + def execute_module(self): + """Execute the module + + :rtype: A dictionary + :returns: The result from module execution + """ + if self.state not in ["parsed", "gathered"]: + self.generate_commands() + self.run_commands() + return self.result + + def generate_commands(self): + """Generate configuration commands to send based on + want, have and desired state. + """ + wantd = self._route_maps_list_to_dict(self.want) + haved = self._route_maps_list_to_dict(self.have) + + # if state is merged, merge want onto have and then compare + if self.state == "merged": + wantd = dict_merge(haved, wantd) + + for k, want in iteritems(wantd): + if self.state == "purged": # for purged state + if haved.pop(k, {}): + self._handle_purged(k) + else: # for all other states + self._compare(want=want, have=haved.pop(k, {}), policy_name=k) + + # clean anything that is surplus, if state purged clean all have if want is empty + if self.state == "overridden" or (self.state == "purged" and not wantd): + for h, haved in iteritems(haved): + self._handle_purged(h) + + def _handle_purged(self, policy_name): + self.commands.append(f"no route-policy {policy_name}") + + def _compare(self, want, have, policy_name): + """Leverages the base class `compare()` method and + populates the list of commands to be run by comparing + the `want` and `have` data with the `parsers` defined + for the Route_maps network resource. + """ + append_endif = False + append_nested_endif = False + append_else_once = True + order_list = [ + "global", + "if_section_", + "elseif_section_", + "elseHas_global_", + "elseHas_if_section_", + "elseHas_elseif_section_", + "elseHas_else_section_", + ] # to maintain the sanity of how commands are generated + begin = len(self.commands) + + for check_cond in order_list: # iterate on the list to preserve sequence + w_res = {key: val for key, val in want.items() if key.startswith(check_cond)} + + for w_condition, w_policy_config in w_res.items(): # loop over want's condition section + h_policy_config = have.pop(w_condition, {}) + + # if want clauses and have clauses are not same + if w_policy_config != h_policy_config: + if self.state in ["replaced", "overridden"]: + # cannot add commands on a adhoc manner it replaces the whole config + h_policy_config = {} + + render_condition = { + "condition": w_policy_config.pop("condition", ""), + "condition_type": w_policy_config.pop("conf_type").split("_section")[0], + } # required to generate conditional statements + + begin_endif = len(self.commands) # handle elseif conditions + + if check_cond.startswith("elseHas_"): + # adds else only once if there is else block + if append_else_once: + self.commands.append("else") + append_else_once = False + + if render_condition.get("condition_type") != "global": + self.addcmd( + render_condition, + "condition", + negate=False, + ) # condition commands added here + if w_policy_config.get("apply"): # as apply is a list + w_apply_config = w_policy_config.pop("apply", {}) + h_apply_config = h_policy_config.pop("apply", {}) + for w_name, w_apply in w_apply_config.items(): + h_apply = h_apply_config.pop(w_name, {}) + # apply config added here + self.compare( + parsers=[ + "apply", + ], + want={"apply": w_apply}, + have={"apply": h_apply}, + ) + # route-policy configs added here + self.compare(parsers=self.parsers, want=w_policy_config, have=h_policy_config) + if len(self.commands) != begin_endif and w_condition.startswith("if_section_"): + # if we want to add any condition we have to start with if + append_endif = True + if len(self.commands) != begin_endif and w_condition.startswith( + "elseHas_if_section_", + ): + append_nested_endif = True # same as above + + if len(self.commands) != begin: + if append_nested_endif: # add endif if there was a nested else + self.commands.append("endif") + if append_endif: # add endif if there was a condition in the top level config + self.commands.append("endif") + self.commands.append("end-policy") # if route-policy then end-policy + self.commands.insert( + begin, + f"route-policy {policy_name}", + ) # the name of the route-policy + + def _route_maps_list_to_dict(self, data): + temp_rmap_list = dict() + + def process_apply(apply_conf): + rm_apply = {} + for apply_config in apply_conf: + rm_apply[apply_config.get("route_policy")] = apply_config + return rm_apply + + for rmap in data: + temp_rmap = dict() + rmap_name = "" + for cond, rm_conf in rmap.items(): + if cond == "name": + rmap_name = rm_conf + temp_rmap["name"] = rmap_name + elif cond in ["if_section", "global"]: + if rm_conf.get("apply"): + rm_conf["apply"] = process_apply(rm_conf.get("apply")) + rm_conf["conf_type"] = cond + if cond == "global": + temp_rmap[cond] = rm_conf + else: + temp_rmap[cond + "_" + (rm_conf.get("condition").replace(" ", "_"))] = ( + rm_conf + ) + elif cond == "elseif_section": + for elif_config in rm_conf: + if elif_config.get("apply"): + elif_config["apply"] = process_apply(elif_config.get("apply")) + elif_config["conf_type"] = cond + temp_rmap[cond + "_" + (elif_config.get("condition").replace(" ", "_"))] = ( + elif_config + ) + elif ( + cond == "else_section" + ): # wanted to do recursion but the overall performance is better this way + for else_cond, else_rm_conf in rm_conf.items(): + if else_cond in ["if_section", "global", "else_section"]: + if else_rm_conf.get("apply"): + else_rm_conf["apply"] = process_apply(else_rm_conf.get("apply")) + else_rm_conf["conf_type"] = else_cond + if else_cond in ["global", "else_section"]: + temp_rmap["elseHas_" + else_cond + "_"] = else_rm_conf + else: + temp_rmap[ + "elseHas_" + + else_cond + + "_" + + (else_rm_conf.get("condition").replace(" ", "_")) + ] = else_rm_conf + elif else_cond == "elseif_section": + for elif_config in else_rm_conf: + if elif_config.get("apply"): + elif_config["apply"] = process_apply(elif_config.get("apply")) + elif_config["conf_type"] = "elseif_section" + temp_rmap[ + "elseHas_" + + else_cond + + "_" + + (elif_config.get("condition").replace(" ", "_")) + ] = elif_config + if temp_rmap: + temp_rmap_list[rmap_name] = temp_rmap + return temp_rmap_list diff --git a/plugins/module_utils/network/iosxr/facts/facts.py b/plugins/module_utils/network/iosxr/facts/facts.py index 9588520f..16da9a2a 100644 --- a/plugins/module_utils/network/iosxr/facts/facts.py +++ b/plugins/module_utils/network/iosxr/facts/facts.py @@ -88,6 +88,9 @@ from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.prefix_lists.prefix_lists import ( Prefix_listsFacts, ) +from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.route_maps.route_maps import ( + Route_mapsFacts, +) from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.snmp_server.snmp_server import ( Snmp_serverFacts, ) @@ -134,6 +137,7 @@ bgp_templates=Bgp_templatesFacts, vrf_address_family=Vrf_address_familyFacts, vrf_global=Vrf_globalFacts, + route_maps=Route_mapsFacts, ) diff --git a/plugins/module_utils/network/iosxr/facts/route_maps/__init__.py b/plugins/module_utils/network/iosxr/facts/route_maps/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/plugins/module_utils/network/iosxr/facts/route_maps/route_maps.py b/plugins/module_utils/network/iosxr/facts/route_maps/route_maps.py new file mode 100644 index 00000000..ddb7c479 --- /dev/null +++ b/plugins/module_utils/network/iosxr/facts/route_maps/route_maps.py @@ -0,0 +1,258 @@ +# -*- 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 + +""" +The iosxr route_maps fact class +It is in this file the configuration is collected from the device +for a given resource, parsed, and the facts tree is populated +based on the configuration. +""" + + +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import utils + +from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.route_maps.route_maps import ( + Route_mapsArgs, +) +from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.rm_templates.route_maps import ( + Route_mapsTemplate, +) + + +class Route_mapsFacts(object): + """The iosxr route_maps facts class""" + + def __init__(self, module, subspec="config", options="options"): + self._module = module + self.argument_spec = Route_mapsArgs.argument_spec + + def get_policynames(self, connection): + return connection.get("show running-config | include route-policy") + + def get_policydata(self, connection, name): + return connection.get(f"show running-config route-policy {name}") + + def parse_condition(self, condition): + if condition.startswith("if "): + condition_type, cond = "if_section", (condition.lstrip("if ")).rstrip(" then") + elif condition.startswith("elseif "): + condition_type, cond = "elseif_section", (condition.lstrip("elseif ")).rstrip(" then") + elif condition.startswith("else"): + condition_type, cond = "else_section", "" + elif condition.startswith("global"): + condition_type, cond = "global", "" + return condition_type, cond + + def parse_route_policy(self, route_policy): + """This would take one route policy as input and process the configurations + and group them by the conditions, the sections that don't have a condition + are grouped into global and the configuration with condition are grouped into + the condition iteslf. This does not invoke the parsers it just groups the + condition with the config lines for the condition under route-policy + + + :param route_policy: raw single route-policy configuration + + :rtype: dictionary + :returns: processed route policy + """ + result = {} + lines = route_policy.splitlines() + current_key = None + current_value = [] + store_global = True + global_value = [] + else_data = {} + + def process_else(else_line): + """this is a separate implementation as else deals with a few parts of config differently""" + else_result = {} + else_current_key = None + else_current_value = [] + else_store_global = True + else_global_value = [] + + for line in else_line: + line = line.strip() + if line.startswith("if ") or line.startswith("elseif ") or line.startswith("else"): + else_store_global = False + if else_current_key: + else_result[else_current_key] = else_current_value + else_current_key = line + else_current_value = [] + else: + else_current_value.append(line) + + if else_store_global: + else_global_value.append(line) + + if else_global_value: + else_result["global"] = else_global_value + + if else_current_key: + else_result[else_current_key] = else_current_value + + return else_result + + for idx, line in enumerate(lines): + line = line.strip() + + if line.startswith("if ") or line.startswith("elseif "): + store_global = False + if current_key: + result[current_key] = current_value + current_key = line + current_value = [] + else: + current_value.append(line) + + if not (line.startswith("if ") or line.startswith("elseif ")) and line.startswith( + "else", + ): + else_data = process_else(lines[idx + 1 : :]) # noqa: E203 + break + + if store_global: + global_value.append(line) + + # Add the last block + if current_key: + result[current_key] = current_value + + if else_data: + result["else"] = else_data + + if global_value: + result["global"] = global_value + + return result + + def get_policy_config(self, policy_data, name): + """Facts for individual policy is generated here, and extends the route_maps facts""" + policy_map_structured = self.parse_route_policy(policy_data) + + def else_resolve_policy_data(else_policy_map): + """Handles else segment, quite similar but different as else in else behaves differently""" + else_policy_route = {} + if_elif = [] + + for condition, policy in else_policy_map.items(): + if_elif_data = {} + cond_type, actual_cond = self.parse_condition(condition) + + route_maps_parser = Route_mapsTemplate(lines=policy, module=self._module) + objs = list(route_maps_parser.parse().values()) + if cond_type in ["if_section", "global"]: + if objs: + else_policy_route[cond_type] = objs[0] + if cond_type != "global": + else_policy_route[cond_type]["condition"] = actual_cond + elif cond_type == "elseif_section": + if_elif_data.update(objs[0]) + if_elif_data["condition"] = actual_cond + if_elif.append(if_elif_data) + elif cond_type == "else_section": + if objs: + else_policy_route[cond_type] = objs[0] + + if if_elif: + else_policy_route["elseif_section"] = if_elif + + return else_policy_route + + def rec_resolve_policy_data(policy_map): + """resolved each policy condition and data and parses policy configuration and sieves out condition data""" + policy_route = { + "name": name, + } + if_elif = [] + else_data = {} + + for condition, policy in policy_map.items(): + if_elif_data = {} + cond_type, actual_cond = self.parse_condition(condition) + + route_maps_parser = Route_mapsTemplate(lines=policy, module=self._module) + objs = list(route_maps_parser.parse().values()) + if cond_type in ["if_section", "global"]: + if objs: + policy_route[cond_type] = objs[0] + if cond_type != "global": + policy_route[cond_type]["condition"] = actual_cond + elif cond_type == "elseif_section": + if_elif_data.update(objs[0]) + if_elif_data["condition"] = actual_cond + if_elif.append(if_elif_data) + elif cond_type == "else_section": + else_data = else_resolve_policy_data(policy) + + if if_elif: + policy_route["elseif_section"] = if_elif + if else_data: + policy_route["else_section"] = else_data + + return policy_route + + rec_policy_route = rec_resolve_policy_data(policy_map_structured) + + return rec_policy_route + + def populate_facts(self, connection, ansible_facts, data=None): + """Populate the facts for Route_maps network resource + + :param connection: the device connection + :param ansible_facts: Facts dictionary + :param data: previously collected conf + + :rtype: dictionary + :returns: facts + """ + facts = {} + objs = [] + policy_names = [] + mock_data = False + + if not data: + # gets policy names as there is no good way to get all policy data at once, + # other than slicing running-config + data = self.get_policynames(connection=connection) + else: + mock_data = True # for states like parsed to work + + # parse native config using the Route_maps template + route_maps_parser = Route_mapsTemplate(lines=[], module=self._module) + + for name in data.splitlines(): # generate a list of policy names + if name.startswith("route-policy "): + policy_names.append(name.split()[1]) + + if mock_data: # only for states like parsed + data_for_parsed = data.split("end-policy\n!") + + for idx, policy in enumerate(policy_names): + if mock_data: + # we enumerate the split data as the name and policy details are on the same sequence + policy_data = data_for_parsed[idx] + else: + # we send the name of the policy and the policy data is fetched for each name, one costly operation + policy_data = self.get_policydata(connection=connection, name=policy) + # the list of policy facts is created as individual route-policy information is converted to facts + objs.append(self.get_policy_config(policy_data=policy_data, name=policy)) + + ansible_facts["ansible_network_resources"].pop("route_maps", None) + + params = utils.remove_empties( + route_maps_parser.validate_config(self.argument_spec, {"config": objs}, redact=True), + ) + + facts["route_maps"] = params.get("config", []) # handles empty config + ansible_facts["ansible_network_resources"].update(facts) + + return ansible_facts diff --git a/plugins/module_utils/network/iosxr/rm_templates/route_maps.py b/plugins/module_utils/network/iosxr/rm_templates/route_maps.py new file mode 100644 index 00000000..09d384ab --- /dev/null +++ b/plugins/module_utils/network/iosxr/rm_templates/route_maps.py @@ -0,0 +1,1170 @@ +# -*- 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 + +""" +The Route_maps parser templates file. This contains +a list of parser definitions and associated functions that +facilitates both facts gathering and native command generation for +the given network resource. +""" + +import re + +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.rm_base.network_template import ( + NetworkTemplate, +) + + +class Route_mapsTemplate(NetworkTemplate): + def __init__(self, lines=None, module=None): + super(Route_mapsTemplate, self).__init__(lines=lines, tmplt=self, module=module) + + # fmt: off + PARSERS = [ + { + "name": "condition", + "getval": re.compile( + r"""^dummy-regex + $""", re.VERBOSE, + ), + "setval": "{{ condition_type }}{{ ' ' + condition if condition_type!='else' }}{{ ' then' if condition_type!='else' }}", + "result": {}, + }, + { + "name": "add.eigrp_metric", + "getval": re.compile( + r""" + \s*add\seigrp-metric + (\s(?P\d+))? + (\s(?P\d+))? + (\s(?P\d+))? + (\s(?P\d+))? + (\s(?P\d+))? + $""", re.VERBOSE, + ), + "setval": "add eigrp-metric {{ add.eigrp_metric.bandwidth|string }}" + " {{ add.eigrp_metric.delay|string }} {{ add.eigrp_metric.reliability|string }}" + " {{ add.eigrp_metric.effective_bandwith|string }} {{ add.eigrp_metric.max_transmission|string }}", + "result": { + "policies": { + "add": { + "eigrp_metric": { + "bandwidth": "{{ bandwidth }}", + "delay": "{{ delay }}", + "reliability": "{{ reliability }}", + "effective_bandwith": "{{ effective_bandwith }}", + "max_transmission": "{{ max_transmission }}", + }, + }, + }, + }, + }, + { + "name": "add.rip_metric", + "getval": re.compile( + r""" + \s*add\srip_metric + (\s(?P\d+))? + $""", re.VERBOSE, + ), + "setval": "add rip-metric {{ add.rip_metric|string }}", + "result": { + "policies": { + "add": { + "rip_metric": "{{ bandwidth }}", + }, + }, + }, + }, + { + "name": "apply", + "getval": re.compile( + r""" + \s*apply + (\s(?P\S+)) + (\s(?P.+))? + $""", re.VERBOSE, + ), + "setval": "apply" + "{{ (' ' + apply.route_policy) if apply.route_policy is defined else '' }}" + "{{ (' ' + apply.route_policy_input) if apply.route_policy_input is defined else '' }}", + "result": { + "policies": { + "apply": [ + { + "route_policy": "{{ route_policy }}", + "route_policy_input": "{{ route_policy_input }}", + }, + ], + }, + }, + }, + { + "name": "drop", + "getval": re.compile( + r""" + \s*drop + $""", re.VERBOSE, + ), + "setval": "drop", + "result": { + "policies": { + "drop": True, + }, + }, + }, + { + "name": "pass", + "getval": re.compile( + r""" + \s*pass + $""", re.VERBOSE, + ), + "setval": "pass", + "result": { + "policies": { + "pass": True, + }, + }, + }, + { + "name": "prepend", + "getval": re.compile( + r""" + \s*prepend + (\sas-path\s(?P\d+))? + (\s(?Pmost-recent))? + (\s(?Pown-as))? + (\s(?P\d+))? + $""", re.VERBOSE, + ), + "setval": "prepend" + "{{ (' as-path ' + prepend.as_path|string) if prepend.as_path is defined else '' }}" + "{{ (' most-recent') if prepend.most_recent is defined else '' }}" + "{{ (' own-as') if prepend.own_as|d(False) is defined else '' }}" + "{{ (' ' + prepend.number_of_times|string) if prepend.number_of_times is defined else '' }}", + "result": { + "policies": { + "prepend": { + "as_path": "{{ as_path }}", + "most_recent": "{{ not not most_recent }}", + "own_as": "{{ not not own_as }}", + "number_of_times": "{{ number_of_times }}", + }, + }, + }, + }, + { + "name": "suppress_route", + "getval": re.compile( + r""" + \s*suppress-route + $""", re.VERBOSE, + ), + "setval": "suppress-route", + "result": { + "policies": { + "suppress_route": True, + }, + }, + }, + { + "name": "unsuppress_route", + "getval": re.compile( + r""" + \s*unsuppress-route + $""", re.VERBOSE, + ), + "setval": "unsuppress-route", + "result": { + "policies": { + "unsuppress_route": True, + }, + }, + }, + { + "name": "remove", + "getval": re.compile( + r""" + \s*remove\sas-path + (\s(?Pprivate-as)) + (\s(?Pentire-aspath))? + $""", re.VERBOSE, + ), + "setval": "remove as-path" + "{{ (' private-as' ) if remove.set|d(False) is defined else '' }}" + "{{ (' entire-aspath' ) if remove.entire_aspath|d(False) is defined else '' }}", + "result": { + "policies": { + "remove": { + "set": True, + "entire_aspath": "{{ not not entire_aspath }}", + }, + }, + }, + }, + { + "name": "set.administrative_distance", + "getval": re.compile( + r""" + \s*set\sadministrative-distance + (\s(?P\d+))? + $""", re.VERBOSE, + ), + "setval": "set administrative-distance {{ set.administrative_distance|string }}", + "result": { + "policies": { + "set": { + "administrative_distance": "{{ administrative_distance }}", + }, + }, + }, + }, + { + "name": "set.aigp_metric", + "getval": re.compile( + r""" + \s*set\saigp-metric + (\s(?P\+))? + (\s(?P\-))? + (\s(?P\d+))? + (\s(?Pigp-cost))? + $""", re.VERBOSE, + ), + "setval": "set aigp-metric" + "{{ (' +' ) if set.aigp_metric.icrement is defined else '' }}" + "{{ (' -' ) if set.aigp_metric.decrement is defined else '' }}" + "{{ (' ' + set.aigp_metric.metric_number|string) if set.aigp_metric.metric_number is defined else '' }}" + "{{ (' igp-cost' ) if set.aigp_metric.igp_cost is defined else '' }}", + "result": { + "policies": { + "set": { + "aigp_metric": { + "icrement": "{{ not not icrement }}", + "decrement": "{{ not not decrement }}", + "metric_number": "{{ metric_number }}", + "igp_cost": "{{ not not igp_cost }}", + }, + }, + }, + }, + }, + { + "name": "set.attribute_set", + "getval": re.compile( + r""" + \s*set\sattribute-set\sname-string + (\s(?P\d+))? + $""", re.VERBOSE, + ), + "setval": "set attribute-set name-string {{ set.attribute_set|string }}", + "result": { + "policies": { + "set": { + "attribute_set": "{{ attribute_set }}", + }, + }, + }, + }, + { + "name": "set.c_multicast_routing", + "getval": re.compile( + r""" + \s*set\sc-multicast-routing + (\s(?Pbgp))? + (\s(?Ppim))? + $""", re.VERBOSE, + ), + "setval": "set c-multicast-routing" + "{{ (' bgp' ) if set.c_multicast_routing.bgp is defined else '' }}" + "{{ (' pim' ) if set.c_multicast_routing.pim is defined else '' }}", + "result": { + "policies": { + "set": { + "c_multicast_routing": { + "bgp": "{{ not not bgp }}", + "pim": "{{ not not pim }}", + }, + }, + }, + }, + }, + { + "name": "set.community", + "getval": re.compile( + r""" + \s*set\scommunity + (\s(?P\S+))? + (\s(?Padditive))? + $""", re.VERBOSE, + ), + "setval": "set community" + "{{ (' ' + set.community.community_name ) if set.community.community_name is defined else '' }}" + "{{ (' additive' ) if set.community.additive is defined else '' }}", + "result": { + "policies": { + "set": { + "community": { + "community_name": "{{ community_name }}", + "additive": "{{ not not additive }}", + }, + }, + }, + }, + }, + { + "name": "set.core_tree", + "getval": re.compile( + r""" + \s*set\score-tree + (\s(?Pingress-replication))? + (\s(?Pingress-replication-default))? + (\s(?Pingress-replication-partitioned))? + (\s(?Pmldp))? + (\s(?Pmldp-default))? + (\s(?Pmldp-inband))? + (\s(?Pmldp-partitioned-mp2mp))? + (\s(?Pmldp-partitioned-p2mp))? + (\s(?Pp2mp-te))? + (\s(?Pp2mp-te-default))? + (\s(?Pp2mp-te-partitioned))? + (\s(?Ppim-default))? + (\s(?Psr-p2mp))? + $""", re.VERBOSE, + ), + "setval": "set core-tree" + "{{ (' ingress-replication' ) if set.core_tree.ingress_replication|d(False) is defined else '' }}" + "{{ (' ingress-replication-default' ) if set.core_tree.ingress_replication_default|d(False) is defined else '' }}" + "{{ (' ingress-replication-partitioned' ) if set.core_tree.ingress_replication_partitioned|d(False) is defined else '' }}" + "{{ (' mldp' ) if set.core_tree.mldp|d(False) is defined else '' }}" + "{{ (' mldp-default' ) if set.core_tree.mldp_default|d(False) is defined else '' }}" + "{{ (' mldp-inband' ) if set.core_tree.mldp_inband|d(False) is defined else '' }}" + "{{ (' mldp-partitioned-mp2mp' ) if set.core_tree.mldp_partitioned_mp2mp|d(False) is defined else '' }}" + "{{ (' mldp-partitioned-p2mp' ) if set.core_tree.mldp_partitioned_p2mp|d(False) is defined else '' }}" + "{{ (' p2mp-te' ) if set.core_tree.p2mp_te|d(False) is defined else '' }}" + "{{ (' p2mp-te-default' ) if set.core_tree.p2mp_te_default|d(False) is defined else '' }}" + "{{ (' p2mp-te-partitioned' ) if set.core_tree.p2mp_te_partitioned|d(False) is defined else '' }}" + "{{ (' pim-default' ) if set.core_tree.pim_default|d(False) is defined else '' }}" + "{{ (' sr-p2mp' ) if set.core_tree.sr_p2mp|d(False) is defined else '' }}", + "result": { + "policies": { + "set": { + "core_tree": { + "ingress_replication": "{{ not not ingress_replication }}", + "ingress_replication_default": "{{ not not ingress_replication_default }}", + "ingress_replication_partitioned": "{{ not not ingress_replication_partitioned }}", + "mldp": "{{ not not mldp }}", + "mldp_default": "{{ not not mldp_default }}", + "mldp_inband": "{{ not not mldp_inband }}", + "mldp_partitioned_mp2mp": "{{ not not mldp_partitioned_mp2mp }}", + "mldp_partitioned_p2mp": "{{ not not mldp_partitioned_p2mp }}", + "p2mp_te": "{{ not not p2mp_te }}", + "p2mp_te_default": "{{ not not p2mp_te_default }}", + "p2mp_te_partitioned": "{{ not not p2mp_te_partitioned }}", + "pim_default": "{{ not not pim_default }}", + "sr_p2mp": "{{ not not sr_p2mp }}", + }, + }, + }, + }, + }, + { + "name": "set.dampening", + "getval": re.compile( + r""" + \s*set\sdampening + (\s(?P\d+))? + (\s(?P\d+))? + (\s(?P\d+))? + (\s(?P\d+))? + $""", re.VERBOSE, + ), + "setval": "set dampening" + "{{ (' ' + set.dampening.halflife|string) if set.dampening.halflife is defined else '' }}" + "{{ (' ' + set.dampening.max_suppress|string) if set.dampening.max_suppress is defined else '' }}" + "{{ (' ' + set.dampening.reuse|string) if set.dampening.reuse is defined else '' }}" + "{{ (' ' + set.dampening.suppress|string) if set.dampening.suppress is defined else '' }}", + "result": { + "policies": { + "set": { + "dampening": { + "halflife": "{{ halflife }}", + "max_suppress": "{{ max_suppress }}", + "reuse": "{{ reuse }}", + "suppress": "{{ suppress }}", + }, + }, + }, + }, + }, + { + "name": "set.downstream_core_tree", + "getval": re.compile( + r""" + \s*set\sdownstream-core-tree + (\s(?Pingress-replication))? + (\s(?Pmldp))? + (\s(?Pp2mp-te))? + (\s(?Psr-p2mp))? + $""", re.VERBOSE, + ), + "setval": "set downstream-core-tree" + "{{ (' ingress-replication' ) if set.downstream_core_tree.ingress_replication|d(False) is defined else '' }}" + "{{ (' mldp' ) if set.downstream_core_tree.mldp|d(False) is defined else '' }}" + "{{ (' p2mp-te' ) if set.downstream_core_tree.p2mp_te|d(False) is defined else '' }}" + "{{ (' sr-p2mp' ) if set.downstream_core_tree.sr_p2mp|d(False) is defined else '' }}", + "result": { + "policies": { + "set": { + "downstream_core_tree": { + "ingress_replication": "{{ not not ingress_replication }}", + "mldp": "{{ not not mldp }}", + "p2mp_te": "{{ not not p2mp_te }}", + "sr_p2mp": "{{ not not sr_p2mp }}", + }, + }, + }, + }, + }, + { + "name": "set.eigrp_metric", + "getval": re.compile( + r""" + \s*set\seigrp-metric + (\s(?P\d+))? + (\s(?P\d+))? + (\s(?P\d+))? + (\s(?P\d+))? + $""", re.VERBOSE, + ), + "setval": "set eigrp-metric" + "{{ (' ' + set.eigrp_metric.bandwidth|string) if set.eigrp_metric.bandwidth is defined else '' }}" + "{{ (' ' + set.eigrp_metric.delay|string) if set.eigrp_metric.delay is defined else '' }}" + "{{ (' ' + set.eigrp_metric.reliability|string) if set.eigrp_metric.reliability is defined else '' }}" + "{{ (' ' + set.eigrp_metric.effective_bandwith|string) if set.eigrp_metric.effective_bandwith is defined else '' }}", + "result": { + "policies": { + "set": { + "eigrp_metric": { + "bandwidth": "{{ bandwidth }}", + "delay": "{{ delay }}", + "reliability": "{{ reliability }}", + "effective_bandwith": "{{ effective_bandwith }}", + "max_transmission": "{{ max_transmission }}", + }, + }, + }, + }, + }, + { + "name": "set.fallback_vrf_lookup", + "getval": re.compile( + r""" + \s*set\sfallback-vrf-lookup + $""", re.VERBOSE, + ), + "setval": "set fallback-vrf-lookup", + "result": { + "policies": { + "set": { + "fallback_vrf_lookup": True, + }, + }, + }, + }, + { + "name": "set.flow_tag", + "getval": re.compile( + r""" + \s*set\sflow-tag + (\s(?P\d+)) + $""", re.VERBOSE, + ), + "setval": "set flow-tag" + "{{ (' ' + set.flow_tag|string) if set.flow_tag is defined else '' }}", + "result": { + "policies": { + "set": { + "flow_tag": "{{ flow_tag }}", + }, + }, + }, + }, + { + "name": "set.forward_class", + "getval": re.compile( + r""" + \s*set\sforward-class + (\s(?P\d+)) + $""", re.VERBOSE, + ), + "setval": "set forward-class" + "{{ (' ' + set.forward_class|string) if set.forward_class is defined else '' }}", + "result": { + "policies": { + "set": { + "forward_class": "{{ forward_class }}", + }, + }, + }, + }, + { + "name": "set.ip_precedence", + "getval": re.compile( + r""" + \s*set\sip-precedence + (\s(?P\d+)) + $""", re.VERBOSE, + ), + "setval": "set ip-precedence" + "{{ (' ' + set.ip_precedence|string) if set.ip_precedence is defined else '' }}", + "result": { + "policies": { + "set": { + "ip_precedence": "{{ ip_precedence }}", + }, + }, + }, + }, + { + "name": "set.isis_metric", + "getval": re.compile( + r""" + \s*set\sisis-metric + (\s(?P\d+)) + $""", re.VERBOSE, + ), + "setval": "set isis-metric" + "{{ (' ' + set.isis_metric|string) if set.isis_metric is defined else '' }}", + "result": { + "policies": { + "set": { + "isis_metric": "{{ isis_metric }}", + }, + }, + }, + }, + { + "name": "set.label", + "getval": re.compile( + r""" + \s*set\slabel + (\s(?P