�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
m Z d d l m
Z
m Z m Z m Z d
� Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys�
---
module: mso_schema_template_externalepg
short_description: Manage external EPGs in schema templates
description:
- Manage external EPGs in schema templates on Cisco ACI Multi-Site.
author:
- Dag Wieers (@dagwieers)
version_added: '2.8'
options:
schema:
description:
- The name of the schema.
type: str
required: yes
template:
description:
- The name of the template.
type: str
required: yes
externalepg:
description:
- The name of the external EPG to manage.
type: str
aliases: [ name ]
display_name:
description:
- The name as displayed on the MSO web interface.
type: str
vrf:
description:
- The VRF associated to this ANP.
type: dict
state:
description:
- Use C(present) or C(absent) for adding or removing.
- Use C(query) for listing an object or multiple objects.
type: str
choices: [ absent, present, query ]
default: present
extends_documentation_fragment: mso
s(
- name: Add a new external EPG
mso_schema_template_externalepg:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
externalepg: External EPG 1
state: present
delegate_to: localhost
- name: Remove an external EPG
mso_schema_template_externalepg:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
externalepg: external EPG1
state: absent
delegate_to: localhost
- name: Query a specific external EPGs
mso_schema_template_externalepg:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
externalepg: external EPG1
state: query
delegate_to: localhost
register: query_result
- name: Query all external EPGs
mso_schema_template_externalepg:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
state: query
delegate_to: localhost
register: query_result
t
( t
AnsibleModule( t MSOModulet mso_argument_spect mso_reference_spect issubsetc C` sN t � } | j d t d d d t � d t d d d t � d t d d d d g � d t d d � d
t d d d t � � d
t d d d d d d d d g � � t d | d t d d
d d g g d
d d d
g g g � } | j d } | j d } | j d } | j d } | j d
} | j d
} t | � } | j d d | �} | r^| d }
n | j d d j
| � � d j
| � } g | d D] } | d ^ q�}
| |
k r�| j d d j
| d j |
� � � n |
j | � } g | d | d D] } | d ^ q�} | d k rV| | k rV| j | � } | d | d | | _ n | d k r�| d k r�| d | d | _ n( | j s�| j d d j
d | � � n | j � n d! j
| � } d"