Fix sanity errors. (#55)

This commit is contained in:
Felix Fontein 2021-10-19 14:04:30 +02:00 committed by GitHub
parent 65034de769
commit 4ccd70cc8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 27 deletions

View file

@ -0,0 +1,3 @@
minor_changes:
- "command - the ``commands`` and ``wait_for`` options now convert the list elements to strings (https://github.com/ansible-collections/community.routeros/pull/55)."
- "facts - the ``gather_subset`` option now converts the list elements to strings (https://github.com/ansible-collections/community.routeros/pull/55)."

View file

@ -27,6 +27,8 @@ options:
module is not returned until the condition is satisfied or module is not returned until the condition is satisfied or
the number of retries has expired. the number of retries has expired.
required: true required: true
type: list
elements: str
wait_for: wait_for:
description: description:
- List of conditions to evaluate against the output of the - List of conditions to evaluate against the output of the
@ -34,6 +36,8 @@ options:
before moving forward. If the conditional is not true before moving forward. If the conditional is not true
within the configured number of retries, the task fails. within the configured number of retries, the task fails.
See examples. See examples.
type: list
elements: str
match: match:
description: description:
- The I(match) argument is used in conjunction with the - The I(match) argument is used in conjunction with the
@ -44,6 +48,7 @@ options:
satisfied. satisfied.
default: all default: all
choices: ['any', 'all'] choices: ['any', 'all']
type: str
retries: retries:
description: description:
- Specifies the number of retries a command should by tried - Specifies the number of retries a command should by tried
@ -51,6 +56,7 @@ options:
target device every retry and evaluated against the target device every retry and evaluated against the
I(wait_for) conditions. I(wait_for) conditions.
default: 10 default: 10
type: int
interval: interval:
description: description:
- Configures the interval in seconds to wait between retries - Configures the interval in seconds to wait between retries
@ -58,6 +64,7 @@ options:
conditions, the interval indicates how long to wait before conditions, the interval indicates how long to wait before
trying the command again. trying the command again.
default: 1 default: 1
type: int
seealso: seealso:
- ref: ansible_collections.community.routeros.docsite.ssh-guide - ref: ansible_collections.community.routeros.docsite.ssh-guide
description: How to connect to RouterOS devices with SSH description: How to connect to RouterOS devices with SSH
@ -131,10 +138,10 @@ def main():
"""main entry point for module execution """main entry point for module execution
""" """
argument_spec = dict( argument_spec = dict(
commands=dict(type='list', required=True), commands=dict(type='list', elements='str', required=True),
wait_for=dict(type='list'), wait_for=dict(type='list', elements='str'),
match=dict(default='all', choices=['all', 'any']), match=dict(type='str', default='all', choices=['all', 'any']),
retries=dict(default=10, type='int'), retries=dict(default=10, type='int'),
interval=dict(default=1, type='int') interval=dict(default=1, type='int')

View file

@ -27,6 +27,8 @@ options:
not be collected. not be collected.
required: false required: false
default: '!config' default: '!config'
type: list
elements: str
seealso: seealso:
- ref: ansible_collections.community.routeros.docsite.ssh-guide - ref: ansible_collections.community.routeros.docsite.ssh-guide
description: How to connect to RouterOS devices with SSH description: How to connect to RouterOS devices with SSH
@ -586,7 +588,7 @@ def main():
"""main entry point for module execution """main entry point for module execution
""" """
argument_spec = dict( argument_spec = dict(
gather_subset=dict(default=['!config'], type='list') gather_subset=dict(default=['!config'], type='list', elements='str')
) )
argument_spec.update(routeros_argument_spec) argument_spec.update(routeros_argument_spec)

View file

@ -1,5 +0,0 @@
plugins/modules/command.py validate-modules:doc-missing-type
plugins/modules/command.py validate-modules:parameter-list-no-elements
plugins/modules/command.py validate-modules:parameter-type-not-in-doc
plugins/modules/facts.py validate-modules:parameter-list-no-elements
plugins/modules/facts.py validate-modules:parameter-type-not-in-doc

View file

@ -1,5 +0,0 @@
plugins/modules/command.py validate-modules:doc-missing-type
plugins/modules/command.py validate-modules:parameter-list-no-elements
plugins/modules/command.py validate-modules:parameter-type-not-in-doc
plugins/modules/facts.py validate-modules:parameter-list-no-elements
plugins/modules/facts.py validate-modules:parameter-type-not-in-doc

View file

@ -1,5 +0,0 @@
plugins/modules/command.py validate-modules:doc-missing-type
plugins/modules/command.py validate-modules:parameter-list-no-elements
plugins/modules/command.py validate-modules:parameter-type-not-in-doc
plugins/modules/facts.py validate-modules:parameter-list-no-elements
plugins/modules/facts.py validate-modules:parameter-type-not-in-doc

View file

@ -1,5 +0,0 @@
plugins/modules/command.py validate-modules:doc-missing-type
plugins/modules/command.py validate-modules:parameter-list-no-elements
plugins/modules/command.py validate-modules:parameter-type-not-in-doc
plugins/modules/facts.py validate-modules:parameter-list-no-elements
plugins/modules/facts.py validate-modules:parameter-type-not-in-doc

View file

@ -1,3 +0,0 @@
plugins/modules/command.py validate-modules:doc-missing-type
plugins/modules/command.py validate-modules:parameter-type-not-in-doc
plugins/modules/facts.py validate-modules:parameter-type-not-in-doc