Get rid of obsolete SEQUENCETYPE-check (#40078)
And small cosmetic change to examples.
This commit is contained in:
parent
a8bdcd19f0
commit
19977e80f0
1 changed files with 14 additions and 15 deletions
|
@ -104,14 +104,14 @@ extends_documentation_fragment: aci
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r'''
|
||||||
- name: create a tenant
|
- name: Create a tenant
|
||||||
aci_tenant:
|
aci_tenant:
|
||||||
host: apic
|
host: apic
|
||||||
username: admin
|
username: admin
|
||||||
password: SomeSecretPassword
|
password: SomeSecretPassword
|
||||||
tenant: production
|
tenant: production
|
||||||
|
|
||||||
- name: create a bridge domain
|
- name: Create a bridge domain
|
||||||
aci_bd:
|
aci_bd:
|
||||||
host: apic
|
host: apic
|
||||||
username: admin
|
username: admin
|
||||||
|
@ -119,7 +119,7 @@ EXAMPLES = r'''
|
||||||
tenant: production
|
tenant: production
|
||||||
bd: database
|
bd: database
|
||||||
|
|
||||||
- name: create a subnet
|
- name: Create a subnet
|
||||||
aci_bd_subnet:
|
aci_bd_subnet:
|
||||||
host: apic
|
host: apic
|
||||||
username: admin
|
username: admin
|
||||||
|
@ -129,7 +129,7 @@ EXAMPLES = r'''
|
||||||
gateway: 10.1.1.1
|
gateway: 10.1.1.1
|
||||||
mask: 24
|
mask: 24
|
||||||
|
|
||||||
- name: create a subnet with options
|
- name: Create a subnet with options
|
||||||
aci_bd_subnet:
|
aci_bd_subnet:
|
||||||
host: apic
|
host: apic
|
||||||
username: admin
|
username: admin
|
||||||
|
@ -144,7 +144,7 @@ EXAMPLES = r'''
|
||||||
route_profile_l3_out: corp
|
route_profile_l3_out: corp
|
||||||
route_profile: corp_route_profile
|
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:
|
aci_bd_subnet:
|
||||||
host: apic
|
host: apic
|
||||||
username: admin
|
username: admin
|
||||||
|
@ -155,14 +155,14 @@ EXAMPLES = r'''
|
||||||
mask: 24
|
mask: 24
|
||||||
scope: [private, shared]
|
scope: [private, shared]
|
||||||
|
|
||||||
- name: get all subnets
|
- name: Get all subnets
|
||||||
aci_bd_subnet:
|
aci_bd_subnet:
|
||||||
host: apic
|
host: apic
|
||||||
username: admin
|
username: admin
|
||||||
password: SomeSecretPassword
|
password: SomeSecretPassword
|
||||||
state: query
|
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:
|
aci_bd_subnet:
|
||||||
host: apic
|
host: apic
|
||||||
username: admin
|
username: admin
|
||||||
|
@ -172,7 +172,7 @@ EXAMPLES = r'''
|
||||||
gateway: 10.1.1.1
|
gateway: 10.1.1.1
|
||||||
mask: 24
|
mask: 24
|
||||||
|
|
||||||
- name: get specific subnet
|
- name: Get specific subnet
|
||||||
aci_bd_subnet:
|
aci_bd_subnet:
|
||||||
host: apic
|
host: apic
|
||||||
username: admin
|
username: admin
|
||||||
|
@ -183,7 +183,7 @@ EXAMPLES = r'''
|
||||||
gateway: 10.1.1.1
|
gateway: 10.1.1.1
|
||||||
mask: 24
|
mask: 24
|
||||||
|
|
||||||
- name: delete a subnet
|
- name: Delete a subnet
|
||||||
aci_bd_subnet:
|
aci_bd_subnet:
|
||||||
host: apic
|
host: apic
|
||||||
username: admin
|
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.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():
|
def main():
|
||||||
|
@ -355,7 +355,6 @@ def main():
|
||||||
route_profile = module.params['route_profile']
|
route_profile = module.params['route_profile']
|
||||||
route_profile_l3_out = module.params['route_profile_l3_out']
|
route_profile_l3_out = module.params['route_profile_l3_out']
|
||||||
scope = module.params['scope']
|
scope = module.params['scope']
|
||||||
if isinstance(scope, SEQUENCETYPE):
|
|
||||||
if 'private' in scope and 'public' in scope:
|
if 'private' in scope and 'public' in scope:
|
||||||
module.fail_json(msg="Parameter 'scope' cannot be both 'private' and 'public', got: %s" % scope)
|
module.fail_json(msg="Parameter 'scope' cannot be both 'private' and 'public', got: %s" % scope)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue