diff options
| author | ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com> | 2019-09-05 05:33:30 +0000 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-05 05:33:30 +0000 | 
| commit | d302f85b79d5f48033b39ef1675894a053259fa5 (patch) | |
| tree | abffb517ab4dffc9759fa40cc441eab6750ee94d | |
| parent | 1ca6a9d12befb1a0d523661d1bf70991149b99c9 (diff) | |
| parent | b2f06b4d8e99eca07a222b5b83a0964142f1fff5 (diff) | |
| download | vyos.vyos-d302f85b79d5f48033b39ef1675894a053259fa5.tar.gz vyos.vyos-d302f85b79d5f48033b39ef1675894a053259fa5.zip | |
Merge pull request #30 from CaptTrews/ansible/collections-sync
Updated from network content collector
Reviewed-by: https://github.com/apps/ansible-zuul
| -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 1dd15105..46fabaa2 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 d4aec706..bb292e1e 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 40010b1a..125b2564 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 9ea06999..096fd1ff 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 e79d5d50..a16ec69f 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 d9b007ac..5c9b4c13 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 d080e822..55b1a1ab 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 7fe6d23e..70ceed8c 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: > | 
