%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/states/neutron_subnet.pyo

�
���^c@@sMdZddlmZmZmZdZd�Zdd�Zdd�Z	dS(uG
Management of OpenStack Neutron Subnets
=========================================

.. versionadded:: 2018.3.0

:depends: shade
:configuration: see :py:mod:`salt.modules.neutronng` for setup instructions

Example States

.. code-block:: yaml

    create subnet:
      neutron_subnet.present:
        - name: subnet1
        - network_name_or_id: network1
        - cidr: 192.168.199.0/24


    delete subnet:
      neutron_subnet.absent:
        - name: subnet2

    create subnet with optional params:
      neutron_subnet.present:
        - name: subnet1
        - network_name_or_id: network1
        - enable_dhcp: True
        - cidr: 192.168.199.0/24
        - allocation_pools:
          - start: 192.168.199.5
            end: 192.168.199.250
        - host_routes:
          - destination: 192.168..0.0/24
            nexthop: 192.168.0.1
        - gateway_ip: 192.168.199.1
        - dns_nameservers:
          - 8.8.8.8
          - 8.8.8.7

    create ipv6 subnet:
      neutron_subnet.present:
        - name: v6subnet1
        - network_name_or_id: network1
        - ip_version: 6
i(tabsolute_importtprint_functiontunicode_literalsuneutron_subnetcC@sdtkrtStdfS(Nuneutronng.list_subnetsufThe neutronng execution module failed to load:                    shade python module is not available(t__salt__t__virtualname__tFalse(((s>/usr/lib/python2.7/site-packages/salt/states/neutron_subnet.pyt__virtual__7scK@s�i|d6id6td6dd6}td|�}td|�||d<td	d
|�}|dkr�tdr�d|d<||d<d|d<|Std
|�}||d<d|d<|Std||�}|r�tdtkrd|d<||d<d|d<|Sd|ks d|krYtdd
|�td
|�}||d<d|d<|Std|�|dj|�d|d<n|S(u>
    Ensure a subnet exists and is up-to-date

    name
        Name of the subnet

    network_name_or_id
        The unique name or ID of the attached network.
        If a non-unique name is supplied, an exception is raised.

    allocation_pools
        A list of dictionaries of the start and end addresses
        for the allocation pools

    gateway_ip
        The gateway IP address.

    dns_nameservers
        A list of DNS name servers for the subnet.

    host_routes
        A list of host route dictionaries for the subnet.

    ipv6_ra_mode
        IPv6 Router Advertisement mode.
        Valid values are: ‘dhcpv6-stateful’, ‘dhcpv6-stateless’, or ‘slaac’.

    ipv6_address_mode
        IPv6 address mode.
        Valid values are: ‘dhcpv6-stateful’, ‘dhcpv6-stateless’, or ‘slaac’.
    unameuchangesuresultuucommentuargs.clean_kwargsuneutronng.setup_cloudsusubnet_nameuneutronng.subnet_gettnameutestuSubnet will be created.uneutronng.subnet_createuCreated subnetuneutronng.compare_changesuProject will be updated.ucidru	tenant_iduneutronng.subnet_deleteuDeleted and recreated subnetuneutronng.subnet_updateuUpdated subnetN(tTruet	__utils__RtNonet__opts__tupdate(Rtauthtkwargstrettsubnett
new_subnettchanges((s>/usr/lib/python2.7/site-packages/salt/states/neutron_subnet.pytpresent>sF 














cC@s�i|d6id6td6dd6}td|�tdd|�}|r�td	tkr�d|d<i|jd
6|d<d|d<|Stdd|�||dd
<d
|d<n|S(uO
    Ensure a subnet does not exists

    name
        Name of the subnet

    unameuchangesuresultuucommentuneutronng.setup_cloudsuneutronng.subnet_getRutestuiduProject will be deleted.uneutronng.subnet_deleteuDeleted subnetN(RRRR
tid(RR
RR((s>/usr/lib/python2.7/site-packages/salt/states/neutron_subnet.pytabsent�s 




N(
t__doc__t
__future__RRRRRR
RR(((s>/usr/lib/python2.7/site-packages/salt/states/neutron_subnet.pyt<module>0s
	P

Zerion Mini Shell 1.0