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_staticport.pyo

�
�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_staticport
short_description: Manage site-local EPG static ports in schema template
description:
- Manage site-local EPG static ports 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
  type:
    description:
    - The path type of the static port
    type: str
    choices: [ port ]
    default: port
  pod:
    description:
    - The pod of the static port.
    type: str
  leaf:
    description:
    - The leaf of the static port.
    type: str
  path:
    description:
    - The path of the static port.
    type: str
  vlan:
    description:
    - The port encap VLAN id of the static port.
    type: int
  deployment_immediacy:
    description:
    - The deployment immediacy of the static port.
    - C(immediate) means B(Deploy immediate).
    - C(lazy) means B(deploy on demand).
    type: str
    choices: [ immediate, lazy ]
  mode:
    description:
    - The mode of the static port.
    - C(native) means B(Access (802.1p)).
    - C(regular) means B(Trunk).
    - C(untagged) means B(Access (untagged)).
    type: str
    choices: [ native, regular, untagged ]
  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 port to a site EPG
  mso_schema_site_anp_epg_staticport:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    type: port
    pod: pod-1
    leaf: 101
    path: eth1/1
    vlan: 126
    deployment_immediacy: immediate
    state: present
  delegate_to: localhost

- name: Remove a static port from a site EPG
  mso_schema_site_anp_epg_staticport:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    type: port
    pod: pod-1
    leaf: 101
    path: eth1/1
    state: absent
  delegate_to: localhost

- name: Query a specific site EPG static port
  mso_schema_site_anp_epg_staticport:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    type: port
    pod: pod-1
    leaf: 101
    path: eth1/1
    state: query
  delegate_to: localhost
  register: query_result

- name: Query all site EPG static ports
  mso_schema_site_anp_epg_staticport:
    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`st�}|jdtdddt�dtdddt�dtdddt�dtdddt�dtdddt�dtddd	d
dd
g�dtdd�d
tdd�dtdd�dtdd�dtdddddg�dtddddddg�dtddd	dddddg��
td|dtdddddd
ddggddddd
ddggg�}|jd}|jd}|jd}|jd}|jd}|jd}|jd}|jd
}	|jd}
|jd}|jd}|jd}
|jd}|d
krQdj||	|
�}nt|�}|jd d!|�}|s�|j	d"d#j|��nd$j|�}|d%}|j
|�}g|d&D]}|d'|d(f^q�}||f|kr$|j	d"d)j||d*j|���n|j||f�}d+j||�}|j
d,|d|d|�}g|d&|d-D]}|d.^q|}||kr�|j	d"d/j|d*j|���n|j|�}|jd,|d|d|d|�}g|d&|d-|d0D]}|d1^q}||kr^|j	d"d2j|d*j|���n|j|�} g|d&|d-|d0| d3D]}!|!d^q�}"||"kr|"j|�}#d4j||||#�}$|d&|d-|d0| d3|#|_n|dkr�|	dks)|dkrQ|d&|d-|d0| d3|_n(|jsy|j	d"d5jd6|��n|j�nd7j|||�}%g}&|j|_|dkr�|jr�i|_|_|&jtd8d9d|$��q�n�|dkr�|js6|dkrd}n|
dkr6d}
q6ntd:|d|
d|d;|d|�}'|j|'d<t�|jr�|&jtd8d=d|$d>|j��n)|&jtd8d?d|%d@d>|j��|j|_n|js�|j|dAdBdC|&�n|j�dS(DNtschemattypetstrtrequiredtsitettemplatetanptepgtdefaulttporttchoicestpodtleaftpathtvlantinttdeployment_immediacyt	immediatetlazytmodetnativetregulartuntaggedtstatetpresenttabsenttqueryt
argument_spectsupports_check_modetrequired_ifs#topology/{0}/paths-{1}/pathep-[{2}]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}tstaticPortss,/sites/{0}/anps/{1}/epgs/{2}/staticPorts/{3}s"Static port '{portpath}' not foundtportpaths(/sites/{0}/anps/{1}/epgs/{2}/staticPortstoptremovetdeploymentImmediacyt
portEncapVlantcollatetreplacetvaluetadds/-tmethodtPATCHtdata(RtupdatetdicttTrueR	tparamstformatR
tget_objt	fail_jsontlookup_sitetjointindextanp_reftepg_reftexistingtNonet	exit_jsontprevioustsenttappendtsanitizetproposedt
check_modetrequest((R'tmoduleRRRRRt	path_typeRRRRRRR#R7tmsot
schema_objtschema_pathR1tsite_idtsR.tsite_idxt
site_templateRMtaR2tanp_idxRNteR4tepg_idxtpt	portpathstportpath_idxt	port_patht
ports_pathtopstpayload((sb/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_site_anp_epg_staticport.pytmain�s�		%$












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


WE	�

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