From 5b66d83236407944703dc1cdf18eb380997cae75 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Tue, 18 May 2021 12:49:46 -0400 Subject: Revert "Prepare vyos release 2.2.1 (#163)" (#166) Revert "Prepare vyos release 2.2.1" Reviewed-by: https://github.com/apps/ansible-zuul --- CHANGELOG.rst | 15 - README.md | 1 - changelogs/changelog.yaml | 17 - .../fragments/160_available_network_resources.yaml | 3 + .../fragments/changelog_doc_path_update.yaml | 3 + changelogs/fragments/fix_delete_route_maps.yaml | 3 + changelogs/fragments/fix_port_groups.yaml | 3 + .../fragments/fix_static_routes_distance.yaml | 3 + changelogs/fragments/vyos-route-maps.yaml | 3 + docs/vyos.vyos.vyos_facts_module.rst | 19 - docs/vyos.vyos.vyos_route_maps_module.rst | 2042 -------------------- 11 files changed, 18 insertions(+), 2094 deletions(-) create mode 100644 changelogs/fragments/160_available_network_resources.yaml create mode 100644 changelogs/fragments/changelog_doc_path_update.yaml create mode 100644 changelogs/fragments/fix_delete_route_maps.yaml create mode 100644 changelogs/fragments/fix_port_groups.yaml create mode 100644 changelogs/fragments/fix_static_routes_distance.yaml create mode 100644 changelogs/fragments/vyos-route-maps.yaml delete mode 100644 docs/vyos.vyos.vyos_route_maps_module.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 717483d1..9a931d62 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,21 +5,6 @@ Vyos Collection Release Notes .. contents:: Topics -v2.2.1 -====== - -Minor Changes -------------- - -- Add support for available_network_resources key, which allows to fetch the available resources for a platform (https://github.com/ansible-collections/vyos.vyos/issues/138). -- Add vyos_route_maps resource module (https://github.com/ansible-collections/vyos.vyos/pull/156.). - -Bugfixes --------- - -- change admin_distance to distance while generating static_routes nexthop command. -- firewall_global - port-groups were not added (https://github.com/ansible-collections/vyos.vyos/issues/107) - v2.2.0 ====== diff --git a/README.md b/README.md index 7100b1b2..9039aabb 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,6 @@ Name | Description [vyos.vyos.vyos_ospfv2](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_ospfv2_module.rst)|OSPFv2 resource module [vyos.vyos.vyos_ospfv3](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_ospfv3_module.rst)|OSPFV3 resource module [vyos.vyos.vyos_ping](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_ping_module.rst)|Tests reachability using ping from VyOS network devices -[vyos.vyos.vyos_route_maps](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_route_maps_module.rst)|Route Map Resource Module. [vyos.vyos.vyos_static_route](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_static_route_module.rst)|(deprecated, removed after 2022-06-01) Manage static IP routes on Vyatta VyOS network devices [vyos.vyos.vyos_static_routes](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_static_routes_module.rst)|Static routes resource module [vyos.vyos.vyos_system](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_system_module.rst)|Run `set system` commands on VyOS devices diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 4342dd97..1978f014 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -228,20 +228,3 @@ releases: - no_log_mask.yaml - remove-old-test-deps.yml release_date: '2021-04-27' - 2.2.1: - changes: - bugfixes: - - change admin_distance to distance while generating static_routes nexthop command. - - firewall_global - port-groups were not added (https://github.com/ansible-collections/vyos.vyos/issues/107) - minor_changes: - - Add support for available_network_resources key, which allows to fetch the - available resources for a platform (https://github.com/ansible-collections/vyos.vyos/issues/138). - - Add vyos_route_maps resource module (https://github.com/ansible-collections/vyos.vyos/pull/156.). - fragments: - - 160_available_network_resources.yaml - - changelog_doc_path_update.yaml - - fix_delete_route_maps.yaml - - fix_port_groups.yaml - - fix_static_routes_distance.yaml - - vyos-route-maps.yaml - release_date: '2021-05-17' diff --git a/changelogs/fragments/160_available_network_resources.yaml b/changelogs/fragments/160_available_network_resources.yaml new file mode 100644 index 00000000..c7a92f21 --- /dev/null +++ b/changelogs/fragments/160_available_network_resources.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: + - Add support for available_network_resources key, which allows to fetch the available resources for a platform (https://github.com/ansible-collections/vyos.vyos/issues/138). diff --git a/changelogs/fragments/changelog_doc_path_update.yaml b/changelogs/fragments/changelog_doc_path_update.yaml new file mode 100644 index 00000000..e32d8292 --- /dev/null +++ b/changelogs/fragments/changelog_doc_path_update.yaml @@ -0,0 +1,3 @@ +--- +trivial: + - Update changelog doc path link in README. diff --git a/changelogs/fragments/fix_delete_route_maps.yaml b/changelogs/fragments/fix_delete_route_maps.yaml new file mode 100644 index 00000000..ac14f57a --- /dev/null +++ b/changelogs/fragments/fix_delete_route_maps.yaml @@ -0,0 +1,3 @@ +--- +trivial: + - fix delete integration test diff --git a/changelogs/fragments/fix_port_groups.yaml b/changelogs/fragments/fix_port_groups.yaml new file mode 100644 index 00000000..abe592be --- /dev/null +++ b/changelogs/fragments/fix_port_groups.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: + - firewall_global - port-groups were not added (https://github.com/ansible-collections/vyos.vyos/issues/107) diff --git a/changelogs/fragments/fix_static_routes_distance.yaml b/changelogs/fragments/fix_static_routes_distance.yaml new file mode 100644 index 00000000..97caa18b --- /dev/null +++ b/changelogs/fragments/fix_static_routes_distance.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: + - change admin_distance to distance while generating static_routes nexthop command. diff --git a/changelogs/fragments/vyos-route-maps.yaml b/changelogs/fragments/vyos-route-maps.yaml new file mode 100644 index 00000000..6f4e07f8 --- /dev/null +++ b/changelogs/fragments/vyos-route-maps.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: + - Add vyos_route_maps resource module (https://github.com/ansible-collections/vyos.vyos/pull/156.). diff --git a/docs/vyos.vyos.vyos_facts_module.rst b/docs/vyos.vyos.vyos_facts_module.rst index b931d4c1..3177888b 100644 --- a/docs/vyos.vyos.vyos_facts_module.rst +++ b/docs/vyos.vyos.vyos_facts_module.rst @@ -33,25 +33,6 @@ Parameters Choices/Defaults Comments - - -
- available_network_resources - -
- boolean -
- - - - - -
When 'True' a list of network resources for which resource modules are available will be provided.
- -
diff --git a/docs/vyos.vyos.vyos_route_maps_module.rst b/docs/vyos.vyos.vyos_route_maps_module.rst deleted file mode 100644 index 78c75b47..00000000 --- a/docs/vyos.vyos.vyos_route_maps_module.rst +++ /dev/null @@ -1,2042 +0,0 @@ -.. _vyos.vyos.vyos_route_maps_module: - - -************************* -vyos.vyos.vyos_route_maps -************************* - -**Route Map Resource Module.** - - -Version added: 2.3.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module manages route map configurations on devices running VYOS. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
A list of route-map configuration.
-
-
- entries - -
- list - / elements=dictionary -
-
- -
Route Map rules.
-

aliases: rules
-
-
- action - -
- string -
-
-
    Choices: -
  • deny
  • -
  • permit
  • -
-
-
Action for matching routes
-
-
- call - -
- string -
-
- -
Route map name
-
-
- continue_sequence - -
- integer -
-
- -
Continue on a different entry within the route-map.
-
-
- description - -
- string -
-
- -
Description for the rule.
-
-
- match - -
- dictionary -
-
- -
Route parameters to match.
-
-
- as_path - -
- string -
-
- -
Set as-path.
-
-
- community - -
- dictionary -
-
- -
BGP community attribute.
-
-
- community_list - -
- string -
-
- -
BGP community-list to match
-
-
- exact_match - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
BGP community-list to match
-
-
- extcommunity - -
- string -
-
- -
Extended community name.
-
-
- interface - -
- string -
-
- -
First hop interface of a route to match.
-
-
- ip - -
- dictionary -
-
- -
IP prefix parameters to match.
-
-
- address - -
- dictionary -
-
- -
IP address of route to match.
-
-
- list_type - -
- string -
-
-
    Choices: -
  • access-list
  • -
  • prefix-list
  • -
-
-
type of list
-
-
- value - -
- string -
-
- -
value of access-list and prefix list
-
-
- next_hop - -
- dictionary -
-
- -
next hop prefix list.
-
-
- list_type - -
- string -
-
-
    Choices: -
  • access-list
  • -
  • prefix-list
  • -
-
-
type of list
-
-
- value - -
- string -
-
- -
value of access-list and prefix list
-
-
- route_source - -
- dictionary -
-
- -
IP route-source to match
-
-
- list_type - -
- string -
-
-
    Choices: -
  • access-list
  • -
  • prefix-list
  • -
-
-
type of list
-
-
- value - -
- string -
-
- -
value of access-list and prefix list
-
-
- ipv6 - -
- dictionary -
-
- -
IPv6 prefix parameters to match.
-
-
- address - -
- dictionary -
-
- -
IPv6 address of route to match.
-
-
- list_type - -
- string -
-
-
    Choices: -
  • access-list
  • -
  • prefix-list
  • -
-
-
type of list
-
-
- value - -
- string -
-
- -
value of access-list and prefix list
-
-
- next_hop - -
- string -
-
- -
next-hop ipv6 address IPv6 <h:h:h:h:h:h:h:h>.
-
-
- large_community_large_community_list - -
- string -
-
- -
BGP large-community-list to match.
-
-
- metric - -
- integer -
-
- -
Route metric <1-65535>.
-
-
- origin - -
- string -
-
-
    Choices: -
  • ebgp
  • -
  • ibgp
  • -
  • incomplete
  • -
-
-
bgp origin.
-
-
- peer - -
- string -
-
- -
Peer IP address <x.x.x.x>.
-
-
- rpki - -
- string -
-
-
    Choices: -
  • notfound
  • -
  • invalid
  • -
  • valid
  • -
-
-
RPKI validation value.
-
-
- on_match - -
- dictionary -
-
- -
Exit policy on matches.
-
-
- goto - -
- integer -
-
- -
Rule number to goto on match <1-65535>.
-
-
- next - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Next sequence number to goto on match.
-
-
- sequence - -
- integer -
-
- -
Route map rule number <1-65535>.
-
-
- set - -
- dictionary -
-
- -
Route parameters.
-
-
- aggregator - -
- dictionary -
-
- -
Border Gateway Protocol (BGP) aggregator attribute.
-
-
- as - -
- string -
-
- -
AS number of an aggregation.
-
-
- ip - -
- string -
-
- -
IP address.
-
-
- as_path_exclude - -
- string -
-
- -
BGP AS path exclude string ex "456 64500 45001"
-
-
- as_path_prepend - -
- string -
-
- -
Prepend string for a Border Gateway Protocol (BGP) AS-path attribute.
-
-
- atomic_aggregate - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Border Gateway Protocol (BGP) atomic aggregate attribute.
-
-
- bgp_extcommunity_rt - -
- string -
-
- -
ExtCommunity in format AS:value
-
-
- comm_list - -
- dictionary -
-
- -
Border Gateway Protocol (BGP) communities matching a community-list.
-
-
- comm_list - -
- string -
-
- -
BGP communities with a community-list.
-
-
- delete - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Delete BGP communities matching the community-list.
-
-
- community - -
- dictionary -
-
- -
Border Gateway Protocl (BGP) community attribute.
-
-
- value - -
- string -
-
- -
Community in 4 octet AS:value format or it can be from local-AS, no-advertise,no-expert,internet,additive,none.
-
-
- extcommunity_rt - -
- string -
-
- -
Set route target value.ASN:nn_or_IP_address:nn VPN extended community.
-
-
- extcommunity_soo - -
- string -
-
- -
Set Site of Origin value. ASN:nn_or_IP_address:nn VPN extended community
-
-
- ip_next_hop - -
- string -
-
- -
IP address.
-
-
- ipv6_next_hop - -
- dictionary -
-
- -
Nexthop IPv6 address.
-
-
- ip_type - -
- string -
-
-
    Choices: -
  • global
  • -
  • local
  • -
-
-
Global or Local
-
-
- value - -
- string -
-
- -
ipv6 address
-
-
- large_community - -
- string -
-
- -
Set BGP large community value.
-
-
- local_preference - -
- string -
-
- -
Border Gateway Protocol (BGP) local preference attribute.Example <0-4294967295>.
-
-
- metric - -
- string -
-
- -
Destination routing protocol metric. Example <0-4294967295>.
-
-
- metric_type - -
- string -
-
-
    Choices: -
  • type-1
  • -
  • type-2
  • -
-
-
Open Shortest Path First (OSPF) external metric-type.
-
-
- origin - -
- string -
-
-
    Choices: -
  • egp
  • -
  • igp
  • -
  • incomplete
  • -
-
-
Set bgp origin.
-
-
- originator_id - -
- string -
-
- -
Border Gateway Protocol (BGP) originator ID attribute. Orignator IP address.
-
-
- src - -
- string -
-
- -
Source address for route. Example <x.x.x.x> IP address.
-
-
- tag - -
- string -
-
- -
Tag value for routing protocol. Example <1-65535>
-
-
- weight - -
- string -
-
- -
Border Gateway Protocol (BGP) weight attribute. Example <0-4294967295>
-
-
- route_map - -
- string -
-
- -
Route map name.
-
-
- running_config - -
- string -
-
- -
This option is used only with state parsed.
-
The value of this option should be the output received from the VYOS device by executing the command show configuration commands | grep route-map.
-
The state parsed reads the configuration from show configuration commands | grep route-map 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: -
  • deleted
  • -
  • merged ←
  • -
  • overridden
  • -
  • replaced
  • -
  • gathered
  • -
  • rendered
  • -
  • parsed
  • -
-
-
The state the configuration should be left in.
-
-
- - -Notes ------ - -.. note:: - - Tested against vyos 1.2. - - This module works with connection ``network_cli``. - - - -Examples --------- - -.. code-block:: yaml - - # Using merged - # Before state - - # vyos@vyos:~$ show configuration commands | match "set policy route-map" - # vyos@vyos:~$ - - name: Merge the provided configuration with the exisiting running configuration - register: result - vyos.vyos.vyos_route_maps: &id001 - config: - - route_map: test1 - entries: - - sequence: 1 - description: "test" - action: permit - continue: 2 - on_match: - next: True - - route_map: test3 - entries: - - sequence: 1 - action: permit - match: - rpki: invalid - metric: 1 - peer: 192.0.2.32 - set: - local_preference: 4 - metric: 5 - metric_type: "type-1" - origin: egp - originator_id: 192.0.2.34 - tag: 5 - weight: 4 - state: merged - # After State - # vyos@vyos:~$ show configuration commands | match "set policy route-maps" - # set policy route-map test1 rule 1 description test - # set policy route-map test1 rule 1 action permit - # set policy route-map test1 rule 1 continue 2 - # set policy route-map test1 rule 1 on-match next - # set policy route-map test3 rule 1 action permit - # set policy route-map test3 rule 1 set local-preference 4 - # set policy route-map test3 rule 1 set metric 5 - # set policy route-map test3 rule 1 set metric-type type-1 - # set policy route-map test3 rule 1 set origin egp - # set policy route-map test3 rule 1 set originator-id 192.0.2.34 - # set policy route-map test3 rule 1 set tag 5 - # set policy route-map test3 rule 1 set weight 4 - # set policy route-map test3 rule 1 match metric 1 - # set policy route-map test3 rule 1 match peer 192.0.2.32 - # set policy route-map test3 rule 1 match rpki invalid - - # "after": [ - # { - # "entries": [ - # { - # "action": "permit", - # "continue_sequence": 2, - # "description": "test", - # "on_match": { - # "next": true - # }, - # "sequence": 1 - # } - # ], - # "route_map": "test1" - # }, - # { - # "entries": [ - # { - # "action": "permit", - # "match": { - # "metric": 1, - # "peer": "192.0.2.32", - # "rpki": "invalid" - # }, - # "sequence": 1, - # "set": { - # "local_preference": "4", - # "metric": "5", - # "metric_type": "type-1", - # "origin": "egp", - # "originator_id": "192.0.2.34", - # "tag": "5", - # "weight": "4" - # } - # } - # ], - # "route_map": "test3" - # } - # ], - # "before": {}, - # "changed": true, - # "commands": [ - # "set policy route-map test1 rule 1 description test", - # "set policy route-map test1 rule 1 action permit", - # "set policy route-map test1 rule 1 continue 2", - # "set policy route-map test1 rule 1 on-match next", - # "set policy route-map test3 rule 1 action permit", - # "set policy route-map test3 rule 1 set local-preference 4", - # "set policy route-map test3 rule 1 set metric 5", - # "set policy route-map test3 rule 1 set metric-type type-1", - # "set policy route-map test3 rule 1 set origin egp", - # "set policy route-map test3 rule 1 set originator-id 192.0.2.34", - # "set policy route-map test3 rule 1 set tag 5", - # "set policy route-map test3 rule 1 set weight 4", - # "set policy route-map test3 rule 1 match metric 1", - # "set policy route-map test3 rule 1 match peer 192.0.2.32", - # "set policy route-map test3 rule 1 match rpki invalid" - # ], - - # Using replaced: - # -------------- - - # Before state: - # vyos@vyos:~$ show configuration commands | match "set route-map policy" - # set policy route-map test2 rule 1 action 'permit' - # set policy route-map test2 rule 1 description 'test' - # set policy route-map test2 rule 1 on-match next - # set policy route-map test2 rule 2 action 'permit' - # set policy route-map test2 rule 2 on-match goto '4' - # set policy route-map test3 rule 1 action 'permit' - # set policy route-map test3 rule 1 match metric '1' - # set policy route-map test3 rule 1 match peer '192.0.2.32' - # set policy route-map test3 rule 1 match rpki 'invalid' - # set policy route-map test3 rule 1 set community 'internet' - # set policy route-map test3 rule 1 set ip-next-hop '192.0.2.33' - # set policy route-map test3 rule 1 set local-preference '4' - # set policy route-map test3 rule 1 set metric '5' - # set policy route-map test3 rule 1 set metric-type 'type-1' - # set policy route-map test3 rule 1 set origin 'egp' - # set policy route-map test3 rule 1 set originator-id '192.0.2.34' - # set policy route-map test3 rule 1 set tag '5' - # set policy route-map test3 rule 1 set weight '4' - # - # - name: Replace the provided configuration with the exisiting running configuration - # register: result - # vyos.vyos.vyos_route_maps: &id001 - # config: - # - route_map: test3 - # entries: - # - sequence: 1 - # action: permit - # match: - # rpki: invalid - # metric: 3 - # peer: 192.0.2.35 - # set: - # local_preference: 6 - # metric: 4 - # metric_type: "type-1" - # origin: egp - # originator_id: 192.0.2.34 - # tag: 4 - # weight: 4 - # state: replaced - # After state: - - # vyos@vyos:~$ show configuration commands | match "set policy route-map" - # set policy route-map test3 rule 1 set local-preference 6 - # set policy route-map test3 rule 1 set metric 4 - # set policy route-map test3 rule 1 set tag 4 - # set policy route-map test3 rule 1 match metric 3 - # set policy route-map test3 rule 1 match peer 192.0.2.35 - # vyos@vyos:~$ - # - # - # Module Execution: - # - # "after": [ - # { - # "entries": [ - # { - # "action": "permit", - # "description": "test", - # "on_match": { - # "next": true - # }, - # "sequence": 1 - # }, - # { - # "action": "permit", - # "on_match": { - # "goto": 4 - # }, - # "sequence": 2 - # } - # ], - # "route_map": "test2" - # }, - # { - # "entries": [ - # { - # "action": "permit", - # "match": { - # "metric": 3, - # "peer": "192.0.2.35", - # "rpki": "invalid" - # }, - # "sequence": 1, - # "set": { - # "local_preference": "6", - # "metric": "4", - # "metric_type": "type-1", - # "origin": "egp", - # "originator_id": "192.0.2.34", - # "tag": "4", - # "weight": "4" - # } - # } - # ], - # "route_map": "test3" - # } - # ], - # "before": [ - # { - # "entries": [ - # { - # "action": "permit", - # "description": "test", - # "on_match": { - # "next": true - # }, - # "sequence": 1 - # }, - # { - # "action": "permit", - # "on_match": { - # "goto": 4 - # }, - # "sequence": 2 - # } - # ], - # "route_map": "test2" - # }, - # { - # "entries": [ - # { - # "action": "permit", - # "match": { - # "metric": 1, - # "peer": "192.0.2.32", - # "rpki": "invalid" - # }, - # "sequence": 1, - # "set": { - # "community": { - # "value": "internet" - # }, - # "ip_next_hop": "192.0.2.33", - # "local_preference": "4", - # "metric": "5", - # "metric_type": "type-1", - # "origin": "egp", - # "originator_id": "192.0.2.34", - # "tag": "5", - # "weight": "4" - # } - # } - # ], - # "route_map": "test3" - # } - # ], - # "changed": true, - # "commands": [ - # "delete policy route-map test3 rule 1 set ip-next-hop 192.0.2.33", - # "set policy route-map test3 rule 1 set local-preference 6", - # "set policy route-map test3 rule 1 set metric 4", - # "set policy route-map test3 rule 1 set tag 4", - # "delete policy route-map test3 rule 1 set community internet", - # "set policy route-map test3 rule 1 match metric 3", - # "set policy route-map test3 rule 1 match peer 192.0.2.35" - # ], - # - # Using deleted: - # ------------- - - # Before state: - # vyos@vyos:~$ show configuration commands | match "set policy route-map" - # set policy route-map test3 rule 1 set local-preference 6 - # set policy route-map test3 rule 1 set metric 4 - # set policy route-map test3 rule 1 set tag 4 - # set policy route-map test3 rule 1 match metric 3 - # set policy route-map test3 rule 1 match peer 192.0.2.35 - # vyos@vyos:~$ - # - # - name: Delete the provided configuration - # register: result - # vyos.vyos.vyos_route_maps: - # config: - # state: deleted - # After state: - - # vyos@vyos:~$ show configuration commands | match "set policy route-map" - # vyos@vyos:~$ - # - # - # Module Execution: - # - # "after": {}, - # "before": [ - # { - # "entries": [ - # { - # "action": "permit", - # "match": { - # "metric": 3, - # "peer": "192.0.2.35", - # }, - # "sequence": 1, - # "set": { - # "local_preference": "6", - # "metric": "4", - # "tag": "4", - # } - # } - # ], - # "route_map": "test3" - # } - # ], - # "changed": true, - # "commands": [ - # "delete policy route-map test3" - # ], - # - # using gathered: - # -------------- - # - # Before state: - # vyos@vyos:~$ show configuration commands | match "set policy route-maps" - # set policy route-map test1 rule 1 description test - # set policy route-map test1 rule 1 action permit - # set policy route-map test1 rule 1 continue 2 - # set policy route-map test1 rule 1 on-match next - # set policy route-map test3 rule 1 action permit - # set policy route-map test3 rule 1 set local-preference 4 - # set policy route-map test3 rule 1 set metric 5 - # set policy route-map test3 rule 1 set metric-type type-1 - # set policy route-map test3 rule 1 set origin egp - # set policy route-map test3 rule 1 set originator-id 192.0.2.34 - # set policy route-map test3 rule 1 set tag 5 - # set policy route-map test3 rule 1 set weight 4 - # set policy route-map test3 rule 1 match metric 1 - # set policy route-map test3 rule 1 match peer 192.0.2.32 - # set policy route-map test3 rule 1 match rpki invalid - # - # - name: gather configs - # vyos.vyos.vyos_route_maps: - # state: gathered - - # "gathered": [ - # { - # "entries": [ - # { - # "action": "permit", - # "continue_sequence": 2, - # "description": "test", - # "on_match": { - # "next": true - # }, - # "sequence": 1 - # } - # ], - # "route_map": "test1" - # }, - # { - # "entries": [ - # { - # "action": "permit", - # "match": { - # "metric": 1, - # "peer": "192.0.2.32", - # "rpki": "invalid" - # }, - # "sequence": 1, - # "set": { - # "local_preference": "4", - # "metric": "5", - # "metric_type": "type-1", - # "origin": "egp", - # "originator_id": "192.0.2.34", - # "tag": "5", - # "weight": "4" - # } - # } - # ], - # "route_map": "test3" - # } - # ] - - # Using parsed: - # ------------ - - # parsed.cfg - # set policy route-map test1 rule 1 description test - # set policy route-map test1 rule 1 action permit - # set policy route-map test1 rule 1 continue 2 - # set policy route-map test1 rule 1 on-match next - # set policy route-map test3 rule 1 action permit - # set policy route-map test3 rule 1 set local-preference 4 - # set policy route-map test3 rule 1 set metric 5 - # set policy route-map test3 rule 1 set metric-type type-1 - # set policy route-map test3 rule 1 set origin egp - # set policy route-map test3 rule 1 set originator-id 192.0.2.34 - # set policy route-map test3 rule 1 set tag 5 - # set policy route-map test3 rule 1 set weight 4 - # set policy route-map test3 rule 1 match metric 1 - # set policy route-map test3 rule 1 match peer 192.0.2.32 - # set policy route-map test3 rule 1 match rpki invalid - # - # - name: parse configs - # vyos.vyos.vyos_route_maps: - # running_config: "{{ lookup('file', './parsed.cfg') }}" - # state: parsed - # tags: - # - parsed - # - # Module execution: - # "parsed": [ - # { - # "entries": [ - # { - # "action": "permit", - # "continue_sequence": 2, - # "description": "test", - # "on_match": { - # "next": true - # }, - # "sequence": 1 - # } - # ], - # "route_map": "test1" - # }, - # { - # "entries": [ - # { - # "action": "permit", - # "match": { - # "metric": 1, - # "peer": "192.0.2.32", - # "rpki": "invalid" - # }, - # "sequence": 1, - # "set": { - # "local_preference": "4", - # "metric": "5", - # "metric_type": "type-1", - # "origin": "egp", - # "originator_id": "192.0.2.34", - # "tag": "5", - # "weight": "4" - # } - # } - # ], - # "route_map": "test3" - # } - # ] - # - # - # Using rendered: - # -------------- - # - name: Structure provided configuration into device specific commands - # register: result - # vyos.vyos.vyos_route_maps: &id001 - # config: - # - route_map: test1 - # entries: - # - sequence: 1 - # description: "test" - # action: permit - # continue_sequence: 2 - # on_match: - # next: True - # - route_map: test3 - # entries: - # - sequence: 1 - # action: permit - # match: - # rpki: invalid - # metric: 1 - # peer: 192.0.2.32 - # set: - # local_preference: 4 - # metric: 5 - # metric_type: "type-1" - # origin: egp - # originator_id: 192.0.2.34 - # tag: 5 - # weight: 4 - # state: rendered - # Module Execution: - # "rendered": [ - # "set policy route-map test1 rule 1 description test", - # "set policy route-map test1 rule 1 action permit", - # "set policy route-map test1 rule 1 continue 2", - # "set policy route-map test1 rule 1 on-match next", - # "set policy route-map test3 rule 1 action permit", - # "set policy route-map test3 rule 1 set local-preference 4", - # "set policy route-map test3 rule 1 set metric 5", - # "set policy route-map test3 rule 1 set metric-type type-1", - # "set policy route-map test3 rule 1 set origin egp", - # "set policy route-map test3 rule 1 set originator-id 192.0.2.34", - # "set policy route-map test3 rule 1 set tag 5", - # "set policy route-map test3 rule 1 set weight 4", - # "set policy route-map test3 rule 1 match metric 1", - # "set policy route-map test3 rule 1 match peer 192.0.2.32", - # "set policy route-map test3 rule 1 match rpki invalid" - # ] - # - # - # Using overridden: - # -------------- - # Before state: - # vyos@vyos:~$ show configuration commands | match "set policy route-map" - # set policy route-map test2 rule 1 action 'permit' - # set policy route-map test2 rule 1 description 'test' - # set policy route-map test2 rule 1 on-match next - # set policy route-map test2 rule 2 action 'permit' - # set policy route-map test2 rule 2 on-match goto '4' - # set policy route-map test3 rule 1 action 'permit' - # set policy route-map test3 rule 1 match metric '1' - # set policy route-map test3 rule 1 match peer '192.0.2.32' - # set policy route-map test3 rule 1 match rpki 'invalid' - # set policy route-map test3 rule 1 set community 'internet' - # set policy route-map test3 rule 1 set ip-next-hop '192.0.2.33' - # set policy route-map test3 rule 1 set local-preference '4' - # set policy route-map test3 rule 1 set metric '5' - # set policy route-map test3 rule 1 set metric-type 'type-1' - # set policy route-map test3 rule 1 set origin 'egp' - # set policy route-map test3 rule 1 set originator-id '192.0.2.34' - # set policy route-map test3 rule 1 set tag '5' - # set policy route-map test3 rule 1 set weight '4' - # - # - name: Override the existing configuration with the provided running configuration - # register: result - # vyos.vyos.vyos_route_maps: &id001 - # config: - # - route_map: test3 - # entries: - # - sequence: 1 - # action: permit - # match: - # rpki: invalid - # metric: 3 - # peer: 192.0.2.35 - # set: - # local_preference: 6 - # metric: 4 - # metric_type: "type-1" - # origin: egp - # originator_id: 192.0.2.34 - # tag: 4 - # weight: 4 - # state: overridden - # After state: - - # vyos@vyos:~$ show configuration commands | match "set policy route-map" - # set policy route-map test3 rule 1 set metric-type 'type-1' - # set policy route-map test3 rule 1 set origin 'egp' - # set policy route-map test3 rule 1 set originator-id '192.0.2.34' - # set policy route-map test3 rule 1 set weight '4' - # set policy route-map test3 rule 1 set local-preference 6 - # set policy route-map test3 rule 1 set metric 4 - # set policy route-map test3 rule 1 set tag 4 - # set policy route-map test3 rule 1 match metric 3 - # set policy route-map test3 rule 1 match peer 192.0.2.35 - # set policy route-map test3 rule 1 match rpki 'invalid' - - # Module Execution: - # "after": [ - # { - # "entries": [ - # { - # "action": "permit", - # "match": { - # "metric": 3, - # "peer": "192.0.2.35", - # "rpki": "invalid" - # }, - # "sequence": 1, - # "set": { - # "local_preference": "6", - # "metric": "4", - # "metric_type": "type-1", - # "origin": "egp", - # "originator_id": "192.0.2.34", - # "tag": "4", - # "weight": "4" - # } - # } - # ], - # "route_map": "test3" - # } - # ], - # "before": [ - # { - # "entries": [ - # { - # "action": "permit", - # "description": "test", - # "on_match": { - # "next": true - # }, - # "sequence": 1 - # }, - # { - # "action": "permit", - # "on_match": { - # "goto": 4 - # }, - # "sequence": 2 - # } - # ], - # "route_map": "test2" - # }, - # { - # "entries": [ - # { - # "action": "permit", - # "match": { - # "metric": 1, - # "peer": "192.0.2.32", - # "rpki": "invalid" - # }, - # "sequence": 1, - # "set": { - # "community": { - # "value": "internet" - # }, - # "ip_next_hop": "192.0.2.33", - # "local_preference": "4", - # "metric": "5", - # "metric_type": "type-1", - # "origin": "egp", - # "originator_id": "192.0.2.34", - # "tag": "5", - # "weight": "4" - # } - # } - # ], - # "route_map": "test3" - # } - # ], - # "changed": true, - # "commands": [ - # "delete policy route-map test2", - # "delete policy route-map test3 rule 1 set ip-next-hop 192.0.2.33", - # "set policy route-map test3 rule 1 set local-preference 6", - # "set policy route-map test3 rule 1 set metric 4", - # "set policy route-map test3 rule 1 set tag 4", - # "delete policy route-map test3 rule 1 set community internet", - # "set policy route-map test3 rule 1 match metric 3", - # "set policy route-map test3 rule 1 match peer 192.0.2.35" - # ], - # - - - - -Status ------- - - -Authors -~~~~~~~ - -- Ashwini Mhatre (@amhatre) -- cgit v1.2.3