�
�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 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_site
short_description: Manage sites in schemas
description:
- Manage sites 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
site:
description:
- The name of the site to manage.
type: str
required: yes
template:
description:
- The name of the template.
type: str
required: yes
aliases: [ name ]
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
seealso:
- module: mso_schema_template
- module: mso_site
extends_documentation_fragment: mso
s�
- name: Add a new site to a schema
mso_schema_site:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
site: bdsol-pod51
template: Template 1
state: present
delegate_to: localhost
- name: Remove a site from a schema
mso_schema_site:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
site: bdsol-pod51
template: Template 1
state: absent
delegate_to: localhost
- name: Query a schema site
mso_schema_site:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
site: bdsol-pod51
template: Template 1
state: query
delegate_to: localhost
register: query_result
- name: Query all schema sites
mso_schema_site:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
site: bdsol-pod51
state: query
delegate_to: localhost
register: query_result
t
( t
AnsibleModule( t MSOModulet mso_argument_specc C` sn t � } | j d t d d d t � d t d d d d g � d t d d � d t d d d
d d d
d d g � � t d | d t d d d
d d g g d d d d g g g � } | j d } | j d } | j d } | j d } t | � } | j d d | �} | s)| j d d j | � � n d j | � } | j
| � } i | _ d | k r�g | d D] }
|
d |
d f ^ qg} | r�| | f | k r�| j | | f � } | d | | _ q�q�| d | _ n | d k r+| j s| r| j d d j | � � qg | _ n | j
� n d }
d j | � } g } | j | _ | d
k r�| j r;i | _ | _ | j t d d d | � � q;n� | d k r;| j s;t d | d | d g d! g d"