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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys�
---
module: aci_bd
short_description: Manage Bridge Domains (BD) objects (fv:BD)
description:
- Manages Bridge Domains (BD) on Cisco ACI fabrics.
version_added: '2.4'
options:
  arp_flooding:
    description:
    - Determines if the Bridge Domain should flood ARP traffic.
    - The APIC defaults to C(no) when unset during creation.
    type: bool
  bd:
    description:
    - The name of the Bridge Domain.
    type: str
    aliases: [ bd_name, name ]
  bd_type:
    description:
    - The type of traffic on the Bridge Domain.
    - The APIC defaults to C(ethernet) when unset during creation.
    type: str
    choices: [ ethernet, fc ]
  description:
    description:
    - Description for the Bridge Domain.
    type: str
  enable_multicast:
    description:
    - Determines if PIM is enabled.
    - The APIC defaults to C(no) when unset during creation.
    type: bool
  enable_routing:
    description:
    - Determines if IP forwarding should be allowed.
    - The APIC defaults to C(yes) when unset during creation.
    type: bool
  endpoint_clear:
    description:
    - Clears all End Points in all Leaves when C(yes).
    - The value is not reset to disabled once End Points have been cleared; that requires a second task.
    - The APIC defaults to C(no) when unset during creation.
    type: bool
  endpoint_move_detect:
    description:
    - Determines if GARP should be enabled to detect when End Points move.
    - The APIC defaults to C(garp) when unset during creation.
    type: str
    choices: [ default, garp ]
  endpoint_retention_action:
    description:
    - Determines if the Bridge Domain should inherit or resolve the End Point Retention Policy.
    - The APIC defaults to C(resolve) when unset during creation.
    type: str
    choices: [ inherit, resolve ]
  endpoint_retention_policy:
    description:
    - The name of the End Point Retention Policy the Bridge Domain should use when
      overriding the default End Point Retention Policy.
    type: str
  igmp_snoop_policy:
    description:
    - The name of the IGMP Snooping Policy the Bridge Domain should use when
      overriding the default IGMP Snooping Policy.
    type: str
  ip_learning:
    description:
    - Determines if the Bridge Domain should learn End Point IPs.
    - The APIC defaults to C(yes) when unset during creation.
    type: bool
  ipv6_nd_policy:
    description:
    - The name of the IPv6 Neighbor Discovery Policy the Bridge Domain should use when
      overridding the default IPV6 ND Policy.
    type: str
  l2_unknown_unicast:
    description:
    - Determines what forwarding method to use for unknown l2 destinations.
    - The APIC defaults to C(proxy) when unset during creation.
    type: str
    choices: [ proxy, flood ]
  l3_unknown_multicast:
    description:
    - Determines the forwarding method to use for unknown multicast destinations.
    - The APIC defaults to C(flood) when unset during creation.
    type: str
    choices: [ flood, opt-flood ]
  limit_ip_learn:
    description:
    - Determines if the BD should limit IP learning to only subnets owned by the Bridge Domain.
    - The APIC defaults to C(yes) when unset during creation.
    type: bool
  mac_address:
    description:
    - The MAC Address to assign to the C(bd) instead of using the default.
    - The APIC defaults to C(00:22:BD:F8:19:FF) when unset during creation.
    type: str
    aliases: [ mac ]
    version_added: '2.5'
  multi_dest:
    description:
    - Determines the forwarding method for L2 multicast, broadcast, and link layer traffic.
    - The APIC defaults to C(bd-flood) when unset during creation.
    type: str
    choices: [ bd-flood, drop, encap-flood ]
  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
  tenant:
    description:
    - The name of the Tenant.
    type: str
    aliases: [ tenant_name ]
  vrf:
    description:
    - The name of the VRF.
    type: str
    aliases: [ vrf_name ]
extends_documentation_fragment: aci
notes:
- The C(tenant) used must exist before using this module in your playbook.
  The M(aci_tenant) module can be used for this.
seealso:
- module: aci_tenant
- name: APIC Management Information Model reference
  description: More information about the internal APIC class B(fv:BD).
  link: https://developer.cisco.com/docs/apic-mim-ref/
author:
- Jacob McGill (@jmcgill298)
sc
- name: Add Bridge Domain
  aci_bd:
    host: "{{ inventory_hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: no
    tenant: prod
    bd: web_servers
    mac_address: 00:22:BD:F8:19:FE
    vrf: prod_vrf
    state: present
  delegate_to: localhost

- name: Add an FC Bridge Domain
  aci_bd:
    host: "{{ inventory_hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: no
    tenant: prod
    bd: storage
    bd_type: fc
    vrf: fc_vrf
    enable_routing: no
    state: present
  delegate_to: localhost

- name: Modify a Bridge Domain
  aci_bd:
    host: "{{ inventory_hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: yes
    tenant: prod
    bd: web_servers
    arp_flooding: yes
    l2_unknown_unicast: flood
    state: present
  delegate_to: localhost

- name: Query All Bridge Domains
  aci_bd:
    host: "{{ inventory_hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: yes
    state: query
  delegate_to: localhost
  register: query_result

- name: Query a Bridge Domain
  aci_bd:
    host: "{{ inventory_hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: yes
    tenant: prod
    bd: web_servers
    state: query
  delegate_to: localhost
  register: query_result

- name: Delete a Bridge Domain
  aci_bd:
    host: "{{ inventory_hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: yes
    tenant: prod
    bd: web_servers
    state: absent
  delegate_to: localhost
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_specc5C`s�t�}|jdtdd�dtdddddg�d	tddd
ddg�d
tdd�dtdd�dtdd�dtdd�dtddd
ddg�dtddd
ddg�dtdd�dtdd�dtdd�dtdd�dtddd
ddg�dtddd
ddg�d tdd�d!tdddd"g�d#tddd
d$d%d&g�d'tdddd(d
d)d(d*g�d+tdddd,g�d-tdddd.g�d/tddd0d1�d2tddd0d1�d3tddd0d1��td4|d5td6d'd)dd+ggd'd(dd+ggg�}t|�}|j|jd�}|jd}|jd	}|dkr�d7}n|jd
}|j|jd�}|j|jd�}|j|jd�}	|jd}
|
dkrd8}
n|jd}|jd}|jd}
|j|jd�}|jd}|jd}|jd}|j|jd �}|jd!}|jd#}|jd'}|jd+}|jd-}|jd/s�|jd3s�|jd2rd9g|_n|j	d:td;d<d=d>j
|�d?|d@i|d6�dAtd;dBd=dCj
|�d?|d@i|d6�dDdEdFdGdHg�|j�|d(kr�|jd;dBdItdJ|dK|dL|	dM|
dN|dO|d"|dP|dQ|d|d|dR|dS|dT|�dUiii|dV6dW6dE6iii|
dX6dW6dF6iii|dY6dW6dG6iii|dZ6|d[6dW6dH6g�|j
d;dB�|j�n|d)kr�|j�n|j�dS(\Ntarp_floodingttypetbooltbdtstrtaliasestbd_nametnametbd_typetchoicestethernettfctdescriptiontenable_multicasttenable_routingtendpoint_cleartendpoint_move_detecttdefaulttgarptendpoint_retention_actiontinherittresolvetendpoint_retention_policytigmp_snoop_policytip_learningtipv6_nd_policytl2_unknown_unicasttproxytfloodtl3_unknown_multicasts	opt-floodtlimit_ip_learntmac_addresstmact
multi_destsbd-floodtdropsencap-floodtstatetpresenttabsenttqueryttenantttenant_nametvrftvrf_namet
gateway_iptremoved_in_versions2.4tscopetsubnet_maskt
argument_spectsupports_check_modetrequired_iftregularts�The support for managing Subnets has been moved to its own module, aci_subnet.                             The new modules still supports 'gateway_ip' and 'subnet_mask' along with more featurest
root_classt	aci_classtfvTenanttaci_rnstn-{0}t
module_objectt
target_filtert
subclass_1tfvBDsBD-{0}t
child_classestfvRsCtxt
fvRsIgmpsntfvRsBDToNdPt
fvRsBdToEpRettclass_configtarpFloodtdescrtepCleartepMoveDetectModet
ipLearningtlimitIpLearnToSubnetst
mcastAllowtmultiDstPktActtunicastRoutetunkMacUcastActtunkMcastActt
child_configsttnFvCtxNamet
attributesttnIgmpSnoopPolNamet
tnNdIfPolNamet
resolveActttnFvEpRetPolName(R
tupdatetdictRtTrueR	tbooleantparamst	_warningst
construct_urltformattget_existingtpayloadtget_difftpost_configt
delete_configt	exit_json(R:tmoduletaciRRRRRRRRRR!R"R#R$R%R(R)R*R,R.R2R4((sF/usr/lib/python2.7/site-packages/ansible/modules/network/aci/aci_bd.pytmainMs�		$

	

	










'	
		&

t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt$ansible.module_utils.network.aci.aciR	R
Rot__name__(((sF/usr/lib/python2.7/site-packages/ansible/modules/network/aci/aci_bd.pyt<module>s


�Ki	�

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