summaryrefslogtreecommitdiff
path: root/plugins/module_utils
diff options
context:
space:
mode:
authorPaul Belanger <pabelanger@redhat.com>2020-06-08 16:03:27 -0400
committerGitHub <noreply@github.com>2020-06-08 20:03:27 +0000
commit61314778e0a605c50b4fc1d918193771492c52fb (patch)
tree2be70db4aa16ceb7e75be6e11dc09d4bc4b0e556 /plugins/module_utils
parent06235439435396c852535c2569542939bf65ef43 (diff)
downloadvyos.vyos-61314778e0a605c50b4fc1d918193771492c52fb.tar.gz
vyos.vyos-61314778e0a605c50b4fc1d918193771492c52fb.zip
Fixes needed for sanity (#40)
Fixes needed for sanity Reviewed-by: https://github.com/apps/ansible-zuul
Diffstat (limited to 'plugins/module_utils')
-rw-r--r--plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py4
-rw-r--r--plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py4
-rw-r--r--plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py13
3 files changed, 12 insertions, 9 deletions
diff --git a/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py b/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py
index 275aaf3..b4cdadf 100644
--- a/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py
+++ b/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py
@@ -4,6 +4,10 @@
# 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 #
#############################################
diff --git a/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py b/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py
index 66aaa8c..25f979c 100644
--- a/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py
+++ b/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py
@@ -4,6 +4,10 @@
# 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 #
#############################################
diff --git a/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py b/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py
index 3b99d34..eac8467 100644
--- a/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py
+++ b/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py
@@ -10,12 +10,7 @@ for a given resource, parsed, and the facts tree is populated
based on the configuration.
"""
-from __future__ import (
- absolute_import,
- division,
- print_function,
- unicode_literals,
-)
+from __future__ import absolute_import, division, print_function
__metaclass__ = type
@@ -26,8 +21,8 @@ from ansible_collections.ansible.netcommon.plugins.module_utils.network.common i
utils,
)
from ansible.module_utils.six import iteritems
-from ansible_collections.ansible.netcommon.plugins.module_utils.compat import (
- ipaddress,
+from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.utils.utils import (
+ get_ip_address_version,
)
from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.argspec.l3_interfaces.l3_interfaces import (
L3_interfacesArgs,
@@ -135,7 +130,7 @@ class L3_interfacesFacts(object):
elif item == "dhcpv6":
config["ipv6"].append({"address": item})
else:
- ip_version = ipaddress.ip_address(item.split("/")[0]).version
+ ip_version = get_ip_address_version(item.split("/")[0])
if ip_version == 4:
config["ipv4"].append({"address": item})
else: