Update mso_schema_template_anp_epg.py (#59746)

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py

* Update mso_schema_template_anp_epg.py
This commit is contained in:
Apoorva Gururaja 2019-08-20 19:00:53 -07:00 committed by Dag Wieers
parent e747487720
commit 2bbbc5fafc

View file

@ -68,6 +68,26 @@ options:
description:
- The template that defines the referenced BD.
type: str
vrf:
version_added: '2.9'
description:
- The VRF associated to this ANP.
type: dict
suboptions:
name:
description:
- The name of the VRF to associate with.
required: true
type: str
schema:
description:
- The schema that defines the referenced VRF.
- If this parameter is unspecified, it defaults to the current schema.
type: str
template:
description:
- The template that defines the referenced VRF.
type: str
subnets:
description:
- The subnets associated to this ANP.
@ -145,6 +165,10 @@ EXAMPLES = r'''
template: Template 1
anp: ANP 1
epg: EPG 1
bd:
name: bd1
vrf:
name: vrf1
state: present
delegate_to: localhost
@ -170,6 +194,10 @@ EXAMPLES = r'''
template: Template 1
anp: ANP 1
epg: EPG 1
bd:
name: bd1
vrf:
name: vrf1
state: absent
delegate_to: localhost
@ -182,6 +210,10 @@ EXAMPLES = r'''
template: Template 1
anp: ANP 1
epg: EPG 1
bd:
name: bd1
vrf:
name: vrf1
state: query
delegate_to: localhost
register: query_result
@ -194,6 +226,11 @@ EXAMPLES = r'''
schema: Schema 1
template: Template 1
anp: ANP 1
epg: EPG 1
bd:
name: bd1
vrf:
name: vrf1
state: query
delegate_to: localhost
register: query_result
@ -214,6 +251,7 @@ def main():
anp=dict(type='str', required=True),
epg=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
bd=dict(type='dict', options=mso_reference_spec()),
vrf=dict(type='dict', options=mso_reference_spec()),
display_name=dict(type='str'),
useg_epg=dict(type='bool'),
intra_epg_isolation=dict(type='str', choices=['enforced', 'unenforced']),
@ -238,6 +276,7 @@ def main():
epg = module.params['epg']
display_name = module.params['display_name']
bd = module.params['bd']
vrf = module.params['vrf']
useg_epg = module.params['useg_epg']
intra_epg_isolation = module.params['intra_epg_isolation']
intersite_multicaste_source = module.params['intersite_multicaste_source']
@ -293,6 +332,7 @@ def main():
elif state == 'present':
bd_ref = mso.make_reference(bd, 'bd', schema_id, template)
vrf_ref = mso.make_reference(vrf, 'vrf', schema_id, template)
subnets = mso.make_subnets(subnets)
if display_name is None and not mso.existing:
@ -310,6 +350,7 @@ def main():
subnets=subnets,
bdRef=bd_ref,
preferredGroup=preferred_group,
vrfRef=vrf_ref,
)
mso.sanitize(payload, collate=True)