Added preferred group attribute to epg (#59779)

pull/58608/merge
Nirav Katarmal 5 years ago committed by Dag Wieers
parent 11862782ff
commit b34002bb55

@ -114,6 +114,12 @@ options:
- Whether intersite multicase source is enabled.
- When not specified, this parameter defaults to C(no).
type: bool
preferred_group:
description:
- Whether this EPG is added to preferred group or not.
- When not specified, this parameter defaults to C(no).
type: bool
version_added: 2.9
state:
description:
- Use C(present) or C(absent) for adding or removing.
@ -142,6 +148,19 @@ EXAMPLES = r'''
state: present
delegate_to: localhost
- name: Add a new EPG with preferred group.
mso_schema_template_anp_epg:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
anp: ANP 1
epg: EPG 1
state: present
preferred_group: yes
delegate_to: localhost
- name: Remove an EPG
mso_schema_template_anp_epg:
host: mso_host
@ -201,6 +220,7 @@ def main():
intersite_multicaste_source=dict(type='bool'),
subnets=dict(type='list', options=mso_subnet_spec()),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
preferred_group=dict(type='bool'),
)
module = AnsibleModule(
@ -223,6 +243,7 @@ def main():
intersite_multicaste_source = module.params['intersite_multicaste_source']
subnets = module.params['subnets']
state = module.params['state']
preferred_group = module.params['preferred_group']
mso = MSOModule(module)
@ -288,6 +309,7 @@ def main():
contractRelationships=[],
subnets=subnets,
bdRef=bd_ref,
preferredGroup=preferred_group,
)
mso.sanitize(payload, collate=True)

Loading…
Cancel
Save