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_site_anp_epg_staticleaf.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_site_anp_epg_staticleaf
short_description: Manage site-local EPG static leafs in schema template
description:
- Manage site-local EPG static leafs in schema template 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.
    type: str
    required: yes
  template:
    description:
    - The name of the template.
    type: str
    required: yes
  anp:
    description:
    - The name of the ANP.
    type: str
  epg:
    description:
    - The name of the EPG.
    type: str
  pod:
    description:
    - The pod of the static leaf.
    type: str
  leaf:
    description:
    - The path of the static leaf.
    type: str
    aliases: [ name ]
  vlan:
    description:
    - The VLAN id of the static leaf.
    type: int
  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:
- The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index.
  This can cause silent corruption on concurrent access when changing/removing on object as
  the wrong object may be referenced. This module is affected by this deficiency.
seealso:
- module: mso_schema_site_anp_epg
- module: mso_schema_template_anp_epg
extends_documentation_fragment: mso
s�
- name: Add a new static leaf to a site EPG
  mso_schema_site_anp_epg_staticleaf:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    leaf: Leaf1
    vlan: 123
    state: present
  delegate_to: localhost

- name: Remove a static leaf from a site EPG
  mso_schema_site_anp_epg_staticleaf:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    leaf: Leaf1
    state: absent
  delegate_to: localhost

- name: Query a specific site EPG static leaf
  mso_schema_site_anp_epg_staticleaf:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    leaf: Leaf1
    state: query
  delegate_to: localhost
  register: query_result

- name: Query all site EPG static leafs
  mso_schema_site_anp_epg_staticleaf:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    state: query
  delegate_to: localhost
  register: query_result
t
(t
AnsibleModule(t	MSOModuletmso_argument_specc$C`s1t�}|jdtdddt�dtdddt�dtdddt�dtdddt�dtdddt�d	tdd�d
tddddg�d
tdd�dtddddddddg��	td|dtdddd	d
d
ggddd	d
d
ggg�}|jd}|jd}|jd}|jd}|jd}|jd	}|jd
}|jd
}	|jd}
dj||�}t|�}|jdd|�}
|
s�|j	ddj|��ndj|
�}|
d}|j
|�}g|
dD]}|d |d!f^q}||f|kru|j	dd"j||d#j|���n|j||f�}d$j||�}|j
d%|d|d|�}g|
d|d&D]}|d'^q�}||kr|j	dd(j|d#j|���n|j|�}|jd%|d|d|d|�}g|
d|d&|d)D]}|d*^qe}||kr�|j	dd+j|d#j|���n|j|�}g|
d|d&|d)|d,D]}|d-|d.f^q�}||	f|krl|j||	f�}d/j||||�} |
d|d&|d)|d,||_n|
dkr�|dks�|	dkr�|
d|d&|d)|d,|_n.|js�|j	dd0jd
|d
|	��n|j�nd1j|||�}!g}"|j|_|
dkra|jr�i|_|_|"jtd2d3d-| ��q�n�|
dkr�td-|d.|	�}#|j|#d4t�|jr�|"jtd2d5d-| d6|j��n)|"jtd2d7d-|!d8d6|j��|j|_n|js#|j|d9d:d;|"�n|j�dS(<Ntschemattypetstrtrequiredtsitettemplatetanptepgtpodtleaftaliasestnametvlantinttstatetdefaulttpresenttchoicestabsenttqueryt
argument_spectsupports_check_modetrequired_ifstopology/{0}/node-{1}tschemastdisplayNametmsgs$Provided schema '{0}' does not existsschemas/{id}tidtsitestsiteIdttemplateNamesNProvided site/template '{0}-{1}' does not exist. Existing sites/templates: {2}s, s{0}-{1}t	schema_idtanpstanpRefs5Provided anp '{0}' does not exist. Existing anps: {1}tepgstepgRefs5Provided epg '{0}' does not exist. Existing epgs: {1}tstaticLeafstpatht
portEncapVlans,/sites/{0}/anps/{1}/epgs/{2}/staticLeafs/{3}s%Static leaf '{leaf}/{vlan}' not founds(/sites/{0}/anps/{1}/epgs/{2}/staticLeafstoptremovetcollatetreplacetvaluetadds/-tmethodtPATCHtdata(RtupdatetdicttTrueR	tparamstformatR
tget_objt	fail_jsontlookup_sitetjointindextanp_reftepg_reftexistingtNonet	exit_jsontprevioustsenttappendtsanitizetproposedt
check_modetrequest($R tmoduleRRRRRRRRRtleafpathtmsot
schema_objtschema_pathR*tsite_idtsR'tsite_idxt
site_templateREtaR+tanp_idxRFteR-tepg_idxtltleafstleaf_idxt	leaf_patht
leafs_pathtopstpayload((sb/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_site_anp_epg_staticleaf.pytmain�s�		%









++)($1(C,(	%
	"		()	t__main__N(t
__future__RRRR
t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicR	t$ansible.module_utils.network.aci.msoR
RRet__name__(((sb/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_site_anp_epg_staticleaf.pyt<module>s


?;	u

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