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.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZmZmZmZd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bysz
---
module: mso_schema_template_anp_epg
short_description: Manage Endpoint Groups (EPGs) in schema templates
description:
- Manage EPGs 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.
    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
    aliases: [ name ]
  display_name:
    description:
    - The name as displayed on the MSO web interface.
    type: str
#  contracts:
#    description:
#    - A list of contracts associated to this ANP.
#    type: list
  bd:
    description:
    - The BD associated to this ANP.
    type: dict
    suboptions:
      name:
        description:
        - The name of the BD to associate with.
        required: true
        type: str
      schema:
        description:
        - The schema that defines the referenced BD.
        - If this parameter is unspecified, it defaults to the current schema.
        type: str
      template:
        description:
        - The template that defines the referenced BD.
        type: str
  vrf:
    version_added: '2.9'
    description:
    - The VRF associated to this ANP.
    type: dict
    suboptions:
      name:
        description:
        - The name of the VRF to associate with.
        required: true
        type: str
      schema:
        description:
        - The schema that defines the referenced VRF.
        - If this parameter is unspecified, it defaults to the current schema.
        type: str
      template:
        description:
        - The template that defines the referenced VRF.
        type: str
  subnets:
    description:
    - The subnets associated to this ANP.
    type: list
    suboptions:
      ip:
        description:
        - The IP range in CIDR notation.
        type: str
        required: true
      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
  useg_epg:
    description:
    - Whether this is a USEG EPG.
    type: bool
#  useg_epg_attributes:
#    description:
#    - A dictionary consisting of USEG attributes.
#    type: dict
  intra_epg_isolation:
    description:
    - Whether intra EPG isolation is enforced.
    - When not specified, this parameter defaults to C(unenforced).
    type: str
    choices: [ enforced, unenforced ]
  intersite_multicaste_source:
    description:
    - Whether intersite multicast source is enabled.
    - When not specified, this parameter defaults to C(no).
    type: bool
  preferred_group:
    description:
    - Whether this EPG is added to preferred group or not.
    - When not specified, this parameter defaults to C(no).
    type: bool
    version_added: 2.9
  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
seealso:
- module: mso_schema_template_anp
- module: mso_schema_template_anp_epg_subnet
- module: mso_schema_template_bd
- module: mso_schema_template_contract_filter
extends_documentation_fragment: mso
s�
- name: Add a new EPG
  mso_schema_template_anp_epg:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema 1
    template: Template 1
    anp: ANP 1
    epg: EPG 1
    bd:
     name: bd1
    vrf:
     name: vrf1
    state: present
  delegate_to: localhost

- name: Add a new EPG with preferred group.
  mso_schema_template_anp_epg:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema 1
    template: Template 1
    anp: ANP 1
    epg: EPG 1
    state: present
    preferred_group: yes
  delegate_to: localhost

- name: Remove an EPG
  mso_schema_template_anp_epg:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema 1
    template: Template 1
    anp: ANP 1
    epg: EPG 1
    bd:
     name: bd1
    vrf:
     name: vrf1
    state: absent
  delegate_to: localhost

- name: Query a specific EPG
  mso_schema_template_anp_epg:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema 1
    template: Template 1
    anp: ANP 1
    epg: EPG 1
    bd:
     name: bd1
    vrf:
     name: vrf1
    state: query
  delegate_to: localhost
  register: query_result

- name: Query all EPGs
  mso_schema_template_anp_epg:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema 1
    template: Template 1
    anp: ANP 1
    epg: EPG 1
    bd:
     name: bd1
    vrf:
     name: vrf1
    state: query
  delegate_to: localhost
  register: query_result
t
(t
AnsibleModule(t	MSOModuletmso_argument_spectmso_reference_spectmso_subnet_spectissubsetc"!C`st�}|jdtdddt�dtdddt�dtdddt�dtdddd	g�d
tdddt��d
tdddt��dtdd�dtdd�dtdddddg�dtdd�dtdddt��dtddddddddg�dtdd��
td|dtd dddggdddggg�}|jd}|jd}|jd}|jd}|jd}|jd
}|jd
}|jd}	|jd}
|jd}|jd}|jd}
|jd}t|�}|j	d!d"|�}|rC|d#}n|j
d$d%j|��d&j|�}g|d'D]}|d	^qv}||kr�|j
d$d(j|d)j|���n|j
|�}g|d'|d*D]}|d	^q�}||kr,|j
d$d+j|d)j|���n|j
|�}g|d'|d*|d,D]}|d	^qV}|dk	r�||kr�|j
|�}|d'|d*|d,||_n|
dkr$|dkr�|d'|d*|d,|_n(|js|j
d$d-jd|��n|j�nd.j||�}d/j|||�}g}|j|_|
dkr�|jr�i|_|_|jtd0d1d2|��q�n+|
dkr�|j|d
||�}|j|d
||�} |j|�}|dkr|jr|}ntd	|d"|d3|	d4|
d5|d6gd|d7|d8|d9| �
}!|j|!d:t�|jr�|jtd0d;d2|d<|j��n)|jtd0d=d2|d>d<|j��|j|_n|js�|j|d?d@dA|�n|j�dS(BNtschemattypetstrtrequiredttemplatetanptepgtaliasestnametbdtdicttoptionstvrftdisplay_nametuseg_epgtbooltintra_epg_isolationtchoicestenforcedt
unenforcedtintersite_multicaste_sourcetsubnetstlisttstatetdefaulttpresenttabsenttquerytpreferred_groupt
argument_spectsupports_check_modetrequired_iftschemastdisplayNametidtmsgs$Provided schema '{0}' does not existsschemas/{id}t	templatess?Provided template '{0}' does not exist. Existing templates: {1}s, tanpss5Provided anp '{0}' does not exist. Existing anps: {1}tepgssEPG '{epg}' not founds/templates/{0}/anps/{1}/epgss /templates/{0}/anps/{1}/epgs/{2}toptremovetpathtuSegEpgtintraEpgtproxyArptcontractRelationshipstbdReftpreferredGrouptvrfReftcollatetreplacetvaluetadds/-tmethodtPATCHtdata(RtupdateRtTrueRR
R	tparamsR
tget_objt	fail_jsontformattjointindextNonetexistingt	exit_jsontprevioustsenttappendtmake_referencetmake_subnetstsanitizetproposedt
check_modetrequest("R,tmoduleRRRRRRRRRR#R$R&R+tmsot
schema_objt	schema_idtschema_pathttR3ttemplate_idxtaR4tanp_idxteR5tepg_idxt	epgs_pathtepg_pathtopstbd_reftvrf_reftpayload((s[/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_template_anp_epg.pytmain�s�		$













!()(1$ 	
	"			()	t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicR	t$ansible.module_utils.network.aci.msoR
RRR
RRlt__name__(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_template_anp_epg.pyt<module>s


�Q(	}

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