summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDag Wieers <dag@wieers.com>2018-05-14 16:22:15 +0200
committeransibot <ansibot@users.noreply.github.com>2018-05-14 10:22:15 -0400
commit19977e80f01cd82981d23fc104b84360e2c2095e (patch)
tree9accaadcc0dfcc140fba277911925cbb581a1d81 /lib
parenta8bdcd19f0961782f2c9ba065540bd44bcc05732 (diff)
downloadansible-19977e80f01cd82981d23fc104b84360e2c2095e.tar.gz
Get rid of obsolete SEQUENCETYPE-check (#40078)
And small cosmetic change to examples.
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/modules/network/aci/aci_bd_subnet.py29
1 files changed, 14 insertions, 15 deletions
diff --git a/lib/ansible/modules/network/aci/aci_bd_subnet.py b/lib/ansible/modules/network/aci/aci_bd_subnet.py
index f0cd569b75..163d9dfae5 100644
--- a/lib/ansible/modules/network/aci/aci_bd_subnet.py
+++ b/lib/ansible/modules/network/aci/aci_bd_subnet.py
@@ -104,14 +104,14 @@ extends_documentation_fragment: aci
'''
EXAMPLES = r'''
-- name: create a tenant
+- name: Create a tenant
aci_tenant:
host: apic
username: admin
password: SomeSecretPassword
tenant: production
-- name: create a bridge domain
+- name: Create a bridge domain
aci_bd:
host: apic
username: admin
@@ -119,7 +119,7 @@ EXAMPLES = r'''
tenant: production
bd: database
-- name: create a subnet
+- name: Create a subnet
aci_bd_subnet:
host: apic
username: admin
@@ -129,7 +129,7 @@ EXAMPLES = r'''
gateway: 10.1.1.1
mask: 24
-- name: create a subnet with options
+- name: Create a subnet with options
aci_bd_subnet:
host: apic
username: admin
@@ -144,7 +144,7 @@ EXAMPLES = r'''
route_profile_l3_out: corp
route_profile: corp_route_profile
-- name: update a subnets scope to private and shared
+- name: Update a subnets scope to private and shared
aci_bd_subnet:
host: apic
username: admin
@@ -155,14 +155,14 @@ EXAMPLES = r'''
mask: 24
scope: [private, shared]
-- name: get all subnets
+- name: Get all subnets
aci_bd_subnet:
host: apic
username: admin
password: SomeSecretPassword
state: query
-- name: get all subnets of specific gateway in specified tenant
+- name: Get all subnets of specific gateway in specified tenant
aci_bd_subnet:
host: apic
username: admin
@@ -172,7 +172,7 @@ EXAMPLES = r'''
gateway: 10.1.1.1
mask: 24
-- name: get specific subnet
+- name: Get specific subnet
aci_bd_subnet:
host: apic
username: admin
@@ -183,7 +183,7 @@ EXAMPLES = r'''
gateway: 10.1.1.1
mask: 24
-- name: delete a subnet
+- name: Delete a subnet
aci_bd_subnet:
host: apic
username: admin
@@ -304,7 +304,7 @@ SUBNET_CONTROL_MAPPING = dict(nd_ra='nd', no_gw='no-default-gateway', querier_ip
from ansible.module_utils.network.aci.aci import ACIModule, aci_argument_spec
-from ansible.module_utils.basic import AnsibleModule, SEQUENCETYPE
+from ansible.module_utils.basic import AnsibleModule
def main():
@@ -355,11 +355,10 @@ def main():
route_profile = module.params['route_profile']
route_profile_l3_out = module.params['route_profile_l3_out']
scope = module.params['scope']
- if isinstance(scope, SEQUENCETYPE):
- if 'private' in scope and 'public' in scope:
- module.fail_json(msg="Parameter 'scope' cannot be both 'private' and 'public', got: %s" % scope)
- else:
- scope = ','.join(sorted(scope))
+ if 'private' in scope and 'public' in scope:
+ module.fail_json(msg="Parameter 'scope' cannot be both 'private' and 'public', got: %s" % scope)
+ else:
+ scope = ','.join(sorted(scope))
state = module.params['state']
subnet_control = module.params['subnet_control']
if subnet_control: