From 6b9cdb96e994bbae767a8169438f2c63e65a62be Mon Sep 17 00:00:00 2001 From: Ruchi Pakhle Date: Tue, 24 Dec 2024 10:50:35 +0530 Subject: [PATCH] fix bug --- .../ios/rm_templates/vrf_address_family.py | 244 +++++++++--------- 1 file changed, 122 insertions(+), 122 deletions(-) diff --git a/plugins/module_utils/network/ios/rm_templates/vrf_address_family.py b/plugins/module_utils/network/ios/rm_templates/vrf_address_family.py index cde86df8a..77389b010 100644 --- a/plugins/module_utils/network/ios/rm_templates/vrf_address_family.py +++ b/plugins/module_utils/network/ios/rm_templates/vrf_address_family.py @@ -116,128 +116,128 @@ def __init__(self, lines=None, module=None): }, }, }, - # { - # "name": "export.ipv4.multicast", - # "getval": re.compile( - # r""" - # ^vrf\sdefinition\s(?P\S+) - # (?P\s+address-family\s(?P\S+)\s(?P\S+)) - # \s+export\sipv4\smulticast\s(?P\d+)\smap\s(?P\S+) - # $""", re.VERBOSE, - # ), - # "setval": "export ipv4 multicast {{ export.ipv4.multicast.prefix }} map {{ export.ipv4.multicast.prefix.map }}", - # "result": { - # '{{ name }}': { - # 'name': '{{ name }}', - # "address_families": { - # '{{ "address_families_" + afi + "_" + safi }}': { - # "afi": "{{ afi }}", - # "safi": "{{ safi }}", - # "export": { - # "ipv4": { - # "multicast": { - # "prefix": "{{ prefix }}", - # "map": "{{ export_map }}", - # }, - # }, - # }, - # }, - # }, - # }, - # }, - # }, - # { - # "name": "export.ipv4.unicast.allow_evpn", - # "getval": re.compile( - # r""" - # ^vrf\sdefinition\s(?P\S+) - # (?P\s+address-family\s(?P\S+)\s(?P\S+)) - # \s+export\sipv4\sunicast\s(?P\d+)\smap\s(?P\S+)\s(?Pallow-evpn) - # $""", re.VERBOSE, - # ), - # "setval": "export ipv4 unicast {{ export.prefix }} map {{ export.map }} allow-evpn", - # "result": { - # '{{ name }}': { - # 'name': '{{ name }}', - # "address_families": { - # '{{ "address_families_" + afi + "_" + safi }}': { - # "afi": "{{ afi }}", - # "safi": "{{ safi }}", - # "export": { - # "ipv4": { - # "unicast": { - # "prefix": "{{ prefix }}", - # "map": "{{ export_map }}", - # "allow_evpn": "{{ true if allow_evpn is defined }}", - # }, - # }, - # }, - # }, - # }, - # }, - # }, - # }, - # { - # "name": "import_config.ipv4.multicast", - # "getval": re.compile( - # r""" - # ^vrf\sdefinition\s(?P\S+) - # (?P\s+address-family\s(?P\S+)\s(?P\S+)) - # \s+import\sipv4\smulticast\s(?P\d+)\smap\s(?P\S+) - # $""", re.VERBOSE, - # ), - # "setval": "import ipv4 multicast {{ import.prefix }} map {{ import.map }}", - # "result": { - # '{{ name }}': { - # 'name': '{{ name }}', - # "address_families": { - # '{{ "address_families_" + afi + "_" + safi }}': { - # "afi": "{{ afi }}", - # "safi": "{{ safi }}", - # "import_config": { - # "ipv4": { - # "multicast": { - # "prefix": "{{ prefix }}", - # "map": "{{ import_map }}", - # }, - # }, - # }, - # }, - # }, - # }, - # }, - # }, - # { - # "name": "import_config.ipv4.unicast", - # "getval": re.compile( - # r""" - # ^vrf\sdefinition\s(?P\S+) - # (?P\s+address-family\s(?P\S+)\s(?P\S+)) - # \s+import\sipv4\sunicast\s(?P\d+)\smap\s(?P\S+)\s(?Pallow-evpn) - # $""", re.VERBOSE, - # ), - # "setval": "import ipv4 unicast {{ import.limit }} map {{ import.map }} allow-evpn", - # "result": { - # '{{ name }}': { - # 'name': '{{ name }}', - # "address_families": { - # '{{ "address_families_" + afi + "_" + safi }}': { - # "afi": "{{ afi }}", - # "safi": "{{ safi }}", - # "import_config": { - # "ipv4": { - # "unicast": { - # "limit": "{{ limit }}", - # "map": "{{ import_map }}", - # "allow_evpn": "{{ true if allow_evpn is defined }}", - # }, - # }, - # }, - # }, - # }, - # }, - # }, - # }, + { + "name": "export.ipv4.multicast", + "getval": re.compile( + r""" + ^vrf\sdefinition\s(?P\S+) + (?P\s+address-family\s(?P\S+)\s(?P\S+)) + \s+export\sipv4\smulticast\s(?P\d+)\smap\s(?P\S+) + $""", re.VERBOSE, + ), + "setval": "export ipv4 multicast {{ export.ipv4.multicast.prefix }} map {{ export.ipv4.multicast.prefix.map }}", + "result": { + '{{ name }}': { + 'name': '{{ name }}', + "address_families": { + '{{ "address_families_" + afi + "_" + safi }}': { + "afi": "{{ afi }}", + "safi": "{{ safi }}", + "export": { + "ipv4": { + "multicast": { + "prefix": "{{ prefix }}", + "map": "{{ export_map }}", + }, + }, + }, + }, + }, + }, + }, + }, + { + "name": "export.ipv4.unicast.allow_evpn", + "getval": re.compile( + r""" + ^vrf\sdefinition\s(?P\S+) + (?P\s+address-family\s(?P\S+)\s(?P\S+)) + \s+export\sipv4\sunicast\s(?P\d+)\smap\s(?P\S+)\s(?Pallow-evpn) + $""", re.VERBOSE, + ), + "setval": "export ipv4 unicast {{ export.prefix }} map {{ export.map }} allow-evpn", + "result": { + '{{ name }}': { + 'name': '{{ name }}', + "address_families": { + '{{ "address_families_" + afi + "_" + safi }}': { + "afi": "{{ afi }}", + "safi": "{{ safi }}", + "export": { + "ipv4": { + "unicast": { + "prefix": "{{ prefix }}", + "map": "{{ export_map }}", + "allow_evpn": "{{ true if allow_evpn is defined }}", + }, + }, + }, + }, + }, + }, + }, + }, + { + "name": "import_config.ipv4.multicast", + "getval": re.compile( + r""" + ^vrf\sdefinition\s(?P\S+) + (?P\s+address-family\s(?P\S+)\s(?P\S+)) + \s+import\sipv4\smulticast\s(?P\d+)\smap\s(?P\S+) + $""", re.VERBOSE, + ), + "setval": "import ipv4 multicast {{ import.prefix }} map {{ import.map }}", + "result": { + '{{ name }}': { + 'name': '{{ name }}', + "address_families": { + '{{ "address_families_" + afi + "_" + safi }}': { + "afi": "{{ afi }}", + "safi": "{{ safi }}", + "import_config": { + "ipv4": { + "multicast": { + "prefix": "{{ prefix }}", + "map": "{{ import_map }}", + }, + }, + }, + }, + }, + }, + }, + }, + { + "name": "import_config.ipv4.unicast", + "getval": re.compile( + r""" + ^vrf\sdefinition\s(?P\S+) + (?P\s+address-family\s(?P\S+)\s(?P\S+)) + \s+import\sipv4\sunicast\s(?P\d+)\smap\s(?P\S+)\s(?Pallow-evpn) + $""", re.VERBOSE, + ), + "setval": "import ipv4 unicast {{ import.limit }} map {{ import.map }} allow-evpn", + "result": { + '{{ name }}': { + 'name': '{{ name }}', + "address_families": { + '{{ "address_families_" + afi + "_" + safi }}': { + "afi": "{{ afi }}", + "safi": "{{ safi }}", + "import_config": { + "ipv4": { + "unicast": { + "limit": "{{ limit }}", + "map": "{{ import_map }}", + "allow_evpn": "{{ true if allow_evpn is defined }}", + }, + }, + }, + }, + }, + }, + }, + }, { "name": "bgp.next_hop.loopback", "getval": re.compile(