Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network return docs #23441

Merged
merged 7 commits into from
Apr 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/asa/asa_acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@

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: ['...', '...']
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/asa/asa_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@

failed_conditions:
description: the conditionals that failed
retured: failed
returned: failed
type: list
sample: ['...', '...']
"""
Expand Down
16 changes: 1 addition & 15 deletions lib/ansible/modules/network/bigswitch/bigmon_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,7 @@
'''


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
Expand Down
22 changes: 1 addition & 21 deletions lib/ansible/modules/network/bigswitch/bigmon_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,7 @@
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
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/cloudflare_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
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)
Expand Down
1 change: 1 addition & 0 deletions lib/ansible/modules/network/eos/eos_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
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
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/exoscale/exo_dns_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
exo_dns_domain:
description: API domain results
returned: success
type: dictionary
type: complex
contains:
account_id:
description: Your account ID
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/exoscale/exo_dns_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
exo_dns_record:
description: API record results
returned: success
type: dictionary
type: complex
contains:
content:
description: value of the record
Expand Down
6 changes: 3 additions & 3 deletions lib/ansible/modules/network/f5/bigip_device_sshd.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
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"
Expand All @@ -156,12 +156,12 @@
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
'''
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/f5/bigip_routedomain.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
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
Expand Down
17 changes: 4 additions & 13 deletions lib/ansible/modules/network/f5/bigip_selfip.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,31 +201,22 @@
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"
'''
Expand Down
23 changes: 5 additions & 18 deletions lib/ansible/modules/network/f5/bigip_ssl_certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,42 +138,29 @@
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"
'''
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/f5/bigip_sys_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
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.
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/illumos/ipadm_prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
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']
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/ipinfoio_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
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"
Expand Down
9 changes: 6 additions & 3 deletions lib/ansible/modules/network/junos/junos_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,17 @@

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

Expand Down
10 changes: 5 additions & 5 deletions lib/ansible/modules/network/lenovo/cnos_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@
'''
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
Expand Down
8 changes: 4 additions & 4 deletions lib/ansible/modules/network/lenovo/cnos_bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,10 @@

'''
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
Expand Down
9 changes: 5 additions & 4 deletions lib/ansible/modules/network/lenovo/cnos_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@
'''
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"
'''


Expand Down
10 changes: 5 additions & 5 deletions lib/ansible/modules/network/lenovo/cnos_conditional_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@

'''
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
Expand Down
10 changes: 5 additions & 5 deletions lib/ansible/modules/network/lenovo/cnos_conditional_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@
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
Expand Down
10 changes: 5 additions & 5 deletions lib/ansible/modules/network/lenovo/cnos_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
'''
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"
'''


Expand Down
10 changes: 5 additions & 5 deletions lib/ansible/modules/network/lenovo/cnos_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@
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
Expand Down