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

�
�Udac	@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZid
d6dd6d
d
6dd6dd6dd6dd6Zedddddddd�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys�
---
module: aci_static_binding_to_epg
short_description: Bind static paths to EPGs (fv:RsPathAtt)
description:
- Bind static paths to EPGs on Cisco ACI fabrics.
version_added: '2.5'
options:
  tenant:
    description:
    - Name of an existing tenant.
    type: str
    aliases: [ tenant_name ]
  ap:
    description:
    - Name of an existing application network profile, that will contain the EPGs.
    type: str
    aliases: [ app_profile, app_profile_name ]
  epg:
    description:
    - The name of the end point group.
    type: str
    aliases: [ epg_name ]
  description:
    description:
    - Description for the static path to EPG binding.
    type: str
    aliases: [ descr ]
    version_added: '2.7'
  encap_id:
    description:
    - The encapsulation ID associating the C(epg) with the interface path.
    - This acts as the secondary C(encap_id) when using micro-segmentation.
    - Accepted values are any valid encap ID for specified encap, currently ranges between C(1) and C(4096).
    type: int
    aliases: [ vlan, vlan_id ]
  primary_encap_id:
    description:
    - Determines the primary encapsulation ID associating the C(epg)
      with the interface path when using micro-segmentation.
    - Accepted values are any valid encap ID for specified encap, currently ranges between C(1) and C(4096).
    type: int
    aliases: [ primary_vlan, primary_vlan_id ]
  deploy_immediacy:
    description:
    - The Deployment Immediacy of Static EPG on PC, VPC or Interface.
    - The APIC defaults to C(lazy) when unset during creation.
    type: str
    choices: [ immediate, lazy ]
  interface_mode:
    description:
    - Determines how layer 2 tags will be read from and added to frames.
    - Values C(802.1p) and C(native) are identical.
    - Values C(access) and C(untagged) are identical.
    - Values C(regular), C(tagged) and C(trunk) are identical.
    - The APIC defaults to C(trunk) when unset during creation.
    type: str
    choices: [ 802.1p, access, native, regular, tagged, trunk, untagged ]
    aliases: [ interface_mode_name, mode ]
  interface_type:
    description:
    - The type of interface for the static EPG deployment.
    type: str
    choices: [ fex, port_channel, switch_port, vpc ]
    default: switch_port
  pod_id:
    description:
    - The pod number part of the tDn.
    - C(pod_id) is usually an integer below C(10).
    type: int
    aliases: [ pod, pod_number ]
  leafs:
    description:
    - The switch ID(s) that the C(interface) belongs to.
    - When C(interface_type) is C(switch_port), C(port_channel), or C(fex), then C(leafs) is a string of the leaf ID.
    - When C(interface_type) is C(vpc), then C(leafs) is a list with both leaf IDs.
    - The C(leafs) value is usually something like '101' or '101-102' depending on C(connection_type).
    type: list
    aliases: [ leaves, nodes, paths, switches ]
  interface:
    description:
    - The C(interface) string value part of the tDn.
    - Usually a policy group like C(test-IntPolGrp) or an interface of the following format C(1/7) depending on C(interface_type).
    type: str
  extpaths:
    description:
    - The C(extpaths) integer value part of the tDn.
    - C(extpaths) is only used if C(interface_type) is C(fex).
    - Usually something like C(1011).
    type: int
  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
extends_documentation_fragment: aci
notes:
- The C(tenant), C(ap), C(epg) used must exist before using this module in your playbook.
  The M(aci_tenant), M(aci_ap), M(aci_epg) modules can be used for this.
seealso:
- module: aci_tenant
- module: aci_ap
- module: aci_epg
- name: APIC Management Information Model reference
  description: More information about the internal APIC class B(fv:RsPathAtt).
  link: https://developer.cisco.com/docs/apic-mim-ref/
author:
- Bruno Calogero (@brunocalogero)
s�
- name: Deploy Static Path binding for given EPG
  aci_static_binding_to_epg:
    host: apic
    username: admin
    password: SomeSecretPassword
    tenant: accessport-code-cert
    ap: accessport_code_app
    epg: accessport_epg1
    encap_id: 222
    deploy_immediacy: lazy
    interface_mode: untagged
    interface_type: switch_port
    pod_id: 1
    leafs: 101
    interface: '1/7'
    state: present
  delegate_to: localhost

- name: Remove Static Path binding for given EPG
  aci_static_binding_to_epg:
    host: apic
    username: admin
    password: SomeSecretPassword
    tenant: accessport-code-cert
    ap: accessport_code_app
    epg: accessport_epg1
    interface_type: switch_port
    pod: 1
    leafs: 101
    interface: '1/7'
    state: absent
  delegate_to: localhost

- name: Get specific Static Path binding for given EPG
  aci_static_binding_to_epg:
    host: apic
    username: admin
    password: SomeSecretPassword
    tenant: accessport-code-cert
    ap: accessport_code_app
    epg: accessport_epg1
    interface_type: switch_port
    pod: 1
    leafs: 101
    interface: '1/7'
    state: query
  delegate_to: localhost
  register: query_result
s�

current:
  description: The existing configuration from the APIC after the module has finished
  returned: success
  type: list
  sample:
    [
        {
            "fvTenant": {
                "attributes": {
                    "descr": "Production environment",
                    "dn": "uni/tn-production",
                    "name": "production",
                    "nameAlias": "",
                    "ownerKey": "",
                    "ownerTag": ""
                }
            }
        }
    ]
error:
  description: The error information as returned from the APIC
  returned: failure
  type: dict
  sample:
    {
        "code": "122",
        "text": "unknown managed object class foo"
    }
raw:
  description: The raw output returned by the APIC REST API (xml or json)
  returned: parse error
  type: str
  sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
sent:
  description: The actual/minimal configuration pushed to the APIC
  returned: info
  type: list
  sample:
    {
        "fvTenant": {
            "attributes": {
                "descr": "Production environment"
            }
        }
    }
previous:
  description: The original configuration from the APIC before the module has started
  returned: info
  type: list
  sample:
    [
        {
            "fvTenant": {
                "attributes": {
                    "descr": "Production",
                    "dn": "uni/tn-production",
                    "name": "production",
                    "nameAlias": "",
                    "ownerKey": "",
                    "ownerTag": ""
                }
            }
        }
    ]
proposed:
  description: The assembled configuration from the user-provided parameters
  returned: info
  type: dict
  sample:
    {
        "fvTenant": {
            "attributes": {
                "descr": "Production environment",
                "name": "production"
            }
        }
    }
filter_string:
  description: The filter string used for the request
  returned: failure or debug
  type: str
  sample: ?rsp-prop-include=config-only
method:
  description: The HTTP method used for the request to the APIC
  returned: failure or debug
  type: str
  sample: POST
response:
  description: The HTTP response from the APIC
  returned: failure or debug
  type: str
  sample: OK (30 bytes)
status:
  description: The HTTP status from the APIC
  returned: failure or debug
  type: int
  sample: 200
url:
  description: The HTTP url used for the request to the APIC
  returned: failure or debug
  type: str
  sample: https://10.11.12.13/api/mo/uni/tn-production.json
(t
AnsibleModule(t	ACIModuletaci_argument_spectnatives802.1ptuntaggedtaccesstregularttaggedttrunktfexsOtopology/pod-{pod_id}/paths-{leafs}/extpaths-{extpaths}/pathep-[eth{interface}]tport_channels8topology/pod-{pod_id}/paths-{leafs}/pathep-[{interface}]tswitch_ports;topology/pod-{pod_id}/paths-{leafs}/pathep-[eth{interface}]tvpcs<topology/pod-{pod_id}/protpaths-{leafs}/pathep-[{interface}]c%C`s$t�}|jdtddddg�dtdddddg�d	tdddd
g�dtddddg�d
tdddddg�dtdddddg�dtdddddg�dtddddddddddgdd d!g�d"tddd#d$dd%d&d$d'g�d(tdddd)d*g�d+tdd,dd-d.d/d0g�d1tdd�d2tdd�d3tddd#d4dd5d4d6g��td7|d8td9d"d%d2ggd3d5dd	d1d+d(dggd3d4dd
d	d1d+d(dggg�}|jd}|jd}|jd	}|jd}|jd
}|jd}|jd}|jd}	|jd"}
|jd(}|jd+}|dk	rtg}x1|jd+D]"}
|jt|
�j	d:��q�Wt
|�d;kr|
d'kr|jd<d=�n|d>}qtt
|�d?kra|
d'krO|jd<d@�nd:j|�}qt|jd<dA�n|jd1}|jd2}|jd3}|dk	r�|t
d;dB�kr�|jd<dC�ndDj|�}n|dk	r'|t
d;dB�kr|jd<dC�ndDj|�}nt|
jd(|d+|d2|d1|�}i}|dk	r�|dk	r�|dk	r�|
d%ks�|dk	r�i|dE6}n|	dk	r�t|	}	nt|�}|jdFtdGdHdIdJj|�dK|dLi|dM6�dNtdGdOdIdPj|�dK|dLi|dM6�dQtdGdRdIdSj|�dK|dLi|dM6�dTtdGdUdIdVj|�dK|dL|��|j�|d4kr�|jdGdUdWtd|dX|dY|dZ|d!|	dE|��|jdGdU�|j�n|d5kr|j�n|j�dS([Nttenantttypetstrtaliasesttenant_nametaptapp_profiletapp_profile_nametepgtepg_nametdescriptiontdescrtencap_idtinttvlantvlan_idtprimary_encap_idtprimary_vlantprimary_vlan_idtdeploy_immediacytchoicest	immediatetlazytinterface_modes802.1pR
RRRRRtinterface_mode_nametmodetinterface_typetdefaultRRRRtpod_idtpodt
pod_numbertleafstlisttleavestnodestpathstswitchest	interfacetextpathststatetpresenttabsenttqueryt
argument_spectsupports_check_modetrequired_ift-itmsgs*A interface_type of "vpc" requires 2 leafsiis�The interface_types "switch_port", "port_channel", and "fex"                     do not support using multiple leafs for a single bindings7The "leafs" parameter must not have more than 2 entriesis(Valid VLAN assigments are from 1 to 4096svlan-{0}ttDnt
root_classt	aci_classtfvTenanttaci_rnstn-{0}t
module_objectt
target_filtertnamet
subclass_1tfvApsap-{0}t
subclass_2tfvAEPgsepg-{0}t
subclass_3tfvRsPathAttsrspathAtt-[{0}]tclass_configtencaptprimaryEncaptinstrImedcy(R
tupdatetdictRtTruetparamstNonetextendRtsplittlent	fail_jsontjointrangetformattINTERFACE_TYPE_MAPPINGtINTERFACE_MODE_MAPPINGR	t
construct_urltget_existingtpayloadtget_difftpost_configt
delete_configt	exit_json(R@tmoduleRRRRR!R%R(R,R/R1R4tleafR:R;R<tstatic_pathtpath_target_filtertaci((sY/usr/lib/python2.7/site-packages/ansible/modules/network/aci/aci_static_binding_to_epg.pytmain1s�		''!%*










 
	



(<
	

	


t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt$ansible.module_utils.network.aci.aciR	R
RdRXRcRqt__name__(((sY/usr/lib/python2.7/site-packages/ansible/modules/network/aci/aci_static_binding_to_epg.pyt<module>s2


p3i
		�

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