Addressed review comments, given as part of other reviews (#4904)

reviewable/pr18780/r1
Senthil Kumar Ganesan 8 years ago committed by John R Barker
parent 8886afd145
commit 7362b8d08f

@ -180,14 +180,14 @@ updates:
responses: responses:
description: The set of responses from issuing the commands on the device description: The set of responses from issuing the commands on the device
retured: when not check_mode returned: when not check_mode
type: list type: list
sample: ['...', '...'] sample: ['...', '...']
saved: saved:
description: Returns whether the configuration is saved to the startup description: Returns whether the configuration is saved to the startup
configuration or not. configuration or not.
retured: when not check_mode returned: when not check_mode
type: bool type: bool
sample: True sample: True
@ -220,11 +220,10 @@ def main():
match=dict(default='line', match=dict(default='line',
choices=['line', 'strict', 'exact', 'none']), choices=['line', 'strict', 'exact', 'none']),
replace=dict(default='line', choices=['line', 'block']), replace=dict(default='line', choices=['line', 'block']),
update=dict(choices=['merge', 'check'], default='merge'), update=dict(choices=['merge', 'check'], default='merge'),
save=dict(type='bool', default=False), save=dict(type='bool', default=False),
config=dict(), config=dict(),
backup =dict(type='bool', default=False) backup=dict(type='bool', default=False)
) )
mutually_exclusive = [('lines', 'src')] mutually_exclusive = [('lines', 'src')]

@ -194,7 +194,7 @@ saved:
""" """
from ansible.module_utils.netcfg import dumps from ansible.module_utils.netcfg import dumps
from ansible.module_utils.network import NetworkModule from ansible.module_utils.network import NetworkModule
from ansible.module_utils.dnos6 import get_config, get_sublevel_config, Dellos6NetworkConfig from ansible.module_utils.dellos6 import get_config, get_sublevel_config, Dellos6NetworkConfig
def get_candidate(module): def get_candidate(module):

@ -24,6 +24,7 @@ DOCUMENTATION = """
--- ---
module: dellos9_command module: dellos9_command
version_added: "2.2" version_added: "2.2"
author: "Dhivya P (@dhivyap)"
short_description: Run commands on remote devices running Dell OS9 short_description: Run commands on remote devices running Dell OS9
description: description:
- Sends arbitrary commands to a Dell OS9 node and returns the results - Sends arbitrary commands to a Dell OS9 node and returns the results
@ -83,22 +84,22 @@ tasks:
- name: run show version on remote devices - name: run show version on remote devices
dellos9_command: dellos9_command:
commands: show version commands: show version
provider "{{ cli }}" provider: "{{ cli }}"
- name: run show version and check to see if output contains OS9 - name: run show version and check to see if output contains OS9
dellos9_command: dellos9_command:
commands: show version commands: show version
wait_for: result[0] contains OS9 wait_for: result[0] contains OS9
provider "{{ cli }}" provider: "{{ cli }}"
- name: run multiple commands on remote nodes - name: run multiple commands on remote nodes
dellos9_command: dellos9_command:
commands: commands:
- show version - show version
- show interfaces - show interfaces
provider "{{ cli }}" provider: "{{ cli }}"
- name: run multiple commands and evalute the output - name: run multiple commands and evaluate the output
dellos9_command: dellos9_command:
commands: commands:
- show version - show version
@ -106,7 +107,7 @@ tasks:
wait_for: wait_for:
- result[0] contains OS9 - result[0] contains OS9
- result[1] contains Loopback - result[1] contains Loopback
provider "{{ cli }}" provider: "{{ cli }}"
""" """
RETURN = """ RETURN = """

@ -180,14 +180,14 @@ updates:
responses: responses:
description: The set of responses from issuing the commands on the device description: The set of responses from issuing the commands on the device
retured: when not check_mode returned: when not check_mode
type: list type: list
sample: ['...', '...'] sample: ['...', '...']
saved: saved:
description: Returns whether the configuration is saved to the startup description: Returns whether the configuration is saved to the startup
configuration or not. configuration or not.
retured: when not check_mode returned: when not check_mode
type: bool type: bool
sample: True sample: True

Loading…
Cancel
Save