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_domain.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_domain
short_description: Manage site-local EPG domains in schema template
description:
- Manage site-local EPG domains in schema template on Cisco ACI Multi-Site.
author:
- Nirav Katarmal (@nkatarmal-crest)
version_added: '2.9'
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
    required: yes
  epg:
    description:
    - The name of the EPG.
    type: str
    required: yes
  domain_association_type:
    description:
    - The type of domain to associate.
    type: str
    choices: [ vmmDomain, l3ExtDomain, l2ExtDomain, physicalDomain, fibreChannel ]
  domain_profile:
    description:
    - The domain profile name.
    type: str
  deployment_immediacy:
    description:
    - The deployment immediacy of the domain.
    - C(immediate) means B(Deploy immediate).
    - C(lazy) means B(deploy on demand).
    type: str
    choices: [ immediate, lazy ]
  resolution_immediacy:
    description:
    - Determines when the policies should be resolved and available.
    - Defaults to C(lazy) when unset during creation.
    type: str
    choices: [ immediate, lazy, pre-provision ]
  micro_seg_vlan_type:
    description:
    - Virtual LAN type for microsegmentation. This attribute can only be used with vmmDomain domain association.
    type: str
  micro_seg_vlan:
    description:
    - Virtual LAN for microsegmentation. This attribute can only be used with vmmDomain domain association.
    type: int
  port_encap_vlan_type:
    description:
    - Virtual LAN type for port encap. This attribute can only be used with vmmDomain domain association.
    type: str
  port_encap_vlan:
    description:
    - Virtual LAN type for port encap. This attribute can only be used with vmmDomain domain association.
    type: int
  vlan_encap_mode:
    description:
    - Which VLAN enacap mode to use. This attribute can only be used with vmmDomain domain association.
    type: str
    choices: [ static, dynamic ]
  allow_micro_segmentation:
    description:
    - Specifies microsegmentation is enabled or not. This attribute can only be used with vmmDomain domain association.
    type: bool
  switch_type:
    description:
    - Which switch type to use with this domain association. This attribute can only be used with vmmDomain domain association.
    type: str
  switching_mode:
    description:
    - Which switching mode to use with this domain association. This attribute can only be used with vmmDomain domain association.
    type: str
  enhanced_lagpolicy_name:
    description:
    - EPG enhanced lagpolicy name. This attribute can only be used with vmmDomain domain association.
    type: str
  enhanced_lagpolicy_dn:
    description:
    - Distinguished name of EPG lagpolicy. This attribute can only be used with vmmDomain domain association.
    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:
- 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_domain:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    domain_association_type: vmmDomain
    domain_profile: 'VMware-VMM'
    deployment_immediacy: lazy
    resolution_immediacy: pre-provision
    state: present
  delegate_to: localhost

- name: Remove a static leaf from a site EPG
  mso_schema_site_anp_epg_domain:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    domain_association_type: vmmDomain
    domain_profile: 'VMware-VMM'
    deployment_immediacy: lazy
    resolution_immediacy: pre-provision
    state: absent
  delegate_to: localhost

- name: Query a specific site EPG static leaf
  mso_schema_site_anp_epg_domain:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    domain_association_type: vmmDomain
    domain_profile: 'VMware-VMM'
    state: query
  delegate_to: localhost
  register: query_result

- name: Query all site EPG static leafs
  mso_schema_site_anp_epg_domain:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    state: query
  delegate_to: localhost
  register: query_result
t
(t
AnsibleModule(t	MSOModuletmso_argument_specc4+C`s
t�}|jdtdddt�dtdddt�dtdddt�dtdddt�dtdddt�d	tddd
ddd
ddg�dtdd�dtddd
ddg�dtddd
dddg�dtddddd
dddg�dtdd�dtdd�dtdd�dtdd�d tddd
d!d"g�d#tdd$�d%tdd�d&tdd�d'tdd�d(tdd��td)|d*td+ddd	dddggddd	dddggg�}|jd}|jd}|jd}|jd}|jd}|jd	}|jd}|jd}	|jd}
|jd}|jd}|jd}
|jd}|jd}|jd }|jd#}|jd%}|jd&}|jd'}|jd(}t|�}|jd,d-|�}|s@|jd.d/j	|��nd0j	|�}|d1}|j
|�}g|d2D]}|d3|d4f^qs}||f|kr�|jd.d5j	||d6j|���n|j||f�}d7j	||�}|j
d8|d|d|�}g|d2|d9D]} | d:^q(}!||!krr|jd.d;j	|d6j|!���n|!j|�}"|jd8|d|d|d|�}#t|#�g|d2|d9|"d<D]}$|$d=^q�}%|#|%kr|jd.d>j	|t|d2|�|#��n|%j|#�}&|dkrId?j	|�}'n~|dkrgd@j	|�}'n`|d
kr�dAj	|�}'nB|dkr�dBj	|�}'n$|dkr�dCj	|�}'ndD}'g|d2|d9|"d<|&dED]}(|(dF^q�})|'|)kr_|)j|'�}*dGj	||||*�}+|d2|d9|"d<|&dE|*|_n|dkr�|dks�|dkr�|d2|d9|"d<|&dE|_n.|js�|jd.dHj	d	|d|��n|j�ndIj	|||�},g}-|dkr�i}.|rA|
rAtdJ|dK|
�}/|/|.dL<n@|ra|
ra|jd.dM�n |r�|
r�|jd.dN�n|r�|
r�tdJ|dK|�}0|0|.dO<n@|r�|r�|jd.dP�n |r�|r�|jd.dQ�n|r||.dR<n|r||.dS<n|r(||.dT<n|r;||.dU<n|rx|rxtdV|dF|�}1tdW|1�}2|2|.dX<n@|r�|r�|jd.dY�n |r�|r�|jd.dZ�ntdF|'d[|d\|	d]|
�}3|.r	|.|3d^<q	n!tdF|'d[|d\|	d]|
�}3|j|_|dkrc	|jr�	i|_|_|-jtd_d`da|,��q�	n�|dkr�	|j|3dbt�|jr�	|-jtd_dcda|+dd|j��n)|-jtd_deda|,dfdd|j��|j|_n|js
|j|dgdhdi|-�n|j�dS(jNtschemattypetstrtrequiredtsitettemplatetanptepgtdomain_association_typetchoicest	vmmDomaintl3ExtDomaintl2ExtDomaintphysicalDomaintfibreChanneltdomain_profiletdeployment_immediacyt	immediatetlazytresolution_immediacys
pre-provisiontstatetdefaulttpresenttabsenttquerytmicro_seg_vlan_typetmicro_seg_vlantinttport_encap_vlan_typetport_encap_vlantvlan_encap_modetstatictdynamictallow_micro_segmentationtbooltswitch_typetswitching_modetenhanced_lagpolicy_nametenhanced_lagpolicy_dnt
argument_spectsupports_check_modetrequired_iftschemastdisplayNametmsgs$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}tepgstepgRefs@Provided epg '{0}' does not exist. Existing epgs: {1} epgref {2}suni/vmmp-VMware/dom-{0}s
uni/l3dom-{0}s
uni/l2dom-{0}suni/phys-{0}s
uni/fc-{0}ttdomainAssociationstdns3/sites/{0}/anps/{1}/epgs/{2}/domainAssociations/{3}sIDomain association '{domain_association_type}/{domain_profile}' not founds//sites/{0}/anps/{1}/epgs/{2}/domainAssociationstvlanTypetvlantmicroSegVlans@micro_seg_vlan_type is required when micro_seg_vlan is provided.s@micro_seg_vlan is required when micro_seg_vlan_type is provided.t
portEncapVlansBport_encap_vlan_type is required when port_encap_vlan is provided.sBport_encap_vlan is required when port_encap_vlan_type is provided.t
vlanEncapModetallowMicroSegmentationt
switchTypet
switchingModetnametenhancedLagPolt	epgLagPolsKenhanced_lagpolicy_name is required when enhanced_lagpolicy_dn is provided.sKenhanced_lagpolicy_dn is required when enhanced_lagpolicy_name is provided.t
domainTypetdeploymentImmediacytresolutionImmediacytvmmDomainPropertiestoptremovetpathtcollatetreplacetvaluetadds/-tmethodtPATCHtdata(RtupdatetdicttTrueR	tparamsR
tget_objt	fail_jsontformattlookup_sitetjointindextanp_reftepg_reftprintRtexistingtNonet	exit_jsontprevioustsenttappendtsanitizetproposedt
check_modetrequest(4R3tmoduleRRRRRRRRRR R%R&R(R)R*R-R/R0R1R2tmsot
schema_objtschema_pathR=tsite_idtsR:tsite_idxt
site_templateRhtaR>tanp_idxRiteR@tepg_idxt	domain_dntdomtdomainst
domain_idxtdomain_pathtdomains_pathtopsRSRGRHRNROtpayload((s^/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_site_anp_epg_domain.pytmain�s4		$$!




















++)($
109,(	














			"	()	t__main__N(t
__future__RRRR
t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicR	t$ansible.module_utils.network.aci.msoR
RR�t__name__(((s^/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_site_anp_epg_domain.pyt<module>s


sB	�

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