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_template_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_template_anp_epg_subnet
short_description: Manage EPG subnets in schema templates
description:
- Manage EPG subnets in schema templates 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
  template:
    description:
    - The name of the template to change.
    type: str
    required: yes
  anp:
    description:
    - The name of the ANP.
    type: str
    required: yes
  epg:
    description:
    - The name of the EPG to manage.
    type: str
    required: yes
  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:
- Due to restrictions of the MSO REST API concurrent modifications to EPG subnets can be dangerous and corrupt data.
extends_documentation_fragment: mso
s�
- name: Add a new subnet to an EPG
  mso_schema_template_anp_epg_subnet:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema 1
    template: Template 1
    anp: ANP 1
    epg: EPG 1
    subnet: 10.0.0.0/24
    state: present
  delegate_to: localhost

- name: Remove a subnet from an EPG
  mso_schema_template_anp_epg_subnet:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema 1
    template: Template 1
    anp: ANP 1
    epg: EPG 1
    subnet: 10.0.0.0/24
    state: absent
  delegate_to: localhost

- name: Query a specific EPG subnet
  mso_schema_template_anp_epg_subnet:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema 1
    template: Template 1
    anp: ANP 1
    epg: EPG 1
    subnet: 10.0.0.0/24
    state: query
  delegate_to: localhost
  register: query_result

- name: Query all EPGs subnets
  mso_schema_template_anp_epg_subnet:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema 1
    template: Template 1
    anp: ANP 1
    state: query
  delegate_to: localhost
  register: query_result
t
(t
AnsibleModule(t	MSOModuletmso_argument_spectmso_reference_spectmso_subnet_speccC`s�t�}|jdtdddt�dtdddt�dtdddt�dtdddt�dtddd	d
ddd
d
g��|jt��td|dtddddggdd
dggg�}|jd}|jd}|jd}|jd}|jd}|jd}|jd}|jd}	|jd}
|jd}t|�}|jdd|�}
|
s�|j	ddj
|��ndj
|
�}g|
dD]}|d^q�}||kr|j	ddj
d|ddj|���n|j|�}g|
d|dD]}|d^q%}||kru|j	dd j
d|ddj|���n|j|�}g|
d|d|d!D]}|d^q�}||kr�|j	dd"j
d|d!dj|���n|j|�}g|
d|d|d!|d#D]}|d$^q!}||kr�|j|�}d%j
||||�}|
d|d|d!|d#||_
n|d
kr|dkr�|
d|d|d!|d#|_
n(|j
s�|j	dd&j
d|��n|j�nd'j
|||�}g}|j
|_|dkrr|j
r�i|_
|jtd(d)d*|��q�n|d
kr�|j
s�|dkr�|}n|dkr�d+}n|	dkr�t}	n|
dkr�t}
q�ntd$|d|d|d|	d,|
�}|j|d-t�|j
rI|jtd(d.d*|d/|j��n)|jtd(d0d*|d1d/|j��|j|_
n|js�|j|d2d3d4|�n|j�dS(5Ntschemattypetstrtrequiredttemplatetanptepgtstatetdefaulttpresenttchoicestabsenttqueryt
argument_spectsupports_check_modetrequired_iftsubnettdescriptiontscopetsharedtno_default_gatewaytschemastdisplayNametmsgs$Provided schema '{0}' does not existsschemas/{id}t	templatestnamesNProvided template '{template}' does not exist. Existing templates: {templates}s, tanpss:Provided anp '{anp}' does not exist. Existing anps: {anps}tepgss:Provided epg '{epg}' does not exist. Existing epgs: {epgs}tsubnetstips,/templates/{0}/anps/{1}/epgs/{2}/subnets/{3}sSubnet '{subnet}' not founds(/templates/{0}/anps/{1}/epgs/{2}/subnetstoptremovetpathtprivatetnoDefaultGatewaytcollatetreplacetvaluetadds/-tmethodtPATCHtdata(RtupdatetdicttTrueR
R	tparamsR
tget_objt	fail_jsontformattjointindextexistingtNonet	exit_jsontprevioustappendtFalsetsanitizetsenttproposedt
check_modetrequest(RtmoduleRRRRRRR R!R"Rtmsot
schema_objtschema_pathttR&ttemplate_idxtaR(tanp_idxteR)tepg_idxtsR*t
subnet_idxtsubnet_pathtsubnets_pathtopstpayload((sb/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_template_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
R\t__name__(((sb/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_template_anp_epg_subnet.pyt<module>s


A6"	u

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