Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/aci/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_template.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys
---
module: mso_schema_template
short_description: Manage templates in schemas
description:
- Manage templates on Cisco ACI Multi-Site.
author:
- Dag Wieers (@dagwieers)
version_added: '2.8'
options:
  tenant:
    description:
    - The tenant used for this template.
    type: str
    required: yes
  schema:
    description:
    - The name of the schema.
    type: str
    required: yes
  template:
    description:
    - The name of the template.
    type: str
    aliases: [ name ]
  display_name:
    description:
    - The name as displayed on the MSO web interface.
    type: str
  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
notes:
- Due to restrictions of the MSO REST API this module creates schemas when needed, and removes them when the last template has been removed.
seealso:
- module: mso_schema
- module: mso_schema_site
extends_documentation_fragment: mso
s�
- name: Add a new template to a schema
  mso_schema_template:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    tenant: Tenant 1
    schema: Schema 1
    template: Template 1
    state: present
  delegate_to: localhost

- name: Remove a template from a schema
  mso_schema_template:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    tenant: Tenant 1
    schema: Schema 1
    template: Template 1
    state: absent
  delegate_to: localhost

- name: Query a template
  mso_schema_template:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    tenant: Tenant 1
    schema: Schema 1
    template: Template 1
    state: query
  delegate_to: localhost
  register: query_result

- name: Query all templates
  mso_schema_template:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    tenant: Tenant 1
    schema: Schema 1
    state: query
  delegate_to: localhost
  register: query_result
t
(t
AnsibleModule(t	MSOModuletmso_argument_speccC`s�t�}|jdtdddt�dtdddt�dtddddg�d	tdd�d
tddddd
dddg��td|dtdd
ddggd
ddggg�}|jd}|jd}|jd}|jd	}|jd
}t|�}|jdd|�}i|_|r�dj	|�}	g|dD]}
|
d^qL}|r�||kr�|j
|�}|d||_q�q�|d|_nd}	|dkr|js�|r�|jddj	|��q�g|_n|j�ndj	|�}
g}|j|_
|dkr�i|_|_|sFqYt|�dkr�i|_|js�|j|	dd�q�qY|jrYi|_|jtddd|
��qYn�|dkrY|j|�}|dkr�|jjd|�}n|shtd|dtd|d|d |�gd!g�}|dd"|_|jsV|j|	dd#d$|�qVqY|jr�td|d|d |�}|j|d%t�|jtdd&d|
d'd(|��|jtdd&d|
d)d(|��|j|_qYtd|d|d |�}|j|d%t�|jtdd*dd+d(|��|j|_n|js~|j|	dd,d$|�n|j�dS(-Nttenantttypetstrtrequiredtschemattemplatetaliasestnametdisplay_nametstatetdefaulttpresenttchoicestabsenttqueryt
argument_spectsupports_check_modetrequired_iftschemastdisplayNamesschemas/{id}t	templatestmsgsTemplate '{0}' not founds/templates/{0}itmethodtDELETEtoptremovetpathttenantIdtsitesitPOSTtdatatcollatetreplaces/displayNametvalues	/tenantIdtadds/templates/-tPATCH(RtupdatetdicttTrueR	tparamsR
tget_objtexistingtformattindext	fail_jsont	exit_jsontprevioustproposedtsenttlent
check_modetrequesttappendt
lookup_tenanttNonetgettsanitize(RtmoduleRRRRRtmsot
schema_objtschema_pathttR ttemplate_idxt
template_pathtopst	tenant_idtpayload((sS/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_template.pytmainps�		%




	!	
								&&	"	t__main__N(t
__future__RRRR
t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicR	t$ansible.module_utils.network.aci.msoR
RROt__name__(((sS/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_template.pyt<module>s


,/	�

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]