mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
MSO: Clean up argspec (#53067)
This PR includes: - Removing aliases (these are now modules in 2.8) - Cleaning up argspec
This commit is contained in:
parent
ff368ff55d
commit
4e058a77ad
16 changed files with 32 additions and 32 deletions
|
@ -31,7 +31,7 @@ options:
|
|||
- Alternative to the name, you can use C(label_id).
|
||||
type: str
|
||||
required: yes
|
||||
aliases: [ label_name, name ]
|
||||
aliases: [ name ]
|
||||
type:
|
||||
description:
|
||||
- The type of the label.
|
||||
|
@ -98,8 +98,8 @@ from ansible.module_utils.network.aci.mso import MSOModule, mso_argument_spec, i
|
|||
def main():
|
||||
argument_spec = mso_argument_spec()
|
||||
argument_spec.update(
|
||||
label=dict(type='str', required=False, aliases=['name', 'label_name']),
|
||||
label_id=dict(type='str', required=False),
|
||||
label=dict(type='str', aliases=['name']),
|
||||
label_id=dict(type='str'),
|
||||
type=dict(type='str', default='site', choices=['site']),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||
)
|
||||
|
|
|
@ -31,7 +31,7 @@ options:
|
|||
- Alternative to the name, you can use C(role_id).
|
||||
type: str
|
||||
required: yes
|
||||
aliases: [ name, role_name ]
|
||||
aliases: [ name ]
|
||||
display_name:
|
||||
description:
|
||||
- The name of the role to be displayed in the web UI.
|
||||
|
@ -131,8 +131,8 @@ from ansible.module_utils.network.aci.mso import MSOModule, mso_argument_spec, i
|
|||
def main():
|
||||
argument_spec = mso_argument_spec()
|
||||
argument_spec.update(
|
||||
role=dict(type='str', required=False, aliases=['name', 'role_name']),
|
||||
role_id=dict(type='str', required=False),
|
||||
role=dict(type='str', aliases=['name']),
|
||||
role_id=dict(type='str'),
|
||||
display_name=dict(type='str'),
|
||||
description=dict(type='str'),
|
||||
permissions=dict(type='list', choices=[
|
||||
|
|
|
@ -31,7 +31,7 @@ options:
|
|||
- The name of the schema.
|
||||
type: str
|
||||
required: yes
|
||||
aliases: [ name, schema_name ]
|
||||
aliases: [ name ]
|
||||
templates:
|
||||
description:
|
||||
- A list of templates for this schema.
|
||||
|
@ -116,8 +116,8 @@ from ansible.module_utils.network.aci.mso import MSOModule, mso_argument_spec, i
|
|||
def main():
|
||||
argument_spec = mso_argument_spec()
|
||||
argument_spec.update(
|
||||
schema=dict(type='str', required=False, aliases=['name', 'schema_name']),
|
||||
schema_id=dict(type='str', required=False),
|
||||
schema=dict(type='str', aliases=['name']),
|
||||
schema_id=dict(type='str'),
|
||||
templates=dict(type='list'),
|
||||
sites=dict(type='list'),
|
||||
# messages=dict(type='dict'),
|
||||
|
|
|
@ -108,8 +108,8 @@ def main():
|
|||
argument_spec = mso_argument_spec()
|
||||
argument_spec.update(
|
||||
schema=dict(type='str', required=True),
|
||||
site=dict(type='str', required=False, aliases=['name']),
|
||||
template=dict(type='str', required=False),
|
||||
site=dict(type='str', aliases=['name']),
|
||||
template=dict(type='str'),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||
)
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ def main():
|
|||
argument_spec.update(
|
||||
tenant=dict(type='str', required=True),
|
||||
schema=dict(type='str', required=True),
|
||||
template=dict(type='str', required=False, aliases=['name']),
|
||||
template=dict(type='str', aliases=['name']),
|
||||
display_name=dict(type='str'),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||
)
|
||||
|
|
|
@ -111,7 +111,7 @@ def main():
|
|||
argument_spec.update(
|
||||
schema=dict(type='str', required=True),
|
||||
template=dict(type='str', required=True),
|
||||
anp=dict(type='str', required=False, aliases=['name']), # This parameter is not required for querying all objects
|
||||
anp=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
|
||||
display_name=dict(type='str'),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||
)
|
||||
|
|
|
@ -193,7 +193,7 @@ def main():
|
|||
schema=dict(type='str', required=True),
|
||||
template=dict(type='str', required=True),
|
||||
anp=dict(type='str', required=True),
|
||||
epg=dict(type='str', required=False, aliases=['name']), # This parameter is not required for querying all objects
|
||||
epg=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
|
||||
bd=dict(type='dict', options=mso_reference_spec()),
|
||||
display_name=dict(type='str'),
|
||||
useg_epg=dict(type='bool'),
|
||||
|
|
|
@ -161,7 +161,7 @@ def main():
|
|||
argument_spec.update(
|
||||
schema=dict(type='str', required=True),
|
||||
template=dict(type='str', required=True),
|
||||
bd=dict(type='str', required=False, aliases=['name']), # This parameter is not required for querying all objects
|
||||
bd=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
|
||||
display_name=dict(type='str'),
|
||||
intersite_bum_traffic=dict(type='bool'),
|
||||
optimize_wan_bandwidth=dict(type='bool'),
|
||||
|
|
|
@ -162,7 +162,7 @@ def main():
|
|||
contract_display_name=dict(type='str'),
|
||||
contract_scope=dict(type='str', choices=['application-profile', 'global', 'tenant', 'vrf']),
|
||||
contract_filter_type=dict(type='str', choices=['both-way', 'one-way']),
|
||||
filter=dict(type='str', required=False, aliases=['name']), # This parameter is not required for querying all objects
|
||||
filter=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
|
||||
filter_template=dict(type='str'),
|
||||
filter_schema=dict(type='str'),
|
||||
filter_type=dict(type='str', default='both-way', choices=FILTER_KEYS.keys(), aliases=['type']),
|
||||
|
|
|
@ -113,7 +113,7 @@ def main():
|
|||
argument_spec.update(
|
||||
schema=dict(type='str', required=True),
|
||||
template=dict(type='str', required=True),
|
||||
externalepg=dict(type='str', required=False, aliases=['name']), # This parameter is not required for querying all objects
|
||||
externalepg=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
|
||||
display_name=dict(type='str'),
|
||||
vrf=dict(type='dict', options=mso_reference_spec()),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||
|
|
|
@ -175,8 +175,8 @@ def main():
|
|||
schema=dict(type='str', required=True),
|
||||
template=dict(type='str', required=True),
|
||||
filter=dict(type='str', required=True),
|
||||
filter_display_name=dict(type='str', aliases=['filter_display_name']),
|
||||
entry=dict(type='str', required=False, aliases=['name']), # This parameter is not required for querying all objects
|
||||
filter_display_name=dict(type='str'),
|
||||
entry=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
|
||||
description=dict(type='str', aliases=['entry_description']),
|
||||
display_name=dict(type='str', aliases=['entry_display_name']),
|
||||
ethertype=dict(type='str', choices=['arp', 'fcoe', 'ip', 'ipv4', 'ipv6', 'mac-security', 'mpls-unicast', 'trill', 'unspecified']),
|
||||
|
|
|
@ -113,7 +113,7 @@ def main():
|
|||
argument_spec.update(
|
||||
schema=dict(type='str', required=True),
|
||||
template=dict(type='str', required=True),
|
||||
l3out=dict(type='str', required=False, aliases=['name']), # This parameter is not required for querying all objects
|
||||
l3out=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
|
||||
display_name=dict(type='str'),
|
||||
vrf=dict(type='dict', options=mso_reference_spec()),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||
|
|
|
@ -113,7 +113,7 @@ def main():
|
|||
argument_spec.update(
|
||||
schema=dict(type='str', required=True),
|
||||
template=dict(type='str', required=True),
|
||||
vrf=dict(type='str', required=False, aliases=['name']), # This parameter is not required for querying all objects
|
||||
vrf=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
|
||||
display_name=dict(type='str'),
|
||||
layer3_multicast=dict(type='bool'),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||
|
|
|
@ -47,7 +47,7 @@ options:
|
|||
- Alternative to the name, you can use C(site_id).
|
||||
type: str
|
||||
required: yes
|
||||
aliases: [ name, site_name ]
|
||||
aliases: [ name ]
|
||||
labels:
|
||||
description:
|
||||
- The labels for this site.
|
||||
|
@ -153,8 +153,8 @@ def main():
|
|||
apic_username=dict(type='str', default='admin'),
|
||||
labels=dict(type='list'),
|
||||
location=dict(type='dict', options=location_arg_spec),
|
||||
site=dict(type='str', required=False, aliases=['name', 'site_name']),
|
||||
site_id=dict(type='str', required=False),
|
||||
site=dict(type='str', aliases=['name']),
|
||||
site_id=dict(type='str'),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||
urls=dict(type='list'),
|
||||
)
|
||||
|
|
|
@ -31,7 +31,7 @@ options:
|
|||
- Alternative to the name, you can use C(tenant_id).
|
||||
type: str
|
||||
required: yes
|
||||
aliases: [ name, tenant_name ]
|
||||
aliases: [ name ]
|
||||
display_name:
|
||||
description:
|
||||
- The name of the tenant to be displayed in the web UI.
|
||||
|
@ -115,8 +115,8 @@ def main():
|
|||
argument_spec.update(
|
||||
description=dict(type='str'),
|
||||
display_name=dict(type='str'),
|
||||
tenant=dict(type='str', required=False, aliases=['name', 'tenant_name']),
|
||||
tenant_id=dict(type='str', required=False),
|
||||
tenant=dict(type='str', aliases=['name']),
|
||||
tenant_id=dict(type='str'),
|
||||
users=dict(type='list'),
|
||||
sites=dict(type='list'),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||
|
|
|
@ -31,7 +31,7 @@ options:
|
|||
- Alternative to the name, you can use C(user_id).
|
||||
type: str
|
||||
required: yes
|
||||
aliases: [ name, user_name ]
|
||||
aliases: [ name ]
|
||||
user_password:
|
||||
description:
|
||||
- The password of the user.
|
||||
|
@ -146,8 +146,8 @@ from ansible.module_utils.network.aci.mso import MSOModule, mso_argument_spec, i
|
|||
def main():
|
||||
argument_spec = mso_argument_spec()
|
||||
argument_spec.update(
|
||||
user_id=dict(type='str', required=False),
|
||||
user=dict(type='str', required=False, aliases=['name', 'user_name']),
|
||||
user_id=dict(type='str'),
|
||||
user=dict(type='str', aliases=['name']),
|
||||
user_password=dict(type='str', no_log=True),
|
||||
first_name=dict(type='str'),
|
||||
last_name=dict(type='str'),
|
||||
|
@ -164,8 +164,8 @@ def main():
|
|||
argument_spec=argument_spec,
|
||||
supports_check_mode=True,
|
||||
required_if=[
|
||||
['state', 'absent', ['user_name']],
|
||||
['state', 'present', ['user_name']],
|
||||
['state', 'absent', ['user']],
|
||||
['state', 'present', ['user']],
|
||||
],
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue