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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZmZmZd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: mso_schema_site_anp_epg_subnet
short_description: Manage site-local EPG subnets in schema template
description:
- Manage site-local EPG subnets 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
  subnet:
    description:
    - The IP range in CIDR notation.
    type: str
    required: true
    aliases: [ ip ]
  description:
    description:
    - The description of this subnet.
    type: str
  scope:
    description:
    - The scope of the subnet.
    type: str
    choices: [ private, public ]
  shared:
    description:
    - Whether this subnet is shared between VRFs.
    type: bool
  no_default_gateway:
    description:
    - Whether this subnet has a default gateway.
    type: bool
  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_subnet
extends_documentation_fragment: mso
s�
- name: Add a new subnet to a site EPG
  mso_schema_site_anp_epg_subnet:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    subnet: 10.0.0.0/24
    state: present
  delegate_to: localhost

- name: Remove a subnet from a site EPG
  mso_schema_site_anp_epg_subnet:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    subnet: 10.0.0.0/24
    state: absent
  delegate_to: localhost

- name: Query a specific site EPG subnet
  mso_schema_site_anp_epg_subnet:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    subnet: 10.0.0.0/24
    state: query
  delegate_to: localhost
  register: query_result

- name: Query all site EPG subnets
  mso_schema_site_anp_epg_subnet:
    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_spectmso_subnet_spectissubsetc$C`sQt�}|jdtdddt�dtdddt�dtdddt�dtdddt�dtdddt�d	tddd
ddd
ddg��|jt��td|dtdd	d
dggd	ddggg�}|jd}|jd}|jd}|jd}|jd}|jd}|jd}|jd}	|jd}
|jd}|jd	}t|�}
|
jdd|�}|s�|
j	ddj
|��ndj
|�}|d}|
j|�}g|dD]}|d|df^q�}||f|krK|
j	dd j
||d!j|���n|j
||f�}d"j
||�}|
jd#|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(^q;}||kr�|
j	dd)j
|d!j|���n|j
|�}g|d|d$|d'|d*D]}|d+^q�}||kr,|j
|�}d,j
||||�} |d|d$|d'|d*||
_n|dkr�|dkrl|d|d$|d'|d*|
_n(|
js�|
j	dd-j
d|��n|
j�nd.j
|||�}!g}"|
j|
_|d
kr|
jri|
_|
_|"jtd/d0d1| ��qn|dkr|
js{|dkr9|}n|	dkrNd2}	n|
dkrct}
n|dkr{t}q{ntd+|d|d|	d|
d3|�}#|
j|#d4t�|
jr�|"jtd/d5d1| d6|
j��n)|"jtd/d7d1|!d8d6|
j��|
j|
_n|jsC|
j|d9d:d;|"�n|
j�dS(<Ntschemattypetstrtrequiredtsitettemplatetanptepgtstatetdefaulttpresenttchoicestabsenttqueryt
argument_spectsupports_check_modetrequired_iftsubnettdescriptiontscopetsharedtno_default_gatewaytschemastdisplayNametmsgs$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}tsubnetstips(/sites/{0}/anps/{1}/epgs/{2}/subnets/{3}sSubnet '{subnet}' not founds$/sites/{0}/anps/{1}/epgs/{2}/subnetstoptremovetpathtprivatetnoDefaultGatewaytcollatetreplacetvaluetadds/-tmethodtPATCHtdata(RtupdatetdicttTrueRR	tparamsR
tget_objt	fail_jsontformattlookup_sitetjointindextanp_reftepg_reftexistingtNonet	exit_jsontprevioustsenttappendtFalsetsanitizetproposedt
check_modetrequest($RtmoduleRRRRRRR R!R"R#Rtmsot
schema_objtschema_pathR+tsite_idtsR(tsite_idxt
site_templateRHtaR,tanp_idxRIteR.tepg_idxR0t
subnet_idxtsubnet_pathtsubnets_pathtopstpayload((s^/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_site_anp_epg_subnet.pytmain�s�		%











++)($1(9,(	
	"						()	t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicR	t$ansible.module_utils.network.aci.msoR
RRR
Rft__name__(((s^/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_site_anp_epg_subnet.pyt<module>s


I:"	�

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