From ca2ae67794a90474240cd8bccac08a2d9d56d338 Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Tue, 9 Feb 2016 14:31:49 -0500 Subject: [PATCH] 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 --- network/ios/ios_config.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/network/ios/ios_config.py b/network/ios/ios_config.py index 675f1535c39..e6b7772532a 100644 --- a/network/ios/ios_config.py +++ b/network/ios/ios_config.py @@ -26,8 +26,7 @@ description: - Cisco IOS configurations use a simple block indent file sytanx for segementing configuration into sections. This module provides an implementation for working with IOS configuration sections in - a deterministic way. This module works with either CLI or NXAPI - transports. + a deterministic way. extends_documentation_fragment: ios options: lines: @@ -93,7 +92,7 @@ options: without first checking if already configured. required: false default: false - choices: BOOLEANS + choices: ['yes', 'no'] config: description: - The module, by default, will connect to the remote device and @@ -142,19 +141,17 @@ EXAMPLES = """ """ RETURN = """ - -lines: +updates: description: The set of commands that will be pushed to the remote device returned: always type: list sample: ['...', '...'] -response: +responses: description: The set of responses from issuing the commands on the device - retured: always + retured: when not check_mode type: list sample: ['...', '...'] - """ import re import itertools @@ -165,7 +162,6 @@ def get_config(module): config = module.config return config - def build_candidate(lines, parents, config, strategy): candidate = list() @@ -258,10 +254,10 @@ def main(): if not module.check_mode: response = module.configure(candidate) - result['response'] = response + result['responses'] = response result['changed'] = True - result['lines'] = candidate + result['updates'] = candidate return module.exit_json(**result) from ansible.module_utils.basic import *