1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

update ios_config doc strings and return values

This changes the return values to be consistent across all network
config modules. The return values are now updates and responses
This commit is contained in:
Peter Sprygada 2016-02-09 14:31:49 -05:00 committed by Matt Clay
parent 5aff573098
commit d33b840ec6

View file

@ -26,8 +26,7 @@ description:
- Cisco IOS configurations use a simple block indent file sytanx - Cisco IOS configurations use a simple block indent file sytanx
for segementing configuration into sections. This module provides for segementing configuration into sections. This module provides
an implementation for working with IOS configuration sections in an implementation for working with IOS configuration sections in
a deterministic way. This module works with either CLI or NXAPI a deterministic way.
transports.
extends_documentation_fragment: ios extends_documentation_fragment: ios
options: options:
lines: lines:
@ -93,7 +92,7 @@ options:
without first checking if already configured. without first checking if already configured.
required: false required: false
default: false default: false
choices: BOOLEANS choices: ['yes', 'no']
config: config:
description: description:
- The module, by default, will connect to the remote device and - The module, by default, will connect to the remote device and
@ -142,19 +141,17 @@ EXAMPLES = """
""" """
RETURN = """ RETURN = """
updates:
lines:
description: The set of commands that will be pushed to the remote device description: The set of commands that will be pushed to the remote device
returned: always returned: always
type: list type: list
sample: ['...', '...'] sample: ['...', '...']
response: 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: always retured: when not check_mode
type: list type: list
sample: ['...', '...'] sample: ['...', '...']
""" """
import re import re
import itertools import itertools
@ -165,7 +162,6 @@ def get_config(module):
config = module.config config = module.config
return config return config
def build_candidate(lines, parents, config, strategy): def build_candidate(lines, parents, config, strategy):
candidate = list() candidate = list()
@ -258,10 +254,10 @@ def main():
if not module.check_mode: if not module.check_mode:
response = module.configure(candidate) response = module.configure(candidate)
result['response'] = response result['responses'] = response
result['changed'] = True result['changed'] = True
result['lines'] = candidate result['updates'] = candidate
return module.exit_json(**result) return module.exit_json(**result)
from ansible.module_utils.basic import * from ansible.module_utils.basic import *