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_vrf_region_cidr.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_vrf_region_cidr
short_description: Manage site-local VRF region CIDRs in schema template
description:
- Manage site-local VRF region CIDRs 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
  vrf:
    description:
    - The name of the VRF.
    type: str
  region:
    description:
    - The name of the region.
    type: str
  cidr:
    description:
    - The name of the region CIDR to manage.
    type: str
    aliases: [ ip ]
  primary:
    description:
    - Whether this is the primary CIDR.
    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_vrf_region
- module: mso_schema_site_vrf_region_cidr_subnet
- module: mso_schema_template_vrf
extends_documentation_fragment: mso
s
- name: Add a new site VRF region CIDR
  mso_schema_template_vrf_region_cidr:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    vrf: VRF1
    region: us-west-1
    cidr: 14.14.14.1/24
    state: present
  delegate_to: localhost

- name: Remove a site VRF region CIDR
  mso_schema_template_vrf_region_cidr:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    vrf: VRF1
    region: us-west-1
    cidr: 14.14.14.1/24
    state: absent
  delegate_to: localhost

- name: Query a specific site VRF region CIDR
  mso_schema_template_vrf_region_cidr:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    vrf: VRF1
    region: us-west-1
    cidr: 14.14.14.1/24
    state: query
  delegate_to: localhost
  register: query_result

- name: Query all site VRF region CIDR
  mso_schema_template_vrf_region_cidr:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    vrf: VRF1
    region: us-west-1
    state: query
  delegate_to: localhost
  register: query_result
t
(t
AnsibleModule(t	MSOModuletmso_argument_specc!C`s�t�}|jdtdddt�dtdddt�dtdddt�dtdddt�dtdddt�d	tddd
dg�dtdd
�dtddddddddg��td|dtdddd	ggddd	ggg�}|jd}|jd}|jd}|jd}|jd}|jd	}|jd}|jd}	t|�}
|
jdd|�}|s�|
jddj	|��ndj	|�}|d}
|
j
|�}g|dD]}|d|df^q�}||f|kr;|
jdd j	||d!j|���n|j||f�}d"j	||�}|
j
d#|
d|d|�}g|d|d$D]}|d%^q�}||kr�|
jdd&j	|d!j|���n|j|�}g|d|d$|d'D]}|d(^q}||krQ|
jdd)j	|d!j|���n|j|�}g|d|d$|d'|d*D]}|d^q�}|dk	r||kr|j|�}d+j	||||�}|d|d$|d'|d*||
_n|	dkry|dkrD|d|d$|d'|d*|
_n(|
jsl|
jdd,j	d	|��n|
j�nd-j	|||�}g}|
j|
_|	dkr�|
jr�i|
_|
_|jtd.d/d0|��q�n�|	dkr�|
js|dkrt}qntd|d|�} |
j| d1t�|
jrm|jtd.d2d0|d3|
j��n)|jtd.d4d0|d5d3|
j��|
j|
_n|js�|
j|d6d7d8|�n|
j�dS(9Ntschemattypetstrtrequiredtsitettemplatetvrftregiontcidrtaliasestiptprimarytbooltstatetdefaulttpresenttchoicestabsenttqueryt
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_idtvrfstvrfRefs5Provided vrf '{0}' does not exist. Existing vrfs: {1}tregionstnames;Provided region '{0}' does not exist. Existing regions: {1}tcidrss)/sites/{0}/vrfs/{1}/regions/{2}/cidrs/{3}sCIDR IP '{cidr}' not founds%/sites/{0}/vrfs/{1}/regions/{2}/cidrstoptremovetpathtcollatetreplacetvaluetadds/-tmethodtPATCHtdata(RtupdatetdicttTrueR	tparamsR
tget_objt	fail_jsontformattlookup_sitetjointindextvrf_reftNonetexistingt	exit_jsontprevioustsenttappendtFalsetsanitizetproposedt
check_modetrequest(!RtmoduleRRRRRRRRtmsot
schema_objtschema_pathR)tsite_idtsR&tsite_idxt
site_templateRCtvR*tvrf_idxtrR,t
region_idxtcR.tcidr_idxt	cidr_patht
cidrs_pathtopstpayload((s_/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_site_vrf_region_cidr.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
RRat__name__(((s_/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_site_vrf_region_cidr.pyt<module>s


<;	t

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