From 902bc58509b9255239d880354df575c60f7e7a92 Mon Sep 17 00:00:00 2001 From: John R Barker Date: Wed, 12 Apr 2017 13:13:41 -0400 Subject: [PATCH] [WIP] Network return docs (#23441) Network return docs --- lib/ansible/modules/network/asa/asa_acl.py | 2 +- .../modules/network/asa/asa_command.py | 2 +- .../modules/network/bigswitch/bigmon_chain.py | 16 +------------ .../network/bigswitch/bigmon_policy.py | 22 +----------------- lib/ansible/modules/network/cloudflare_dns.py | 2 +- lib/ansible/modules/network/eos/eos_facts.py | 1 + .../network/exoscale/exo_dns_domain.py | 2 +- .../network/exoscale/exo_dns_record.py | 2 +- .../modules/network/f5/bigip_device_sshd.py | 6 ++--- .../modules/network/f5/bigip_routedomain.py | 2 +- .../modules/network/f5/bigip_selfip.py | 17 ++++---------- .../network/f5/bigip_ssl_certificate.py | 23 ++++--------------- .../modules/network/f5/bigip_sys_global.py | 2 +- .../modules/network/illumos/ipadm_prop.py | 2 +- lib/ansible/modules/network/ipinfoio_facts.py | 2 +- .../modules/network/junos/junos_rpc.py | 9 +++++--- .../modules/network/lenovo/cnos_backup.py | 10 ++++---- .../modules/network/lenovo/cnos_bgp.py | 8 +++---- .../modules/network/lenovo/cnos_command.py | 9 ++++---- .../lenovo/cnos_conditional_command.py | 10 ++++---- .../lenovo/cnos_conditional_template.py | 10 ++++---- .../modules/network/lenovo/cnos_factory.py | 10 ++++---- .../modules/network/lenovo/cnos_facts.py | 10 ++++---- .../modules/network/lenovo/cnos_image.py | 10 ++++---- .../modules/network/lenovo/cnos_interface.py | 10 ++++---- .../network/lenovo/cnos_portchannel.py | 10 ++++---- .../modules/network/lenovo/cnos_reload.py | 11 ++++----- .../modules/network/lenovo/cnos_rollback.py | 10 ++++---- .../modules/network/lenovo/cnos_save.py | 9 ++++---- .../modules/network/lenovo/cnos_showrun.py | 11 +++++---- .../modules/network/lenovo/cnos_template.py | 10 ++++---- .../modules/network/lenovo/cnos_vlag.py | 9 ++++---- .../modules/network/lenovo/cnos_vlan.py | 9 ++++---- .../modules/network/netconf/netconf_config.py | 2 +- .../modules/network/netvisor/pn_cluster.py | 2 ++ .../modules/network/netvisor/pn_ospf.py | 2 ++ .../modules/network/netvisor/pn_ospfarea.py | 2 ++ .../modules/network/netvisor/pn_show.py | 2 ++ .../modules/network/netvisor/pn_trunk.py | 2 ++ .../modules/network/netvisor/pn_vlag.py | 2 ++ .../modules/network/netvisor/pn_vlan.py | 2 ++ .../modules/network/netvisor/pn_vrouter.py | 2 ++ .../modules/network/netvisor/pn_vrouterbgp.py | 2 ++ .../modules/network/netvisor/pn_vrouterif.py | 8 ++++--- .../network/netvisor/pn_vrouterlbif.py | 2 ++ lib/ansible/modules/network/nxos/_nxos_mtu.py | 1 + .../modules/network/nxos/nxos_aaa_server.py | 1 + .../network/nxos/nxos_aaa_server_host.py | 1 + .../network/nxos/nxos_acl_interface.py | 1 + lib/ansible/modules/network/nxos/nxos_hsrp.py | 1 + .../network/nxos/nxos_igmp_interface.py | 1 + .../network/nxos/nxos_igmp_snooping.py | 1 + .../modules/network/nxos/nxos_install_os.py | 1 + .../modules/network/nxos/nxos_interface.py | 3 ++- .../modules/network/nxos/nxos_ip_interface.py | 1 + lib/ansible/modules/network/nxos/nxos_ntp.py | 1 + .../modules/network/nxos/nxos_ntp_auth.py | 1 + .../modules/network/nxos/nxos_ntp_options.py | 1 + .../network/nxos/nxos_pim_interface.py | 1 + .../modules/network/nxos/nxos_portchannel.py | 1 + .../network/nxos/nxos_snmp_community.py | 3 ++- .../modules/network/nxos/nxos_snmp_contact.py | 1 + .../modules/network/nxos/nxos_snmp_host.py | 3 ++- .../network/nxos/nxos_snmp_location.py | 3 ++- .../modules/network/nxos/nxos_snmp_traps.py | 1 + .../modules/network/nxos/nxos_snmp_user.py | 1 + .../modules/network/nxos/nxos_switchport.py | 3 ++- lib/ansible/modules/network/nxos/nxos_udld.py | 1 + .../network/nxos/nxos_udld_interface.py | 1 + lib/ansible/modules/network/nxos/nxos_vlan.py | 4 ++-- lib/ansible/modules/network/nxos/nxos_vpc.py | 1 + .../network/nxos/nxos_vpc_interface.py | 1 + lib/ansible/modules/network/nxos/nxos_vrf.py | 1 + .../network/nxos/nxos_vrf_interface.py | 1 + lib/ansible/modules/network/nxos/nxos_vrrp.py | 1 + .../modules/network/nxos/nxos_vtp_domain.py | 1 + .../modules/network/nxos/nxos_vtp_password.py | 1 + .../modules/network/nxos/nxos_vtp_version.py | 1 + lib/ansible/modules/network/omapi_host.py | 2 +- 79 files changed, 184 insertions(+), 172 deletions(-) diff --git a/lib/ansible/modules/network/asa/asa_acl.py b/lib/ansible/modules/network/asa/asa_acl.py index f630f78d667..c27432e9fed 100644 --- a/lib/ansible/modules/network/asa/asa_acl.py +++ b/lib/ansible/modules/network/asa/asa_acl.py @@ -143,7 +143,7 @@ updates: responses: description: The set of responses from issuing the commands on the device - retured: when not check_mode + returned: when not check_mode type: list sample: ['...', '...'] """ diff --git a/lib/ansible/modules/network/asa/asa_command.py b/lib/ansible/modules/network/asa/asa_command.py index 056c1dbdaa2..52aafd22aa1 100644 --- a/lib/ansible/modules/network/asa/asa_command.py +++ b/lib/ansible/modules/network/asa/asa_command.py @@ -129,7 +129,7 @@ stdout_lines: failed_conditions: description: the conditionals that failed - retured: failed + returned: failed type: list sample: ['...', '...'] """ diff --git a/lib/ansible/modules/network/bigswitch/bigmon_chain.py b/lib/ansible/modules/network/bigswitch/bigmon_chain.py index 8407cd0c9f9..add1795994f 100644 --- a/lib/ansible/modules/network/bigswitch/bigmon_chain.py +++ b/lib/ansible/modules/network/bigswitch/bigmon_chain.py @@ -69,21 +69,7 @@ EXAMPLES = ''' ''' -RETURN = ''' -{ - "changed": true, - "invocation": { - "module_args": { - "access_token": null, - "controller": "192.168.86.221", - "name": "MyChain", - "state": "present", - "validate_certs": false - }, - "module_name": "bigmon_chain" - } -} -''' +RETURN = ''' # ''' import os from ansible.module_utils.basic import AnsibleModule diff --git a/lib/ansible/modules/network/bigswitch/bigmon_policy.py b/lib/ansible/modules/network/bigswitch/bigmon_policy.py index 68ece6028b1..c2fdaebaaa5 100644 --- a/lib/ansible/modules/network/bigswitch/bigmon_policy.py +++ b/lib/ansible/modules/network/bigswitch/bigmon_policy.py @@ -95,27 +95,7 @@ EXAMPLES = ''' validate_certs: false ''' -RETURN = ''' -{ - "changed": false, - "invocation": { - "module_args": { - "access_token": null, - "action": "drop", - "controller": "192.168.86.221", - "delivery_packet_count": 0, - "duration": 0, - "name": "policy1", - "policy_description": "DC 1 traffic policy", - "priority": 100, - "start_time": "2017-01-13T23:10:41.978584+00:00", - "state": "present", - "validate_certs": false - }, - "module_name": "bigmon_policy" - } -} -''' +RETURN = ''' # ''' import os import datetime diff --git a/lib/ansible/modules/network/cloudflare_dns.py b/lib/ansible/modules/network/cloudflare_dns.py index 2040a397ac9..c6b48c659f1 100644 --- a/lib/ansible/modules/network/cloudflare_dns.py +++ b/lib/ansible/modules/network/cloudflare_dns.py @@ -193,7 +193,7 @@ RETURN = ''' record: description: dictionary containing the record data returned: success, except on record deletion - type: dictionary + type: complex contains: content: description: the record content (details depend on record type) diff --git a/lib/ansible/modules/network/eos/eos_facts.py b/lib/ansible/modules/network/eos/eos_facts.py index 0f5efdb1655..cd81cf91abb 100644 --- a/lib/ansible/modules/network/eos/eos_facts.py +++ b/lib/ansible/modules/network/eos/eos_facts.py @@ -77,6 +77,7 @@ ansible_net_model: ansible_net_serialnum: description: The serial number of the remote device returned: always + type: str ansible_net_version: description: The operating system version running on the remote device returned: always diff --git a/lib/ansible/modules/network/exoscale/exo_dns_domain.py b/lib/ansible/modules/network/exoscale/exo_dns_domain.py index 732deb11639..6b5274f2df3 100644 --- a/lib/ansible/modules/network/exoscale/exo_dns_domain.py +++ b/lib/ansible/modules/network/exoscale/exo_dns_domain.py @@ -101,7 +101,7 @@ RETURN = ''' exo_dns_domain: description: API domain results returned: success - type: dictionary + type: complex contains: account_id: description: Your account ID diff --git a/lib/ansible/modules/network/exoscale/exo_dns_record.py b/lib/ansible/modules/network/exoscale/exo_dns_record.py index 8d8bac19e86..72de649d091 100644 --- a/lib/ansible/modules/network/exoscale/exo_dns_record.py +++ b/lib/ansible/modules/network/exoscale/exo_dns_record.py @@ -181,7 +181,7 @@ RETURN = ''' exo_dns_record: description: API record results returned: success - type: dictionary + type: complex contains: content: description: value of the record diff --git a/lib/ansible/modules/network/f5/bigip_device_sshd.py b/lib/ansible/modules/network/f5/bigip_device_sshd.py index 806b106fc39..c517a8f3ef0 100644 --- a/lib/ansible/modules/network/f5/bigip_device_sshd.py +++ b/lib/ansible/modules/network/f5/bigip_device_sshd.py @@ -145,7 +145,7 @@ banner_text: inactivity_timeout: description: > The number of seconds before inactivity causes an SSH. - session to log out + session to log out. returned: changed type: int sample: "10" @@ -156,12 +156,12 @@ log_level: sample: "debug" login: description: Specifies that the system accepts SSH communications or not. - return: changed + returned: changed type: bool sample: true port: description: Port that you want the SSH daemon to run on. - return: changed + returned: changed type: int sample: 22 ''' diff --git a/lib/ansible/modules/network/f5/bigip_routedomain.py b/lib/ansible/modules/network/f5/bigip_routedomain.py index d4c970cbced..77e2f2d23d1 100644 --- a/lib/ansible/modules/network/f5/bigip_routedomain.py +++ b/lib/ansible/modules/network/f5/bigip_routedomain.py @@ -160,7 +160,7 @@ bwc_policy: connection_limit: description: The new connection limit for the route domain returned: changed - type: integer + type: int sample: 100 flow_eviction_policy: description: The new eviction policy to use with this route domain diff --git a/lib/ansible/modules/network/f5/bigip_selfip.py b/lib/ansible/modules/network/f5/bigip_selfip.py index b3ddd9a8a88..dec57895a39 100644 --- a/lib/ansible/modules/network/f5/bigip_selfip.py +++ b/lib/ansible/modules/network/f5/bigip_selfip.py @@ -201,31 +201,22 @@ address: sample: "192.0.2.10" name: description: The name of the Self IP - returned: - - created - - changed - - deleted + returned: created, changed or deleted type: string sample: "self1" netmask: description: The netmask of the Self IP - returned: - - changed - - created + returned: created or changed type: string sample: "255.255.255.0" traffic_group: description: The traffic group that the Self IP is a member of - return: - - changed - - created + returned: changed or created type: string sample: "traffic-group-local-only" vlan: description: The VLAN set on the Self IP - return: - - changed - - created + returned: created or changed type: string sample: "vlan1" ''' diff --git a/lib/ansible/modules/network/f5/bigip_ssl_certificate.py b/lib/ansible/modules/network/f5/bigip_ssl_certificate.py index 52dd836d699..f838971f104 100644 --- a/lib/ansible/modules/network/f5/bigip_ssl_certificate.py +++ b/lib/ansible/modules/network/f5/bigip_ssl_certificate.py @@ -138,42 +138,29 @@ cert_name: description: > The name of the SSL certificate. The C(cert_name) and C(key_name) will be equal to each other. - returned: - - created - - changed - - deleted + returned: created, changed or deleted type: string sample: "cert1" key_name: description: > The name of the SSL certificate key. The C(key_name) and C(cert_name) will be equal to each other. - returned: - - created - - changed - - deleted + returned: created, changed or deleted type: string sample: "key1" partition: description: Partition in which the cert/key was created - returned: - - changed - - created - - deleted + returned: created, changed or deleted type: string sample: "Common" key_checksum: description: SHA1 checksum of the key that was provided - return: - - changed - - created + returned: created or changed type: string sample: "cf23df2207d99a74fbe169e3eba035e633b65d94" cert_checksum: description: SHA1 checksum of the cert that was provided - return: - - changed - - created + returned: created or changed type: string sample: "f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0" ''' diff --git a/lib/ansible/modules/network/f5/bigip_sys_global.py b/lib/ansible/modules/network/f5/bigip_sys_global.py index 25d7d01fd33..ca21916dc0f 100644 --- a/lib/ansible/modules/network/f5/bigip_sys_global.py +++ b/lib/ansible/modules/network/f5/bigip_sys_global.py @@ -121,7 +121,7 @@ console_timeout: The new number of seconds of inactivity before the system logs off a user that is logged on. returned: changed - type: integer + type: int sample: 600 gui_setup: description: The new setting for the Setup utility. diff --git a/lib/ansible/modules/network/illumos/ipadm_prop.py b/lib/ansible/modules/network/illumos/ipadm_prop.py index c2c4d781ca6..e18f91a2d6d 100644 --- a/lib/ansible/modules/network/illumos/ipadm_prop.py +++ b/lib/ansible/modules/network/illumos/ipadm_prop.py @@ -93,7 +93,7 @@ value: description: value of the property returned: always type: int/string (depends on property) - sample: 1024/never + sample: "'1024' or 'never'" ''' SUPPORTED_PROTOCOLS = ['ipv4', 'ipv6', 'icmp', 'tcp', 'udp', 'sctp'] diff --git a/lib/ansible/modules/network/ipinfoio_facts.py b/lib/ansible/modules/network/ipinfoio_facts.py index 1ee6397ae48..0c0da986dff 100644 --- a/lib/ansible/modules/network/ipinfoio_facts.py +++ b/lib/ansible/modules/network/ipinfoio_facts.py @@ -55,7 +55,7 @@ RETURN = ''' ansible_facts: description: "Dictionary of ip geolocation facts for a host's IP address" returned: changed - type: dictionary + type: complex contains: ip: description: "Public IP address of a host" diff --git a/lib/ansible/modules/network/junos/junos_rpc.py b/lib/ansible/modules/network/junos/junos_rpc.py index 307b3a9602b..05bd9917c50 100644 --- a/lib/ansible/modules/network/junos/junos_rpc.py +++ b/lib/ansible/modules/network/junos/junos_rpc.py @@ -72,14 +72,17 @@ EXAMPLES = """ RETURN = """ xml: - description: The xml return string from the rpc request + description: The xml return string from the rpc request. returned: always + type: string output: - description: The rpc rely converted to the output format + description: The rpc rely converted to the output format. returned: always + type: string output_lines: - description: The text output split into lines for readability + description: The text output split into lines for readability. returned: always + type: list """ from ncclient.xml_ import new_ele, sub_ele, to_xml, to_ele diff --git a/lib/ansible/modules/network/lenovo/cnos_backup.py b/lib/ansible/modules/network/lenovo/cnos_backup.py index a063c36ab7f..6d13f699f8a 100644 --- a/lib/ansible/modules/network/lenovo/cnos_backup.py +++ b/lib/ansible/modules/network/lenovo/cnos_backup.py @@ -160,11 +160,11 @@ Tasks : The following are examples of using the module cnos_backup. These are wr ''' RETURN = ''' ---- - return value: | - On successful execution, the method returns a message in JSON format - [Config file tranferred to server] - Upon any failure, the method returns an error display string. +msg: + description: Success or failure message + returned: always + type: string + sample: "Config file tranferred to server" ''' import sys diff --git a/lib/ansible/modules/network/lenovo/cnos_bgp.py b/lib/ansible/modules/network/lenovo/cnos_bgp.py index b742604c662..f60b7457695 100644 --- a/lib/ansible/modules/network/lenovo/cnos_bgp.py +++ b/lib/ansible/modules/network/lenovo/cnos_bgp.py @@ -358,10 +358,10 @@ Tasks: The following are examples of using the module cnos_bgp. These are writte ''' RETURN = ''' - return value: | - On successful execution, the method returns an empty string with the following message in JSON format. - [BGP configurations accomplished] - Upon any failure, the method returns an error display string. The error must be corrected before attempting the method again. +msg: + description: Success or failure message. Upon any failure, the method returns an error display string. + returned: always + type: string ''' import sys diff --git a/lib/ansible/modules/network/lenovo/cnos_command.py b/lib/ansible/modules/network/lenovo/cnos_command.py index 7a193e472b9..dabd7125e9c 100644 --- a/lib/ansible/modules/network/lenovo/cnos_command.py +++ b/lib/ansible/modules/network/lenovo/cnos_command.py @@ -69,10 +69,11 @@ Tasks : The following are examples of using the module cnos_command. These are w ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Command Applied] - Upon any failure, the method returns an error display string. +msg: + description: Success or failure message + returned: always + type: string + sample: "Command Applied" ''' diff --git a/lib/ansible/modules/network/lenovo/cnos_conditional_command.py b/lib/ansible/modules/network/lenovo/cnos_conditional_command.py index d870343b95c..c953484ec8d 100644 --- a/lib/ansible/modules/network/lenovo/cnos_conditional_command.py +++ b/lib/ansible/modules/network/lenovo/cnos_conditional_command.py @@ -89,11 +89,11 @@ Tasks : The following are examples of using the module cnos_conditional_command. ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Command Applied] - Upon any failure, the method returns an error display string. - +msg: + description: Success or failure message + returned: always + type: string + sample: "Command Applied" ''' import sys diff --git a/lib/ansible/modules/network/lenovo/cnos_conditional_template.py b/lib/ansible/modules/network/lenovo/cnos_conditional_template.py index b168aaf5aaf..ae4e9f1784e 100644 --- a/lib/ansible/modules/network/lenovo/cnos_conditional_template.py +++ b/lib/ansible/modules/network/lenovo/cnos_conditional_template.py @@ -96,11 +96,11 @@ Tasks : The following are examples of using the module cnos_conditional_template switchport_mode1: trunk ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Template Applied.] - Upon any failure, the method returns an error display string. - +msg: + description: Success or failure message + returned: always + type: string + sample: "Template Applied." ''' import sys diff --git a/lib/ansible/modules/network/lenovo/cnos_factory.py b/lib/ansible/modules/network/lenovo/cnos_factory.py index 3894823077d..57e863679db 100644 --- a/lib/ansible/modules/network/lenovo/cnos_factory.py +++ b/lib/ansible/modules/network/lenovo/cnos_factory.py @@ -58,11 +58,11 @@ Tasks : The following are examples of using the module cnos_reload. These are wr ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Switch Startup Config is Reset to factory settings] - Upon any failure, the method returns an error display string. - +msg: + description: Success or failure message + returned: always + type: string + sample: "Switch Startup Config is Reset to factory settings" ''' diff --git a/lib/ansible/modules/network/lenovo/cnos_facts.py b/lib/ansible/modules/network/lenovo/cnos_facts.py index 98def7ac3d0..0deff671185 100644 --- a/lib/ansible/modules/network/lenovo/cnos_facts.py +++ b/lib/ansible/modules/network/lenovo/cnos_facts.py @@ -56,13 +56,13 @@ Tasks : The following are examples of using the module cnos_facts. These are wri outputfile: "./results/cnos_facts_{{ inventory_hostname }}_output.txt" ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Device Sys Info is saved to file] - Upon any failure, the method returns an error display string. +msg: + description: Success or failure message + returned: always + type: string + sample: "Device Sys Info is saved to file" ''' - import sys import paramiko import time diff --git a/lib/ansible/modules/network/lenovo/cnos_image.py b/lib/ansible/modules/network/lenovo/cnos_image.py index 347a2229cb6..73298996da8 100644 --- a/lib/ansible/modules/network/lenovo/cnos_image.py +++ b/lib/ansible/modules/network/lenovo/cnos_image.py @@ -117,11 +117,13 @@ Tasks : The following are examples of using the module cnos_image. These are wri serverpassword: "root123" ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Image file tranferred to device] - Upon any failure, the method returns an error display string. +msg: + description: Success or failure message + returned: always + type: string + sample: "Image file tranferred to device" ''' + import sys import paramiko import time diff --git a/lib/ansible/modules/network/lenovo/cnos_interface.py b/lib/ansible/modules/network/lenovo/cnos_interface.py index de61d0a70a1..4702ce0b518 100644 --- a/lib/ansible/modules/network/lenovo/cnos_interface.py +++ b/lib/ansible/modules/network/lenovo/cnos_interface.py @@ -455,11 +455,11 @@ Tasks : The following are examples of using the module cnos_interface. These are ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Interface configurations accomplished.] - Upon any failure, the method returns an error display string. - +msg: + description: Success or failure message + returned: always + type: string + sample: "Interface configurations accomplished." ''' import sys diff --git a/lib/ansible/modules/network/lenovo/cnos_portchannel.py b/lib/ansible/modules/network/lenovo/cnos_portchannel.py index 7d3206b6dae..4e609d4000f 100644 --- a/lib/ansible/modules/network/lenovo/cnos_portchannel.py +++ b/lib/ansible/modules/network/lenovo/cnos_portchannel.py @@ -407,13 +407,13 @@ Tasks : The following are examples of using the module cnos_portchannel. These a ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Port Channel configurations accomplished] - Upon any failure, the method returns an error display string. +msg: + description: Success or failure message + returned: always + type: string + sample: "Port Channel configurations accomplished" ''' - import sys import paramiko import time diff --git a/lib/ansible/modules/network/lenovo/cnos_reload.py b/lib/ansible/modules/network/lenovo/cnos_reload.py index 4acd3c713db..f4ef14aa48a 100644 --- a/lib/ansible/modules/network/lenovo/cnos_reload.py +++ b/lib/ansible/modules/network/lenovo/cnos_reload.py @@ -57,14 +57,13 @@ Tasks : The following are examples of using the module cnos_reload. These are wr outputfile: "./results/test_reload_{{ inventory_hostname }}_output.txt" ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Device is Reloading. Please wait...] - Upon any failure, the method returns an error display string. - +msg: + description: Success or failure message + returned: always + type: string + sample: "Device is Reloading. Please wait..." ''' - import sys import paramiko import time diff --git a/lib/ansible/modules/network/lenovo/cnos_rollback.py b/lib/ansible/modules/network/lenovo/cnos_rollback.py index 2b39e1ae5dc..ec91ae866d6 100644 --- a/lib/ansible/modules/network/lenovo/cnos_rollback.py +++ b/lib/ansible/modules/network/lenovo/cnos_rollback.py @@ -153,11 +153,13 @@ Tasks : The following are examples of using the module cnos_rollback. These are ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Config file tranferred to Device] - Upon any failure, the method returns an error display string. +msg: + description: Success or failure message + returned: always + type: string + sample: "Config file tranferred to Device" ''' + import sys import paramiko import time diff --git a/lib/ansible/modules/network/lenovo/cnos_save.py b/lib/ansible/modules/network/lenovo/cnos_save.py index dd2a20d5f21..59021f9ca60 100644 --- a/lib/ansible/modules/network/lenovo/cnos_save.py +++ b/lib/ansible/modules/network/lenovo/cnos_save.py @@ -58,10 +58,11 @@ Tasks : The following are examples of using the module cnos_save. These are writ outputfile: "./results/test_save_{{ inventory_hostname }}_output.txt" ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Switch Running Config is Saved to Startup Config] - Upon any failure, the method returns an error display string. +msg: + description: Success or failure message + returned: always + type: string + sample: "Switch Running Config is Saved to Startup Config" ''' import sys diff --git a/lib/ansible/modules/network/lenovo/cnos_showrun.py b/lib/ansible/modules/network/lenovo/cnos_showrun.py index 81949177e1a..fbaaddf7d9d 100644 --- a/lib/ansible/modules/network/lenovo/cnos_showrun.py +++ b/lib/ansible/modules/network/lenovo/cnos_showrun.py @@ -59,12 +59,13 @@ Tasks : The following are examples of using the module cnos_showrun. These are w ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Running Configuration saved in file] - Upon any failure, the method returns an error display string. - +msg: + description: Success or failure message + returned: always + type: string + sample: "Running Configuration saved in file" ''' + import sys import paramiko import time diff --git a/lib/ansible/modules/network/lenovo/cnos_template.py b/lib/ansible/modules/network/lenovo/cnos_template.py index 5132e182e9f..bb1234862b6 100644 --- a/lib/ansible/modules/network/lenovo/cnos_template.py +++ b/lib/ansible/modules/network/lenovo/cnos_template.py @@ -81,11 +81,13 @@ Tasks : The following are examples of using the module cnos_template. These are ''' RETURN = ''' - return value: | - On successful execution, the method returns a message in JSON format - [Template Applied.] - Upon any failure, the method returns an error display string. +msg: + description: Success or failure message + returned: always + type: string + sample: "Template Applied." ''' + import sys import paramiko import time diff --git a/lib/ansible/modules/network/lenovo/cnos_vlag.py b/lib/ansible/modules/network/lenovo/cnos_vlag.py index ad3b7162a65..01dd9e2086c 100644 --- a/lib/ansible/modules/network/lenovo/cnos_vlag.py +++ b/lib/ansible/modules/network/lenovo/cnos_vlag.py @@ -242,10 +242,11 @@ Tasks : The following are examples of using the module cnos_vlag. These are writ ''' RETURN = ''' -return value: | - On successful execution, the method returns a message in JSON format - [vLAG configurations accomplished] - Upon any failure, the method returns an error display string. +msg: + description: Success or failure message + returned: always + type: string + sample: "vLAG configurations accomplished" ''' import sys diff --git a/lib/ansible/modules/network/lenovo/cnos_vlan.py b/lib/ansible/modules/network/lenovo/cnos_vlan.py index 04e18983134..0dc602d3c8d 100644 --- a/lib/ansible/modules/network/lenovo/cnos_vlan.py +++ b/lib/ansible/modules/network/lenovo/cnos_vlan.py @@ -181,10 +181,11 @@ Tasks: The following are examples of using the module cnos_vlan. These are writt ''' RETURN = ''' -return value: | - On successful execution, the method returns a message in JSON format - [VLAN configurations are successful] - Upon any failure, the method returns an error display string. +msg: + description: Success or failure message + returned: always + type: string + sample: "VLAN configuration is accomplished" ''' import sys diff --git a/lib/ansible/modules/network/netconf/netconf_config.py b/lib/ansible/modules/network/netconf/netconf_config.py index e8f10ad9844..c56453cab46 100644 --- a/lib/ansible/modules/network/netconf/netconf_config.py +++ b/lib/ansible/modules/network/netconf/netconf_config.py @@ -136,7 +136,7 @@ RETURN = ''' server_capabilities: description: list of capabilities of the server returned: success - type: list of strings + type: list sample: ['urn:ietf:params:netconf:base:1.1','urn:ietf:params:netconf:capability:confirmed-commit:1.0','urn:ietf:params:netconf:capability:candidate:1.0'] ''' diff --git a/lib/ansible/modules/network/netvisor/pn_cluster.py b/lib/ansible/modules/network/netvisor/pn_cluster.py index 20b463042b3..fde3a9e31e6 100644 --- a/lib/ansible/modules/network/netvisor/pn_cluster.py +++ b/lib/ansible/modules/network/netvisor/pn_cluster.py @@ -94,6 +94,8 @@ EXAMPLES = """ RETURN = """ command: description: The CLI command run on the target node(s). + returned: always + type: str stdout: description: The set of responses from the cluster command. returned: always diff --git a/lib/ansible/modules/network/netvisor/pn_ospf.py b/lib/ansible/modules/network/netvisor/pn_ospf.py index 9bdbd4ffa6f..6f737b5a845 100644 --- a/lib/ansible/modules/network/netvisor/pn_ospf.py +++ b/lib/ansible/modules/network/netvisor/pn_ospf.py @@ -83,6 +83,8 @@ EXAMPLES = """ RETURN = """ command: description: The CLI command run on the target node(s). + returned: always + type: str stdout: description: The set of responses from the ospf command. returned: always diff --git a/lib/ansible/modules/network/netvisor/pn_ospfarea.py b/lib/ansible/modules/network/netvisor/pn_ospfarea.py index 311a3ce319e..1b980e0542c 100644 --- a/lib/ansible/modules/network/netvisor/pn_ospfarea.py +++ b/lib/ansible/modules/network/netvisor/pn_ospfarea.py @@ -98,6 +98,8 @@ EXAMPLES = """ RETURN = """ command: description: The CLI command run on the target node(s). + returned: always + type: str stdout: description: The set of responses from the ospf command. returned: always diff --git a/lib/ansible/modules/network/netvisor/pn_show.py b/lib/ansible/modules/network/netvisor/pn_show.py index 8180c229463..c58b6115096 100644 --- a/lib/ansible/modules/network/netvisor/pn_show.py +++ b/lib/ansible/modules/network/netvisor/pn_show.py @@ -79,6 +79,8 @@ EXAMPLES = """ RETURN = """ command: description: The CLI command run on the target node(s). + returned: always + type: str stdout: description: The set of responses from the show command. returned: always diff --git a/lib/ansible/modules/network/netvisor/pn_trunk.py b/lib/ansible/modules/network/netvisor/pn_trunk.py index edd6f2400ee..ec8d8fb43d9 100644 --- a/lib/ansible/modules/network/netvisor/pn_trunk.py +++ b/lib/ansible/modules/network/netvisor/pn_trunk.py @@ -145,6 +145,8 @@ EXAMPLES = """ RETURN = """ command: description: The CLI command run on the target node(s). + returned: always + type: str stdout: description: The set of responses from the trunk command. returned: always diff --git a/lib/ansible/modules/network/netvisor/pn_vlag.py b/lib/ansible/modules/network/netvisor/pn_vlag.py index 623fa7daaa9..d617f439ce0 100644 --- a/lib/ansible/modules/network/netvisor/pn_vlag.py +++ b/lib/ansible/modules/network/netvisor/pn_vlag.py @@ -117,6 +117,8 @@ EXAMPLES = """ RETURN = """ command: description: The CLI command run on the target node(s). + returned: always + type: str stdout: description: The set of responses from the vlag command. returned: always diff --git a/lib/ansible/modules/network/netvisor/pn_vlan.py b/lib/ansible/modules/network/netvisor/pn_vlan.py index 6038e258bfc..91b5b6e8dde 100644 --- a/lib/ansible/modules/network/netvisor/pn_vlan.py +++ b/lib/ansible/modules/network/netvisor/pn_vlan.py @@ -97,6 +97,8 @@ EXAMPLES = """ RETURN = """ command: description: The CLI command run on the target node(s). + returned: always + type: str stdout: description: The set of responses from the vlan command. returned: always diff --git a/lib/ansible/modules/network/netvisor/pn_vrouter.py b/lib/ansible/modules/network/netvisor/pn_vrouter.py index f4624e4ba8b..a24739d9540 100644 --- a/lib/ansible/modules/network/netvisor/pn_vrouter.py +++ b/lib/ansible/modules/network/netvisor/pn_vrouter.py @@ -131,6 +131,8 @@ EXAMPLES = """ RETURN = """ command: description: The CLI command run on the target node(s). + returned: always + type: str stdout: description: The set of responses from the vrouter command. returned: always diff --git a/lib/ansible/modules/network/netvisor/pn_vrouterbgp.py b/lib/ansible/modules/network/netvisor/pn_vrouterbgp.py index 01f959c2754..8a550d49ebb 100644 --- a/lib/ansible/modules/network/netvisor/pn_vrouterbgp.py +++ b/lib/ansible/modules/network/netvisor/pn_vrouterbgp.py @@ -144,6 +144,8 @@ EXAMPLES = """ RETURN = """ command: description: The CLI command run on the target node(s). + returned: always + type: str stdout: description: The set of responses from the vrouterbpg command. returned: always diff --git a/lib/ansible/modules/network/netvisor/pn_vrouterif.py b/lib/ansible/modules/network/netvisor/pn_vrouterif.py index d55451af46e..e8586a79483 100644 --- a/lib/ansible/modules/network/netvisor/pn_vrouterif.py +++ b/lib/ansible/modules/network/netvisor/pn_vrouterif.py @@ -141,13 +141,15 @@ EXAMPLES = """ """ RETURN = """ -vrouterifcmd: +command: description: The CLI command run on the target node(s). -stdout/msg: + returned: always + type: str +stdout: description: The set of responses from the vrouterif command. returned: on success type: list -stderr/msg: +stderr: description: The set of error responses from the vrouterif command. returned: on error type: str diff --git a/lib/ansible/modules/network/netvisor/pn_vrouterlbif.py b/lib/ansible/modules/network/netvisor/pn_vrouterlbif.py index 0b91a3b786a..15f03fbf96d 100644 --- a/lib/ansible/modules/network/netvisor/pn_vrouterlbif.py +++ b/lib/ansible/modules/network/netvisor/pn_vrouterlbif.py @@ -84,6 +84,8 @@ EXAMPLES = """ RETURN = """ command: description: The CLI command run on the target node(s). + returned: always + type: str stdout: description: The set of responses from the vrouterlb command. returned: always diff --git a/lib/ansible/modules/network/nxos/_nxos_mtu.py b/lib/ansible/modules/network/nxos/_nxos_mtu.py index 342d8c3eb6a..e685d682ba9 100644 --- a/lib/ansible/modules/network/nxos/_nxos_mtu.py +++ b/lib/ansible/modules/network/nxos/_nxos_mtu.py @@ -101,6 +101,7 @@ proposed: existing: description: - k/v pairs of existing mtu/sysmtu on the interface/system + returned: always type: dict sample: {"mtu": "1600", "sysmtu": "9216"} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_aaa_server.py b/lib/ansible/modules/network/nxos/nxos_aaa_server.py index 659bb5b5a07..bed9164ff6d 100644 --- a/lib/ansible/modules/network/nxos/nxos_aaa_server.py +++ b/lib/ansible/modules/network/nxos/nxos_aaa_server.py @@ -130,6 +130,7 @@ proposed: existing: description: - k/v pairs of existing aaa server + returned: always type: dict sample: {"deadtime": "0", "directed_request": "disabled", "global_key": "unknown", "server_timeout": "5"} diff --git a/lib/ansible/modules/network/nxos/nxos_aaa_server_host.py b/lib/ansible/modules/network/nxos/nxos_aaa_server_host.py index 296ebe89e4b..f14319e78d1 100644 --- a/lib/ansible/modules/network/nxos/nxos_aaa_server_host.py +++ b/lib/ansible/modules/network/nxos/nxos_aaa_server_host.py @@ -132,6 +132,7 @@ proposed: existing: description: - k/v pairs of existing configuration + returned: always type: dict sample: {} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_acl_interface.py b/lib/ansible/modules/network/nxos/nxos_acl_interface.py index b346813209c..9a07f0436fe 100644 --- a/lib/ansible/modules/network/nxos/nxos_acl_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_acl_interface.py @@ -75,6 +75,7 @@ proposed: "name": "ANSIBLE"} existing: description: k/v pairs of existing ACL applied to the interface + returned: always type: dict sample: {} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_hsrp.py b/lib/ansible/modules/network/nxos/nxos_hsrp.py index ded8841f3f3..40c051ee97b 100644 --- a/lib/ansible/modules/network/nxos/nxos_hsrp.py +++ b/lib/ansible/modules/network/nxos/nxos_hsrp.py @@ -123,6 +123,7 @@ proposed: sample: {"group": "30", "version": "2", "vip": "10.30.1.1"} existing: description: k/v pairs of existing hsrp info on the interface + returned: always type: dict sample: {} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_igmp_interface.py b/lib/ansible/modules/network/nxos/nxos_igmp_interface.py index ed27fbb835d..a75a5857250 100644 --- a/lib/ansible/modules/network/nxos/nxos_igmp_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_igmp_interface.py @@ -183,6 +183,7 @@ proposed: sample: {"asn": "65535", "router_id": "1.1.1.1", "vrf": "test"} existing: description: k/v pairs of existing BGP configuration + returned: always type: dict sample: {"asn": "65535", "bestpath_always_compare_med": false, "bestpath_aspath_multipath_relax": false, diff --git a/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py b/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py index bc59820958d..58c641347d9 100644 --- a/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py +++ b/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py @@ -105,6 +105,7 @@ proposed: existing: description: - k/v pairs of existing configuration + returned: always type: dict sample: {"group_timeout": "never", "link_local_grp_supp": false, "report_supp": true, "snooping": true, "v3_report_supp": true} diff --git a/lib/ansible/modules/network/nxos/nxos_install_os.py b/lib/ansible/modules/network/nxos/nxos_install_os.py index 7e9cdbd384d..bf10bfd2263 100644 --- a/lib/ansible/modules/network/nxos/nxos_install_os.py +++ b/lib/ansible/modules/network/nxos/nxos_install_os.py @@ -101,6 +101,7 @@ EXAMPLES = ''' RETURN = ''' install_state: + description: Boot and install information. returned: always type: dictionary sample: { diff --git a/lib/ansible/modules/network/nxos/nxos_interface.py b/lib/ansible/modules/network/nxos/nxos_interface.py index 3e70fd0ee08..3131a583d0f 100644 --- a/lib/ansible/modules/network/nxos/nxos_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_interface.py @@ -142,6 +142,7 @@ proposed: sample: {"admin_state": "down"} existing: description: k/v pairs of existing switchport + returned: always type: dict sample: {"admin_state": "up", "description": "None", "interface": "port-channel101", "mode": "layer2", @@ -149,7 +150,7 @@ existing: end_state: description: k/v pairs of switchport after module execution returned: always - type: dict or null + type: dict sample: {"admin_state": "down", "description": "None", "interface": "port-channel101", "mode": "layer2", "type": "portchannel", "ip_forward": "enable"} diff --git a/lib/ansible/modules/network/nxos/nxos_ip_interface.py b/lib/ansible/modules/network/nxos/nxos_ip_interface.py index d4685157119..c86c311eab3 100644 --- a/lib/ansible/modules/network/nxos/nxos_ip_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_ip_interface.py @@ -89,6 +89,7 @@ proposed: sample: {"addr": "20.20.20.20", "interface": "ethernet1/32", "mask": "24"} existing: description: k/v pairs of existing IP attributes on the interface + returned: always type: dict sample: {"addresses": [{"addr": "11.11.11.11", "mask": 17}], "interface": "ethernet1/32", "prefix": "11.11.0.0", diff --git a/lib/ansible/modules/network/nxos/nxos_ntp.py b/lib/ansible/modules/network/nxos/nxos_ntp.py index 8a9de7dd190..a934f259f0a 100644 --- a/lib/ansible/modules/network/nxos/nxos_ntp.py +++ b/lib/ansible/modules/network/nxos/nxos_ntp.py @@ -102,6 +102,7 @@ proposed: existing: description: - k/v pairs of existing ntp server/peer + returned: always type: dict sample: {"address": "2.2.2.2", "key_id": "32", "peer_type": "server", "prefer": "enabled", diff --git a/lib/ansible/modules/network/nxos/nxos_ntp_auth.py b/lib/ansible/modules/network/nxos/nxos_ntp_auth.py index da17a10b56e..aed2b1df645 100644 --- a/lib/ansible/modules/network/nxos/nxos_ntp_auth.py +++ b/lib/ansible/modules/network/nxos/nxos_ntp_auth.py @@ -98,6 +98,7 @@ proposed: existing: description: - k/v pairs of existing ntp authentication + returned: always type: dict sample: {"authentication": "off", "trusted_key": "false"} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_ntp_options.py b/lib/ansible/modules/network/nxos/nxos_ntp_options.py index 3b394060710..305a93ae877 100644 --- a/lib/ansible/modules/network/nxos/nxos_ntp_options.py +++ b/lib/ansible/modules/network/nxos/nxos_ntp_options.py @@ -85,6 +85,7 @@ proposed: existing: description: - k/v pairs of existing ntp options + returned: always type: dict sample: {"logging": true, "master": true, "stratum": "8"} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_pim_interface.py b/lib/ansible/modules/network/nxos/nxos_pim_interface.py index 48f5ea75136..06d5225e838 100644 --- a/lib/ansible/modules/network/nxos/nxos_pim_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_pim_interface.py @@ -159,6 +159,7 @@ proposed: existing: description: - k/v pairs of existing configuration + returned: always type: dict sample: {"border": false, "dr_prio": "1", "hello_interval": "30000", "isauth": false, "jp_bidir": false, "jp_policy_in": "JPIN", diff --git a/lib/ansible/modules/network/nxos/nxos_portchannel.py b/lib/ansible/modules/network/nxos/nxos_portchannel.py index 2d8306bee00..930753f0e9e 100644 --- a/lib/ansible/modules/network/nxos/nxos_portchannel.py +++ b/lib/ansible/modules/network/nxos/nxos_portchannel.py @@ -96,6 +96,7 @@ proposed: existing: description: - k/v pairs of existing portchannel + returned: always type: dict sample: {"group": "12", "members": ["Ethernet2/5", "Ethernet2/6"], "members_detail": { diff --git a/lib/ansible/modules/network/nxos/nxos_snmp_community.py b/lib/ansible/modules/network/nxos/nxos_snmp_community.py index 2c66ce632b4..c46e537afcf 100644 --- a/lib/ansible/modules/network/nxos/nxos_snmp_community.py +++ b/lib/ansible/modules/network/nxos/nxos_snmp_community.py @@ -80,12 +80,13 @@ proposed: sample: {"group": "network-operator"} existing: description: k/v pairs of existing snmp community + returned: always type: dict sample: {} end_state: description: k/v pairs of snmp community after module execution returned: always - type: dict or null + type: dict sample: {"acl": "None", "group": "network-operator"} updates: description: commands sent to the device diff --git a/lib/ansible/modules/network/nxos/nxos_snmp_contact.py b/lib/ansible/modules/network/nxos/nxos_snmp_contact.py index ff6074600d3..60443c4f593 100644 --- a/lib/ansible/modules/network/nxos/nxos_snmp_contact.py +++ b/lib/ansible/modules/network/nxos/nxos_snmp_contact.py @@ -65,6 +65,7 @@ proposed: sample: {"contact": "New_Test"} existing: description: k/v pairs of existing snmp contact + returned: always type: dict sample: {"contact": "Test"} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_snmp_host.py b/lib/ansible/modules/network/nxos/nxos_snmp_host.py index 1468a975cd5..673735190d3 100644 --- a/lib/ansible/modules/network/nxos/nxos_snmp_host.py +++ b/lib/ansible/modules/network/nxos/nxos_snmp_host.py @@ -106,6 +106,7 @@ proposed: "snmp_type": "trap", "version": "v2c", "vrf_filter": "one_more_vrf"} existing: description: k/v pairs of existing snmp host + returned: always type: dict sample: {"community": "TESTING", "snmp_type": "trap", "udp": "162", "v3": "noauth", "version": "v2c", @@ -114,7 +115,7 @@ existing: end_state: description: k/v pairs of switchport after module execution returned: always - type: dict or null + type: dict sample: {"community": "TESTING", "snmp_type": "trap", "udp": "162", "v3": "noauth", "version": "v2c", "vrf": "test_vrf", "vrf_filter": ["test_vrf", diff --git a/lib/ansible/modules/network/nxos/nxos_snmp_location.py b/lib/ansible/modules/network/nxos/nxos_snmp_location.py index ee8b7b7b260..db25f721d40 100644 --- a/lib/ansible/modules/network/nxos/nxos_snmp_location.py +++ b/lib/ansible/modules/network/nxos/nxos_snmp_location.py @@ -72,12 +72,13 @@ proposed: sample: {"location": "New_Test"} existing: description: k/v pairs of existing snmp location + returned: always type: dict sample: {"location": "Test"} end_state: description: k/v pairs of location info after module execution returned: always - type: dict or null + type: dict sample: {"location": "New_Test"} updates: description: command sent to the device diff --git a/lib/ansible/modules/network/nxos/nxos_snmp_traps.py b/lib/ansible/modules/network/nxos/nxos_snmp_traps.py index 88be8e7beac..5d3332e9e05 100644 --- a/lib/ansible/modules/network/nxos/nxos_snmp_traps.py +++ b/lib/ansible/modules/network/nxos/nxos_snmp_traps.py @@ -80,6 +80,7 @@ proposed: sample: {"group": "lldp"} existing: description: k/v pairs of existing trap status + returned: always type: dict sample: {"lldp": [{"enabled": "No", "trap": "lldpRemTablesChange"}]} diff --git a/lib/ansible/modules/network/nxos/nxos_snmp_user.py b/lib/ansible/modules/network/nxos/nxos_snmp_user.py index 10cc3103aa6..c38ef6f997a 100644 --- a/lib/ansible/modules/network/nxos/nxos_snmp_user.py +++ b/lib/ansible/modules/network/nxos/nxos_snmp_user.py @@ -93,6 +93,7 @@ proposed: existing: description: - k/v pairs of existing configuration + returned: always type: dict sample: {"authentication": "no", "encrypt": "none", "group": ["network-operator"], "user": "ntc"} diff --git a/lib/ansible/modules/network/nxos/nxos_switchport.py b/lib/ansible/modules/network/nxos/nxos_switchport.py index 53592300dea..7ab1e3efbe6 100644 --- a/lib/ansible/modules/network/nxos/nxos_switchport.py +++ b/lib/ansible/modules/network/nxos/nxos_switchport.py @@ -130,6 +130,7 @@ proposed: sample: {"access_vlan": "10", "interface": "eth1/5", "mode": "access"} existing: description: k/v pairs of existing switchport + returned: always type: dict sample: {"access_vlan": "10", "access_vlan_name": "VLAN0010", "interface": "Ethernet1/5", "mode": "access", @@ -138,7 +139,7 @@ existing: end_state: description: k/v pairs of switchport after module execution returned: always - type: dict or null + type: dict sample: {"access_vlan": "10", "access_vlan_name": "VLAN0010", "interface": "Ethernet1/5", "mode": "access", "native_vlan": "1", "native_vlan_name": "default", diff --git a/lib/ansible/modules/network/nxos/nxos_udld.py b/lib/ansible/modules/network/nxos/nxos_udld.py index 1fa4f4ba574..e1bc20c86c4 100644 --- a/lib/ansible/modules/network/nxos/nxos_udld.py +++ b/lib/ansible/modules/network/nxos/nxos_udld.py @@ -89,6 +89,7 @@ proposed: existing: description: - k/v pairs of existing udld configuration + returned: always type: dict sample: {"aggressive": "disabled", "msg_time": "15"} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_udld_interface.py b/lib/ansible/modules/network/nxos/nxos_udld_interface.py index 65d9241f553..ed9409726b5 100644 --- a/lib/ansible/modules/network/nxos/nxos_udld_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_udld_interface.py @@ -87,6 +87,7 @@ proposed: existing: description: - k/v pairs of existing configuration + returned: always type: dict sample: {"mode": "aggressive"} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_vlan.py b/lib/ansible/modules/network/nxos/nxos_vlan.py index 6281d3f4bf7..9bd5b1d2604 100644 --- a/lib/ansible/modules/network/nxos/nxos_vlan.py +++ b/lib/ansible/modules/network/nxos/nxos_vlan.py @@ -126,7 +126,7 @@ proposed: description: k/v pairs of parameters passed into module (does not include vlan_id or vlan_range) returned: when debug enabled - type: dict or null + type: dict sample: {"admin_state": "down", "name": "app_vlan", "vlan_state": "suspend", "mapped_vni": "5000"} existing: @@ -139,7 +139,7 @@ end_state: description: k/v pairs of the VLAN after executing module or null when using vlan_range returned: when debug enabled - type: dict or null + type: dict sample: {"admin_state": "down", "name": "app_vlan", "vlan_id": "20", "vlan_state": "suspend", "mapped_vni": "5000"} updates: diff --git a/lib/ansible/modules/network/nxos/nxos_vpc.py b/lib/ansible/modules/network/nxos/nxos_vpc.py index 75647012bfb..93c1c306a9f 100644 --- a/lib/ansible/modules/network/nxos/nxos_vpc.py +++ b/lib/ansible/modules/network/nxos/nxos_vpc.py @@ -118,6 +118,7 @@ proposed: "role_priority": "1000", "system_priority": "2000"} existing: description: k/v pairs of existing VPC configuration + returned: always type: dict sample: {"auto_recovery": true, "delay_restore": null, "domain": "100", "peer_gw": true, diff --git a/lib/ansible/modules/network/nxos/nxos_vpc_interface.py b/lib/ansible/modules/network/nxos/nxos_vpc_interface.py index 808b343230d..a5a139a08c9 100644 --- a/lib/ansible/modules/network/nxos/nxos_vpc_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_vpc_interface.py @@ -78,6 +78,7 @@ proposed: sample: {"portchannel": "100", "vpc": "10"} existing: description: k/v pairs of existing configuration + returned: always type: dict sample: {} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_vrf.py b/lib/ansible/modules/network/nxos/nxos_vrf.py index 701fe0f82c9..27515295339 100644 --- a/lib/ansible/modules/network/nxos/nxos_vrf.py +++ b/lib/ansible/modules/network/nxos/nxos_vrf.py @@ -98,6 +98,7 @@ proposed: "vrf": "ntc"} existing: description: k/v pairs of existing vrf + returned: always type: dict sample: {"admin_state": "Up", "description": "Old test", "vrf": "old_ntc"} diff --git a/lib/ansible/modules/network/nxos/nxos_vrf_interface.py b/lib/ansible/modules/network/nxos/nxos_vrf_interface.py index 8510de334c1..56b407e55b9 100644 --- a/lib/ansible/modules/network/nxos/nxos_vrf_interface.py +++ b/lib/ansible/modules/network/nxos/nxos_vrf_interface.py @@ -80,6 +80,7 @@ proposed: sample: {"interface": "loopback16", "vrf": "ntc"} existing: description: k/v pairs of existing vrf on the interface + returned: always type: dict sample: {"interface": "loopback16", "vrf": ""} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_vrrp.py b/lib/ansible/modules/network/nxos/nxos_vrrp.py index 549de89fc9e..d3cde3fa830 100644 --- a/lib/ansible/modules/network/nxos/nxos_vrrp.py +++ b/lib/ansible/modules/network/nxos/nxos_vrrp.py @@ -115,6 +115,7 @@ proposed: "admin_state": "no shutdown"} existing: description: k/v pairs of existing vrrp info on the interface + returned: always type: dict sample: {} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_vtp_domain.py b/lib/ansible/modules/network/nxos/nxos_vtp_domain.py index 79984196855..915650562d6 100644 --- a/lib/ansible/modules/network/nxos/nxos_vtp_domain.py +++ b/lib/ansible/modules/network/nxos/nxos_vtp_domain.py @@ -65,6 +65,7 @@ proposed: existing: description: - k/v pairs of existing vtp domain + returned: always type: dict sample: {"domain": "testing", "version": "2", "vtp_password": "\"} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_vtp_password.py b/lib/ansible/modules/network/nxos/nxos_vtp_password.py index fcd38701165..191d8e0865b 100644 --- a/lib/ansible/modules/network/nxos/nxos_vtp_password.py +++ b/lib/ansible/modules/network/nxos/nxos_vtp_password.py @@ -83,6 +83,7 @@ proposed: existing: description: - k/v pairs of existing vtp + returned: always type: dict sample: {"domain": "ntc", "version": "1", "vtp_password": "ntc"} end_state: diff --git a/lib/ansible/modules/network/nxos/nxos_vtp_version.py b/lib/ansible/modules/network/nxos/nxos_vtp_version.py index 75513e8234e..9ca4bf025c2 100644 --- a/lib/ansible/modules/network/nxos/nxos_vtp_version.py +++ b/lib/ansible/modules/network/nxos/nxos_vtp_version.py @@ -62,6 +62,7 @@ proposed: existing: description: - k/v pairs of existing vtp + returned: always type: dict sample: {"domain": "testing", "version": "1", "vtp_password": "\"} end_state: diff --git a/lib/ansible/modules/network/omapi_host.py b/lib/ansible/modules/network/omapi_host.py index c50cda246e0..6f47de8fb7e 100644 --- a/lib/ansible/modules/network/omapi_host.py +++ b/lib/ansible/modules/network/omapi_host.py @@ -117,7 +117,7 @@ changed: lease: description: dictionnary containing host informations returned: success - type: dictionnary + type: complex contains: ip-address: description: IP address, if there is.