%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@sJdZddlmZmZmZdded�Zdddd�ZdS(u
Infoblox host record managment.

functions accept api_opts:

    api_verifyssl: verify SSL [default to True or pillar value]
    api_url: server to connect to [default to pillar value]
    api_username:  [default to pillar value]
    api_password:  [default to pillar value]
i(tabsolute_importtprint_functiontunicode_literalscK@s�i|d6td6dd6id6}|d$kr7i}nd|krZ|ji|d6�ntdd||�}|d$kr�tdd|d|�}|r�t|d<dj||d�|d<|Sn|r�|s�t|d<d	|d<|Std
d||�}td||�}|s2t|d<d|d<|S|r�i|d
6|d<tdrkd$|d<d|d<|Sg}d|kr�x5|dD]&}d|kr�|j|d�q�q�Wnd|kr�x5|dD]&}d|kr�|j|d�q�q�Wnd|kr�x�|dD]�}d|kr|d}	|	jd�r�d}
x8|D]0}td||	�rH||d<|
d7}
qHqHW|
dkr�dj|�|d<t|d<|Sq�qqWntd|dd||�}t|d<d|d<|Sntdrd$|d<dj|�|d<|Stdd||�}
tdd||�}t|d<d|d<id d!6i|
d6|d"6d#6|d<|S(%u
    This will ensure that a host with the provided name exists.
    This will try to ensure that the state of the host matches the given data
    If the host is not found then one will be created.

    When trying to update a hostname ensure `name` is set to the hostname
    of the current record. You can give a new name in the `data.name`.

    Avoid race conditions, use func:nextavailableip:
        - func:nextavailableip:network/ZG54dfgsrDFEFfsfsLzA:10.0.0.0/8/default
        - func:nextavailableip:10.0.0.0/8
        - func:nextavailableip:10.0.0.0/8,externalconfigure_for_dns
        - func:nextavailableip:10.0.0.3-10.0.0.10

    State Example:

    .. code-block:: yaml

        # this would update `original_hostname.example.ca` to changed `data`.
        infoblox_host_record.present:
            - name: original_hostname.example.ca
            - data: {'namhostname.example.cae': 'hostname.example.ca',
                'aliases': ['hostname.math.example.ca'],
                'extattrs': [{'Business Contact': {'value': 'EXAMPLE@example.ca'}}],
                'ipv4addrs': [{'configure_for_dhcp': True,
                    'ipv4addr': 'func:nextavailableip:129.97.139.0/24',
                    'mac': '00:50:56:84:6e:ae'}],
                'ipv6addrs': [], }
    unameuresultuucommentuchangesuinfoblox.get_hosttnameu>please update the name: {0} to equal the updated data name {1}uFinfoblox record already created (supplied fields not ensured to match)uinfoblox.get_host_advanceduinfoblox.diff_objectsuHsupplied fields already updated (note: removing fields might not update)udiffutestu'would attempt to update infoblox recordu	ipv4addrsuipv4addru	ipv6addrsuipv6addrufunc:nextavailableip:iu"infoblox.is_ipaddr_in_ipfunc_rangeiuXinfoblox record cant updated because ipaddress {0} matches multiple func:nextavailableipuinfoblox.update_objectu_reftdatauGinfoblox record fields updated (note: removing fields might not update)u+would attempt to create infoblox record {0}uinfoblox.create_hostuinfoblox record createduNoneuoldudataunewN(	tFalsetNonetupdatet__salt__tformattTruet__opts__tappendt
startswith(RRtensure_datatapi_optstrettobjtdifft	obj_addrstaddrtaddrobjt
found_matchestiptnew_objtnew_obj_ref((sD/usr/lib/python2.7/site-packages/salt/states/infoblox_host_record.pytpresents�"	

















&cK@s�i|d6td6dd6id6}tdd|d|d	||�}|sbt|d<d
|d<|Stdr�d|d<i|d6d
d6|d<|Stdd|d	||�r�t|d<i|d6d
d6|d<n|S(u�
    Ensure the host with the given Name ipv4addr or mac is removed.

    State example:

    .. code-block:: yaml

        infoblox_host_record.absent:
            - name: hostname.of.record.to.remove

        infoblox_host_record.absent:
            - name:
            - ipv4addr: 192.168.0.1

        infoblox_host_record.absent:
            - name:
            - mac: 12:02:12:31:23:43
    unameuresultuucommentuchangesuinfoblox.get_hostRtipv4addrtmacuinfoblox already removedutestuolduabsentunewuinfoblox.delete_hostN(RRR
RR(RRRRRR((sD/usr/lib/python2.7/site-packages/salt/states/infoblox_host_record.pytabsent�s""




N(	t__doc__t
__future__RRRRR
RR(((sD/usr/lib/python2.7/site-packages/salt/states/infoblox_host_record.pyt<module>sr

Zerion Mini Shell 1.0