summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorYVarshitha <63169351+YVarshitha@users.noreply.github.com>2021-08-27 11:00:33 -0400
committerGitHub <noreply@github.com>2021-08-27 15:00:33 +0000
commit93aaf8615a0535dfe8cbd3b68dd82a1051a31411 (patch)
tree034f55b7b3f81eca21ab65b63c3013a489342fc6 /plugins
parent66c9b207fc95406b237c3b808466fc2c324a6731 (diff)
downloadvyos-ansible-old-93aaf8615a0535dfe8cbd3b68dd82a1051a31411.tar.gz
vyos-ansible-old-93aaf8615a0535dfe8cbd3b68dd82a1051a31411.zip
IPV6 ICMP type name in vyos.vyos.vyos_firewall_rules is not idempotent (#187)
IPV6 ICMP type name in vyos.vyos.vyos_firewall_rules is not idempotent SUMMARY fix issue: #170 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: GomathiselviS <None> Reviewed-by: None <None>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/module_utils/network/vyos/facts/firewall_rules/firewall_rules.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/module_utils/network/vyos/facts/firewall_rules/firewall_rules.py b/plugins/module_utils/network/vyos/facts/firewall_rules/firewall_rules.py
index 4424292..63a159e 100644
--- a/plugins/module_utils/network/vyos/facts/firewall_rules/firewall_rules.py
+++ b/plugins/module_utils/network/vyos/facts/firewall_rules/firewall_rules.py
@@ -13,6 +13,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
+import re
from re import findall, search, M
from copy import deepcopy
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
@@ -167,6 +168,7 @@ class Firewall_rulesFacts(object):
"fragment",
"disabled",
"description",
+ "icmp",
]
rule = self.parse_attr(conf, a_lst)
r_sub = {
@@ -282,6 +284,9 @@ class Firewall_rulesFacts(object):
:return: generated config dictionary.
"""
a_lst = ["code", "type", "type_name"]
+ if attrib == "icmp":
+ attrib = "icmpv6"
+ conf = re.sub("icmpv6 type", "icmpv6 type-name", conf)
cfg_dict = self.parse_attr(conf, a_lst, match=attrib)
return cfg_dict