diff options
author | CaptTrews <capttrews@gmail.com> | 2019-09-05 01:42:12 +0000 |
---|---|---|
committer | CaptTrews <capttrews@gmail.com> | 2019-09-05 01:42:12 +0000 |
commit | b2f06b4d8e99eca07a222b5b83a0964142f1fff5 (patch) | |
tree | abffb517ab4dffc9759fa40cc441eab6750ee94d | |
parent | 1ca6a9d12befb1a0d523661d1bf70991149b99c9 (diff) | |
download | vyos.vyos-b2f06b4d8e99eca07a222b5b83a0964142f1fff5.tar.gz vyos.vyos-b2f06b4d8e99eca07a222b5b83a0964142f1fff5.zip |
Updated from network content collector
Signed-off-by: CaptTrews <capttrews@gmail.com>
-rw-r--r-- | plugins/module_utils/network/vyos/argspec/facts/facts.py | 16 | ||||
-rw-r--r-- | plugins/module_utils/network/vyos/facts/facts.py | 11 | ||||
-rw-r--r-- | plugins/modules/vyos_facts.py | 4 | ||||
-rw-r--r-- | plugins/modules/vyos_interfaces.py | 6 | ||||
-rw-r--r-- | plugins/modules/vyos_l3_interfaces.py | 6 | ||||
-rw-r--r-- | plugins/modules/vyos_lag_interfaces.py | 6 | ||||
-rw-r--r-- | plugins/modules/vyos_lldp_global.py | 6 | ||||
-rw-r--r-- | plugins/modules/vyos_lldp_interfaces.py | 6 |
8 files changed, 19 insertions, 42 deletions
diff --git a/plugins/module_utils/network/vyos/argspec/facts/facts.py b/plugins/module_utils/network/vyos/argspec/facts/facts.py index 1dd1510..46fabaa 100644 --- a/plugins/module_utils/network/vyos/argspec/facts/facts.py +++ b/plugins/module_utils/network/vyos/argspec/facts/facts.py @@ -16,21 +16,7 @@ class FactsArgs(object): # pylint: disable=R0903 def __init__(self, **kwargs): pass - choices = [ - "all", - "interfaces", - "!interfaces", - "l3_interfaces", - "!l3_interfaces", - "lag_interfaces", - "!lag_interfaces", - "lldp_global", - "!lldp_global", - "lldp_interfaces", - "!lldp_interfaces", - ] - argument_spec = { "gather_subset": dict(default=["!config"], type="list"), - "gather_network_resources": dict(choices=choices, type="list"), + "gather_network_resources": dict(type="list"), } diff --git a/plugins/module_utils/network/vyos/facts/facts.py b/plugins/module_utils/network/vyos/facts/facts.py index d4aec70..bb292e1 100644 --- a/plugins/module_utils/network/vyos/facts/facts.py +++ b/plugins/module_utils/network/vyos/facts/facts.py @@ -9,9 +9,6 @@ calls the appropriate facts gathering function from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.argspec.facts.facts import ( - FactsArgs, -) from ansible.module_utils.network.common.facts.facts import FactsBase from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.facts.interfaces.interfaces import ( InterfacesFacts, @@ -65,15 +62,9 @@ class Facts(FactsBase): :rtype: dict :return: the facts gathered """ - netres_choices = FactsArgs.argument_spec[ - "gather_network_resources" - ].get("choices", []) if self.VALID_RESOURCE_SUBSETS: self.get_network_resources_facts( - netres_choices, - FACT_RESOURCE_SUBSETS, - resource_facts_type, - data, + FACT_RESOURCE_SUBSETS, resource_facts_type, data ) if self.VALID_LEGACY_GATHER_SUBSETS: self.get_network_legacy_facts( diff --git a/plugins/modules/vyos_facts.py b/plugins/modules/vyos_facts.py index 40010b1..125b256 100644 --- a/plugins/modules/vyos_facts.py +++ b/plugins/modules/vyos_facts.py @@ -53,10 +53,10 @@ options: Can specify a list of values to include a larger subset. Values can also be used with an initial C(M(!)) to specify that a specific subset should not be collected. + Valid subsets are 'all', 'interfaces', 'l3_interfaces', 'lag_interfaces', + 'lldp_global', 'lldp_interfaces'. required: false version_added: "2.9" - choices: ['all', 'interfaces', '!interfaces', 'l3_interfaces', '!l3_interfaces','lag_interfaces', '!lag_interfaces', - 'lldp_global', '!lldp_global','lldp_interfaces', '!lldp_interfaces'] """ EXAMPLES = """ diff --git a/plugins/modules/vyos_interfaces.py b/plugins/modules/vyos_interfaces.py index 9ea0699..096fd1f 100644 --- a/plugins/modules/vyos_interfaces.py +++ b/plugins/modules/vyos_interfaces.py @@ -115,7 +115,7 @@ options: type: int state: description: - - The state the configuration should be left in. + - The state of the configuration after module completion. type: str choices: - merged @@ -835,14 +835,14 @@ EXAMPLES = """ """ RETURN = """ before: - description: The configuration prior to the model invocation. + description: The configuration as structured data prior to module invocation. returned: always sample: > The configuration returned will always be in the same format of the parameters above. type: list after: - description: The resulting configuration model invocation. + description: The configuration as structured data after module completion. returned: when changed sample: > The configuration returned will always be in the same format diff --git a/plugins/modules/vyos_l3_interfaces.py b/plugins/modules/vyos_l3_interfaces.py index e79d5d5..a16ec69 100644 --- a/plugins/modules/vyos_l3_interfaces.py +++ b/plugins/modules/vyos_l3_interfaces.py @@ -109,7 +109,7 @@ options: type: str state: description: - - The state the configuration should be left in. + - The state of the configuration after module completion. type: str choices: - merged @@ -333,14 +333,14 @@ EXAMPLES = """ """ RETURN = """ before: - description: The configuration prior to the model invocation. + description: The configuration as structured data prior to module invocation. returned: always type: list sample: > The configuration returned will always be in the same format of the parameters above. after: - description: The resulting configuration model invocation. + description: The configuration as structured data after module completion. returned: when changed type: list sample: > diff --git a/plugins/modules/vyos_lag_interfaces.py b/plugins/modules/vyos_lag_interfaces.py index d9b007a..5c9b4c1 100644 --- a/plugins/modules/vyos_lag_interfaces.py +++ b/plugins/modules/vyos_lag_interfaces.py @@ -104,7 +104,7 @@ options: type: list state: description: - - The state the configuration should be left in. + - The state of the configuration after module completion. type: str choices: - merged @@ -513,14 +513,14 @@ EXAMPLES = """ """ RETURN = """ before: - description: The configuration prior to the model invocation. + description: The configuration as structured data prior to module invocation. returned: always type: list sample: > The configuration returned will always be in the same format of the parameters above. after: - description: The resulting configuration model invocation. + description: The configuration as structured data after module completion. returned: when changed type: list sample: > diff --git a/plugins/modules/vyos_lldp_global.py b/plugins/modules/vyos_lldp_global.py index d080e82..55b1a1a 100644 --- a/plugins/modules/vyos_lldp_global.py +++ b/plugins/modules/vyos_lldp_global.py @@ -75,7 +75,7 @@ options: - sonmp state: description: - - The state the configuration should be left in. + - The state of the configuration after module completion. type: str choices: - merged @@ -277,14 +277,14 @@ EXAMPLES = """ """ RETURN = """ before: - description: The configuration prior to the model invocation. + description: The configuration as structured data prior to module invocation. returned: always type: list sample: > The configuration returned will always be in the same format of the parameters above. after: - description: The resulting configuration model invocation. + description: The configuration as structured data after module completion. returned: when changed type: list sample: > diff --git a/plugins/modules/vyos_lldp_interfaces.py b/plugins/modules/vyos_lldp_interfaces.py index 7fe6d23..70ceed8 100644 --- a/plugins/modules/vyos_lldp_interfaces.py +++ b/plugins/modules/vyos_lldp_interfaces.py @@ -116,7 +116,7 @@ options: type: str state: description: - - The state the configuration should be left in. + - The state of the configuration after module completion. type: str choices: - merged @@ -460,14 +460,14 @@ EXAMPLES = """ """ RETURN = """ before: - description: The configuration prior to the model invocation. + description: The configuration as structured data prior to module invocation. returned: always type: list sample: > The configuration returned will always be in the same format of the parameters above. after: - description: The resulting configuration model invocation. + description: The configuration as structured data after module completion. returned: when changed type: list sample: > |