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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZmZd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: mso_schema_site_bd_subnet
short_description: Manage site-local BD subnets in schema template
description:
- Manage site-local BD 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
  bd:
    description:
    - The name of the BD.
    type: str
    aliases: [ name ]
  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_bd
- module: mso_schema_template_bd
extends_documentation_fragment: mso
sn
- name: Add a new site BD subnet
  mso_schema_site_bd_subnet:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    bd: BD1
    subnet: 11.11.11.0/24
    state: present
  delegate_to: localhost

- name: Remove a site BD subnet
  mso_schema_site_bd_subnet:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    bd: BD1
    subnet: 11.11.11.0/24
    state: absent
  delegate_to: localhost

- name: Query a specific site BD subnet
  mso_schema_site_bd_subnet:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    bd: BD1
    subnet: 11.11.11.0/24
    state: query
  delegate_to: localhost
  register: query_result

- name: Query all site BD subnets
  mso_schema_site_bd_subnet:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    bd: BD1
    state: query
  delegate_to: localhost
  register: query_result
t
(t
AnsibleModule(t	MSOModuletmso_argument_spectmso_subnet_speccC`s|t�}|jdtdddt�dtdddt�dtdddt�dtdddd	g�d
tddddd
dddg��|jt��td|dtdd
ddggd
ddggg�}|jd}|jd}|jd}|jd}|jd}|jd}|jd}|jd}	|jd}
|jd
}t|�}|jdd|�}
|
s�|j	ddj
|��ndj
|
�}|
d}|j|�}g|
dD]}|d|d f^q�}||f|kr,|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
|�}g|
d|d%|d(D]}|d)^q�}||krb|j
|�}d*j
|||�}|
d|d%|d(||_n|dkr�|dkr�|
d|d%|d(|_n(|js�|j	dd+j
d|��n|j�nd,j
||�}g}|j|_|dkr:|jrIi|_|_|jtd-d.d/|��qIn|dkrI|js�|dkrd|}n|dkryd0}n|	dkr�t}	n|
dkr�t}
q�ntd)|d|d|d|	d1|
�}|j|d2t�|jr|jtd-d3d/|d4|j��n)|jtd-d5d/|d6d4|j��|j|_n|jsn|j|d7d8d9|�n|j�dS(:Ntschemattypetstrtrequiredtsitettemplatetbdtaliasestnametstatetdefaulttpresenttchoicestabsenttqueryt
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_idtbdstbdRefs3Provided BD '{0}' does not exist. Existing BDs: {1}tsubnetstips/sites/{0}/bds/{1}/subnets/{2}sSubnet IP '{subnet}' not founds/sites/{0}/bds/{1}/subnetstoptremovetpathtprivatetnoDefaultGatewaytcollatetreplacetvaluetadds/-tmethodtPATCHtdata(RtupdatetdicttTrueRR	tparamsR
tget_objt	fail_jsontformattlookup_sitetjointindextbd_reftexistingtNonet	exit_jsontprevioustsenttappendtFalsetsanitizetproposedt
check_modetrequest(RtmoduleR
RRRRR R!R"R#Rtmsot
schema_objtschema_pathR+tsite_idtsR(tsite_idxt
site_templateRFtvR,tbd_idxR.t
subnet_idxtsubnet_pathtsubnets_pathtopstpayload((sY/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_site_bd_subnet.pytmain�s�		%










++)(1$ 	
	"						()	t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicR	t$ansible.module_utils.network.aci.msoR
RRRat__name__(((sY/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_site_bd_subnet.pyt<module>s


F7	w

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