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_subnet.pyo

�
�Udac	@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZed
ddddddd�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys
---
module: aci_bd_subnet
short_description: Manage Subnets (fv:Subnet)
description:
- Manage Subnets on Cisco ACI fabrics.
version_added: '2.4'
options:
  bd:
    description:
    - The name of the Bridge Domain.
    type: str
    aliases: [ bd_name ]
  description:
    description:
    - The description for the Subnet.
    type: str
    aliases: [ descr ]
  enable_vip:
    description:
    - Determines if the Subnet should be treated as a VIP; used when the BD is extended to multiple sites.
    - The APIC defaults to C(no) when unset during creation.
    type: bool
  gateway:
    description:
    - The IPv4 or IPv6 gateway address for the Subnet.
    type: str
    aliases: [ gateway_ip ]
  mask:
    description:
    - The subnet mask for the Subnet.
    - This is the number associated with CIDR notation.
    - For IPv4 addresses, accepted values range between C(0) and C(32).
    - For IPv6 addresses, accepted Values range between C(0) and C(128).
    type: int
    aliases: [ subnet_mask ]
  nd_prefix_policy:
    description:
    - The IPv6 Neighbor Discovery Prefix Policy to associate with the Subnet.
    type: str
  preferred:
    description:
    - Determines if the Subnet is preferred over all available Subnets. Only one Subnet per Address Family (IPv4/IPv6).
      can be preferred in the Bridge Domain.
    - The APIC defaults to C(no) when unset during creation.
    type: bool
  route_profile:
    description:
    - The Route Profile to the associate with the Subnet.
    type: str
  route_profile_l3_out:
    description:
    - The L3 Out that contains the associated Route Profile.
    type: str
  scope:
    description:
    - Determines the scope of the Subnet.
    - The C(private) option only allows communication with hosts in the same VRF.
    - The C(public) option allows the Subnet to be advertised outside of the ACI Fabric, and allows communication with
      hosts in other VRFs.
    - The shared option limits communication to hosts in either the same VRF or the shared VRF.
    - The value is a list of options, C(private) and C(public) are mutually exclusive, but both can be used with C(shared).
    - The APIC defaults to C(private) when unset during creation.
    type: list
    choices:
      - private
      - public
      - shared
  subnet_control:
    description:
    - Determines the Subnet's Control State.
    - The C(querier_ip) option is used to treat the gateway_ip as an IGMP querier source IP.
    - The C(nd_ra) option is used to treat the gateway_ip address as a Neighbor Discovery Router Advertisement Prefix.
    - The C(no_gw) option is used to remove default gateway functionality from the gateway address.
    - The APIC defaults to C(nd_ra) when unset during creation.
    type: str
    choices: [ nd_ra, no_gw, querier_ip, unspecified ]
  subnet_name:
    description:
    - The name of the Subnet.
    type: str
    aliases: [ name ]
  tenant:
    description:
    - The name of the Tenant.
    type: str
    aliases: [ tenant_name ]
  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(gateway) parameter is the root key used to access the Subnet (not name), so the C(gateway)
  is required when the state is C(absent) or C(present).
- The C(tenant) and C(bd) used must exist before using this module in your playbook.
  The M(aci_tenant) module and M(aci_bd) can be used for these.
seealso:
- module: aci_bd
- module: aci_tenant
- name: APIC Management Information Model reference
  description: More information about the internal APIC class B(fv:Subnet).
  link: https://developer.cisco.com/docs/apic-mim-ref/
author:
- Jacob McGill (@jmcgill298)
s~
- name: Create a tenant
  aci_tenant:
    host: apic
    username: admin
    password: SomeSecretPassword
    tenant: production
    state: present
  delegate_to: localhost

- name: Create a bridge domain
  aci_bd:
    host: apic
    username: admin
    password: SomeSecretPassword
    tenant: production
    bd: database
    state: present
  delegate_to: localhost

- name: Create a subnet
  aci_bd_subnet:
    host: apic
    username: admin
    password: SomeSecretPassword
    tenant: production
    bd: database
    gateway: 10.1.1.1
    mask: 24
    state: present
  delegate_to: localhost

- name: Create a subnet with options
  aci_bd_subnet:
    host: apic
    username: admin
    password: SomeSecretPassword
    tenant: production
    bd: database
    subnet_name: sql
    gateway: 10.1.2.1
    mask: 23
    description: SQL Servers
    scope: public
    route_profile_l3_out: corp
    route_profile: corp_route_profile
    state: present
  delegate_to: localhost

- name: Update a subnets scope to private and shared
  aci_bd_subnet:
    host: apic
    username: admin
    password: SomeSecretPassword
    tenant: production
    bd: database
    gateway: 10.1.1.1
    mask: 24
    scope: [private, shared]
    state: present
  delegate_to: localhost

- name: Get all subnets
  aci_bd_subnet:
    host: apic
    username: admin
    password: SomeSecretPassword
    state: query
  delegate_to: localhost

- name: Get all subnets of specific gateway in specified tenant
  aci_bd_subnet:
    host: apic
    username: admin
    password: SomeSecretPassword
    tenant: production
    gateway: 10.1.1.1
    mask: 24
    state: query
  delegate_to: localhost
  register: query_result

- name: Get specific subnet
  aci_bd_subnet:
    host: apic
    username: admin
    password: SomeSecretPassword
    tenant: production
    bd: database
    gateway: 10.1.1.1
    mask: 24
    state: query
  delegate_to: localhost
  register: query_result

- name: Delete a subnet
  aci_bd_subnet:
    host: apic
    username: admin
    password: SomeSecretPassword
    tenant: production
    bd: database
    gateway: 10.1.1.1
    mask: 24
    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_spectnd_ratndtno_gwsno-default-gatewayt
querier_iptqueriertunspecifiedtc#C`s�t�}|jdtddddg�dtddddg�dtdd	�d
tddddg�dtdd
ddg�dtddddg�dtdd�dtdd	�dtdd�dtdd�dtddddddg�dtdddddddg�d tddd!d"dd#d"d$g�d%tdddd&g��td'|d(td)d
dggd*d d"dd
dd%ggd d#dd
dd%ggg�}t|�}|jd}|j|jd�}|jd%}|jd}|jd
}|jd}|dk	rB|t	d+d,�krB|j
d-d.�n|dk	rid/j|t|��}n|jd}	|jd}
|j|jd�}|jd}|jd}
|jd}|dk	rd|kr�d|kr�|j
d-d0|�qd1j
t|��}n|jd }|jd}|r@t|}n|jd2td3d4d5d6j|�d7|d8i|d6�d9td3d:d5d;j|�d7|d8i|d6�d<td3d=d5d>j|�d7|d8i|d?6�d@dAdBg�|j�|d"kr�|jd3d=dCtdD|d|d?|d|	d|d|dE|�dFiii|
dG6|dH6dI6dA6iii|
dJ6dI6dB6g�|jd3d=�|j�n|d#kr�|j�n|j�dS(KNtbdttypetstrtaliasestbd_nametdescriptiontdescrt
enable_viptbooltgatewayt
gateway_iptmasktinttsubnet_masktsubnet_nametnametnd_prefix_policyt	preferredt
route_profiletroute_profile_l3_outtscopetlisttchoicestprivatetpublictsharedtsubnet_controlRR
RRtstatetdefaulttpresenttabsenttqueryttenantttenant_namet
argument_spectsupports_check_modetrequired_togethertrequired_ifii�tmsgsQValid Subnet Masks are 0 to 32 for IPv4 Addresses and 0 to 128 for IPv6 addressess{0}/{1}s@Parameter 'scope' cannot be both 'private' and 'public', got: %st,t
root_classt	aci_classtfvTenanttaci_rnstn-{0}t
module_objectt
target_filtert
subclass_1tfvBDsBD-{0}t
subclass_2tfvSubnetssubnet-[{0}]tipt
child_classestfvRsBDSubnetToProfiletfvRsNdPfxPoltclass_configtctrltvirtualt
child_configsttnL3extOutNamettnRtctrlProfileNamet
attributesttnNdPfxPolName(R
tupdatetdictRtTrueR	tparamstbooleantNonetranget	fail_jsontformatRtjointsortedtSUBNET_CONTROL_MAPPINGt
construct_urltget_existingtpayloadtget_difftpost_configt
delete_configt	exit_json(R4tmoduletaciRRR2RRRR R"R#R$R%R&R-R,((sM/usr/lib/python2.7/site-packages/ansible/modules/network/aci/aci_bd_subnet.pytmain[s�		!$!




!







	

		

t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt$ansible.module_utils.network.aci.aciR	R
RQR[Ret__name__(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/aci/aci_bd_subnet.pyt<module>s"


nli		n

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