summaryrefslogtreecommitdiffstats
path: root/ansible_collections/arista/eos/plugins/module_utils
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/arista/eos/plugins/module_utils')
-rw-r--r--ansible_collections/arista/eos/plugins/module_utils/network/eos/argspec/ospfv3/ospfv3.py20
-rw-r--r--ansible_collections/arista/eos/plugins/module_utils/network/eos/config/ospfv3/ospfv3.py62
-rw-r--r--ansible_collections/arista/eos/plugins/module_utils/network/eos/facts/static_routes/static_routes.py2
-rw-r--r--ansible_collections/arista/eos/plugins/module_utils/network/eos/facts/vlans/vlans.py2
-rw-r--r--ansible_collections/arista/eos/plugins/module_utils/network/eos/rm_templates/snmp_server.py6
5 files changed, 5 insertions, 87 deletions
diff --git a/ansible_collections/arista/eos/plugins/module_utils/network/eos/argspec/ospfv3/ospfv3.py b/ansible_collections/arista/eos/plugins/module_utils/network/eos/argspec/ospfv3/ospfv3.py
index ece4db0cd..7964b4f4f 100644
--- a/ansible_collections/arista/eos/plugins/module_utils/network/eos/argspec/ospfv3/ospfv3.py
+++ b/ansible_collections/arista/eos/plugins/module_utils/network/eos/argspec/ospfv3/ospfv3.py
@@ -128,16 +128,6 @@ class Ospfv3Args(object): # pylint: disable=R0903
"timers": {
"type": "dict",
"options": {
- "throttle": {
- "type": "dict",
- "options": {
- "max": {"type": "int"},
- "initial": {"type": "int"},
- "min": {"type": "int"},
- "spf": {"type": "bool"},
- "lsa": {"type": "bool"},
- },
- },
"spf": {
"type": "dict",
"options": {
@@ -357,16 +347,6 @@ class Ospfv3Args(object): # pylint: disable=R0903
"timers": {
"type": "dict",
"options": {
- "throttle": {
- "type": "dict",
- "options": {
- "max": {"type": "int"},
- "initial": {"type": "int"},
- "min": {"type": "int"},
- "spf": {"type": "bool"},
- "lsa": {"type": "bool"},
- },
- },
"spf": {
"type": "dict",
"options": {
diff --git a/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/ospfv3/ospfv3.py b/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/ospfv3/ospfv3.py
index ed01f1c5e..b567de6f8 100644
--- a/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/ospfv3/ospfv3.py
+++ b/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/ospfv3/ospfv3.py
@@ -147,30 +147,6 @@ class Ospfv3(ResourceModule):
def _global_compare(self, want, have):
for name, entry in iteritems(want):
if name == "timers":
- if entry.get("throttle"):
- throttle = entry.pop("throttle")
- modified = {}
- if throttle.get("lsa"):
- modified["lsa"] = {
- "max": throttle["max"],
- "min": throttle["min"],
- "initial": throttle["initial"],
- "direction": "tx",
- }
- if throttle.get("spf"):
- modified["spf"] = {
- "max": throttle["max"],
- "min": throttle["min"],
- "initial": throttle["initial"],
- }
- entry.update(modified)
- self._module.warn(
- " ** The 'timers' argument has been changed to have separate 'lsa' and 'spf' keys and 'throttle' has been deprecated. ** "
- " \n** Your task has been modified to use {0}. ** "
- " \n** timers.throttle will be removed after '2024-01-01' ** ".format(
- entry,
- ),
- )
if entry.get("lsa") and not isinstance(entry["lsa"], dict):
modified = {}
if not isinstance(entry["lsa"], int):
@@ -183,13 +159,6 @@ class Ospfv3(ResourceModule):
"lsa": {"direction": "rx", "min": entry["lsa"]},
},
}
- self._module.warn(
- " ** 'timers lsa arrival' has changed to 'timers lsa rx min interval' from eos 4.23 onwards. ** "
- " \n** Your task has been modified to use {0}. ** "
- " \n** timers.lsa of type int will be removed after '2024-01-01' ** ".format(
- modified,
- ),
- )
entry["lsa"] = modified["timers"]["lsa"]
if name in ["vrf", "address_family"]:
continue
@@ -240,30 +209,6 @@ class Ospfv3(ResourceModule):
for name, entry in iteritems(wafs):
begin = len(self.commands)
if "timers" in entry:
- if entry["timers"].get("throttle"):
- throttle = entry["timers"].pop("throttle")
- modified = {}
- if throttle.get("lsa"):
- modified["lsa"] = {
- "max": throttle["max"],
- "min": throttle["min"],
- "initial": throttle["initial"],
- "direction": "tx",
- }
- if throttle.get("spf"):
- modified["spf"] = {
- "max": throttle["max"],
- "min": throttle["min"],
- "initial": throttle["initial"],
- }
- entry["timers"].update(modified)
- self._module.warn(
- " ** The 'timers' argument has been changed to have separate 'lsa' and 'spf' keys and 'throttle' has been deprecated. ** "
- " \n** Your task has been modified to use {0}. ** "
- " \n** timers.throttle will be removed after '2024-01-01' ** ".format(
- entry["timers"],
- ),
- )
if entry["timers"].get("lsa") and not isinstance(
entry["timers"]["lsa"],
dict,
@@ -281,13 +226,6 @@ class Ospfv3(ResourceModule):
},
},
}
- self._module.warn(
- " ** 'timers lsa arrival' has changed to 'timers lsa rx min interval' from eos 4.23 onwards. ** "
- " \n** Your task has been modified to use {0}. ** "
- " \n** timers.lsa of type int will be removed after '2024-01-01' ** ".format(
- modified,
- ),
- )
entry["timers"]["lsa"] = modified["timers"]["lsa"]
self._compare_lists(want=entry, have=hafs.get(name, {}))
self._areas_compare(want=entry, have=hafs.get(name, {}))
diff --git a/ansible_collections/arista/eos/plugins/module_utils/network/eos/facts/static_routes/static_routes.py b/ansible_collections/arista/eos/plugins/module_utils/network/eos/facts/static_routes/static_routes.py
index c97c48d5f..369f869ef 100644
--- a/ansible_collections/arista/eos/plugins/module_utils/network/eos/facts/static_routes/static_routes.py
+++ b/ansible_collections/arista/eos/plugins/module_utils/network/eos/facts/static_routes/static_routes.py
@@ -96,7 +96,7 @@ class Static_routesFacts(object):
if obj:
objs.append(obj)
ansible_facts["ansible_network_resources"].pop("static_routes", None)
- facts = {}
+ facts = {"static_routes": []}
if objs:
facts["static_routes"] = []
params = utils.validate_config(
diff --git a/ansible_collections/arista/eos/plugins/module_utils/network/eos/facts/vlans/vlans.py b/ansible_collections/arista/eos/plugins/module_utils/network/eos/facts/vlans/vlans.py
index eddd4c4e5..a6bfcb697 100644
--- a/ansible_collections/arista/eos/plugins/module_utils/network/eos/facts/vlans/vlans.py
+++ b/ansible_collections/arista/eos/plugins/module_utils/network/eos/facts/vlans/vlans.py
@@ -69,7 +69,7 @@ class VlansFacts(object):
objs.extend(obj)
ansible_facts["ansible_network_resources"].pop("vlans", None)
- facts = {}
+ facts = {"vlans": []}
if objs:
params = utils.validate_config(
self.argument_spec,
diff --git a/ansible_collections/arista/eos/plugins/module_utils/network/eos/rm_templates/snmp_server.py b/ansible_collections/arista/eos/plugins/module_utils/network/eos/rm_templates/snmp_server.py
index ef83f506a..3e22fe780 100644
--- a/ansible_collections/arista/eos/plugins/module_utils/network/eos/rm_templates/snmp_server.py
+++ b/ansible_collections/arista/eos/plugins/module_utils/network/eos/rm_templates/snmp_server.py
@@ -294,7 +294,7 @@ def _tmplt_snmp_server_hosts(config_data):
el = list(config_data["hosts"].values())[0]
command = "snmp-server host " + el["host"]
if el.get("vrf"):
- command += " vrf" + el["vrf"]
+ command += " vrf " + el["vrf"]
if el.get("informs"):
command += " informs"
if el.get("traps"):
@@ -334,7 +334,7 @@ def _tmplt_snmp_server_users_auth(config_data):
command += " udp-port " + str(el["udp_port"])
command += " " + el["version"]
if el.get("auth"):
- command += " " + el["auth"]["algorithm"] + " " + el["auth"]["auth_passphrase"]
+ command += " auth " + el["auth"]["algorithm"] + " " + el["auth"]["auth_passphrase"]
if el["auth"].get("encryption"):
command += " priv " + el["auth"]["encryption"] + " " + el["auth"]["priv_passphrase"]
return command
@@ -351,7 +351,7 @@ def _tmplt_snmp_server_users_localized(config_data):
if el.get("localized"):
command += " localized " + el["localized"]["engineid"]
el = el["localized"]
- command += " " + el["algorithm"] + " " + el["auth_passphrase"]
+ command += " auth " + el["algorithm"] + " " + el["auth_passphrase"]
if el.get("encryption"):
command += " priv " + el["encryption"] + " " + el["priv_passphrase"]
return command