%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/bigip.pyo

�
���^c'@@s�dZddlmZmZmZddlZddlmZd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zeeeeeeeeed�	Zeeeeeeeeed
�	Zd�Zd�Zeeeeeeeeeeeeeeeeeeeeeeed�Zeeeeeeeeeeeeeeeeeeeeeed�Zeeeeeeeeeeeeeeeeeeeeeed�Zd�Zd�Zd�Zeeeeeeeeeeeed�Zd�Zd�Zeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed�&Zeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed�&Zeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed�&Z d�Z!d�Z"d�Z#d�Z$d �Z%d!�Z&d"�Z'd#�Z(d$�Z)d%�Z*d&�Z+dS('u�
A state module designed to enforce load-balancing configurations for F5 Big-IP entities.
    :maturity:      develop
    :platform:      f5_bigip_11.6
i(tabsolute_importtprint_functiontunicode_literalsN(tsixcC@sdtkrdStS(uE
    Only load if the bigip exec module is available in __salt__
    ubigip.list_transactionubigip(t__salt__tFalse(((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pyt__virtual__scC@s�|ddkr!|d|d<n�|ddkr>d|d<nl|ddkrc|dd|d<nG|ddkr�t|d	<d
|d<|d|d<n|dd|d<|S(
u1
    format the results of listing functions
    ucodeucontentucommenti�u'401 Forbidden: Authentication required!i�umessagei�uresultugListing Current Configuration Only.  Not action or changes occurred during the execution of this state.uchangesN(tNonetTrue(tresponsetret((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pyt_load_results


cC@s�x�tj|�D]�\}}||kr5d||<qt|t�rTt||�qt|t�rx0|D]%}t|t�rjt||�qjqjWqqW|S(u�
    look for a certain key within a dictionary and nullify ti's contents, check within nested
    dictionaries and lists as well.  Certain attributes such as "generation" will change even
    when there were no changes made to the entity.
    N(Rt	iteritemsRt
isinstancetdictt
_strip_keytlist(t
dictionarytkeywordtkeytvaluetitem((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pyR5s

cC@s5t|d<t|t�r�t|t�r�d|dj�krL|dd=nd|dj�krp|dd=n|d|dkr�djd|�|d<q1djd|�|d<|d|dd	<|d|dd
<nW||kr�djd|�|d<n2djd|�|d<||dd	<||dd
<|S(uN
    take an existing entity and a modified entity and check for changes.
    uresultu
generationucontentuK{entity_type} is currently enforced to the desired state.  No changes made.tentity_typeucommentuy{entity_type} was enforced to the desired state.  Note: Only parameters specified were enforced. See changes for details.uchangesuoldunew(RR
Rtkeystformat(RR
texistingtmodified((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pyt_check_for_changesIs&
	
	
cC@s�|dkr|dcd7<n�|dks7|dkrJ|dcd7<n]|dkri|dcd7<n>|d	kr�|dcd
7<n|dkr�|dcd7<n|dcd
7<|dctjjj|dd�7<i|d<d|d<|S(u^
    For testing just output what the state will attempt to do without actually doing it.
    ulistucommentuCThe list action will just list an entity and will make no changes.
ucreateuadduQThe create action will attempt to create an entity if it does not already exist.
udeleteuJThe delete action will attempt to delete an existing entity if it exists.
umanageu}The manage action will create a new entity if it does not exist.  If it does exist, it will be enforcedto the desired state.
umodifyuOThe modify action will attempt to modify an existing entity only if it exists.
u<An iControl REST Request will be made using the parameters:
tindentiuchangesuresultN(tsalttutilstjsontdumpsR(R
tactiontparams((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pyt_test_outputms%

cC@s�i|d6id6td6dd6}tdr[t|ddi|d	6|d
6|d6|d6�Std||||�}t||�S(
u
    A function to connect to a bigip device and list a specific node.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the node to list.
    unameuchangesuresultuucommentutestulistR"uhostnameuusernameupasswordubigip.list_node(Rt__opts__R#RR(thostnametusernametpasswordtnameR
R	((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pyt	list_node�s"
cC@si|d6id6td6dd6}tdrbt|ddi|d	6|d
6|d6|d6|d6�Std
||||�}|ddkr�t|d<d|d<nr|ddkrtd|||||�}t|d<i|dd<|d|dd<d|d<nt||�}|S(u0
    Create a new node if it does not already exist.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the node to create
    address
        The address of the node
    unameuchangesuresultuucommentutestucreateR"uhostnameuusernameupassworduaddressubigip.list_nodeucodei�u6A node by this name currently exists.  No change made.i�ubigip.create_nodeuolducontentunewuNode was successfully created.(RR$R#RRR(R%R&R'R(taddressR
RR	((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytcreate_node�s("




cC@si|d6id6td6dd6}tdr�t|ddi|d	6|d
6|d6|d6|d6|d
6|d6|d6|d6|	d6|
d6|d6|d6|
d6�Std||||�}|ddkr�|dd|kr�t|d<d|d<ntdd|d|d|d|d |d!|d"|d#|d$|	d%|
d&|d'|d(|
�
}|ddkrxtd)|||�}qt||�}nx|dd*kr�td+|||||�}|ddkr�tdd|d|d|d|d |d!|d"|d#|d$|	d%|
d&|d'|d(|
�
}|ddkrht|d<d,|d<i|dd-<|d|dd.<q�td/||||�}|ddkr�d0jd1|dd2�|d<q�d3jd1|dd2d4|dd2�|d<qt||�}nt||�}|S(5u$
    Manages a node of a given bigip device.  If the node does not exist it will be created, otherwise,
    only the properties which are different than the existing will be updated.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the node to manage.
    address
        The address of the node
    connection_limit
        [integer]
    description
        [string]
    dynam
        c_ratio:        [integer]
    logging
        [enabled | disabled]
    monitor
        [[name] | none | default]
    rate_limit
        [integer]
    ratio
        [integer]
    session
        [user-enabled | user-disabled]
    node_state (state)
        [user-down | user-up ]
    unameuchangesuresultuucommentutestumanageR"uhostnameuusernameupassworduaddressuconnection_limitudescriptionu
dynamic_ratiouloggingumonitoru
rate_limituratiousessionustate:ubigip.list_nodeucodei�ucontentu<A node with this name exists but the address does not match.ubigip.modify_nodeR%R&R'R(tconnection_limittdescriptiont
dynamic_ratiotloggingtmonitort
rate_limittratiotsessiontstateuNodei�ubigip.create_nodeu}Node was created and enforced to the desired state.  Note: Only parameters specified were enforced.  See changes for details.uoldunewubigip.delete_nodeu�Node was successfully created but an error occurred during modification. The creation of the node has been rolled back. Message is as follows:
{message}tmessageumessageu�Node was successfully created but an error occurred during modification. The creation of the node was not able to be rolled back. Message is as follows:
 {message}
{message_two}tmessage_two(RR$R#RRRRR(R%R&R'R(R*R,R-R.R/R0R1R2R3t
node_stateR
RRtnewtdeleted((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmanage_node�s�,"


		

		c
C@s�i|d6id6td6dd6}
tdr�t|
ddi
|d	6|d
6|d6|d6|d6|d
6|d6|d6|d6|	d6|
d6|d6|d6�Std||||�}|ddkrXtdd|d|d|d|d|d|d|d |d!|d"|	d#|
d$|d%|�
}|ddkrFtd&|
||�}
q�t||
�}
n,|dd'krud(|
d<nt||
�}
|
S()u�
    Modify an existing node. Only a node which already exists will be modified and
    only the parameters specified will be enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the node to modify
    connection_limit
        [integer]
    description
        [string]
    dynamic_ratio
        [integer]
    logging
        [enabled | disabled]
    monitor
        [[name] | none | default]
    rate_limit
        [integer]
    ratio
        [integer]
    session
        [user-enabled | user-disabled]
    node_state (state)
        [user-down | user-up ]
    unameuchangesuresultuucommentutestumodifyR"uhostnameuusernameupassworduconnection_limitudescriptionu
dynamic_ratiouloggingumonitoru
rate_limituratiousessionustate:ubigip.list_nodeucodei�ubigip.modify_nodeR%R&R'R(R,R-R.R/R0R1R2R3R4uNodei�u$A node with this name was not found.(RR$R#RRR(R%R&R'R(R,R-R.R/R0R1R2R3R7R
RR((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmodify_nodetsL*"
	
cC@sLi|d6id6td6dd6}tdr[t|ddi|d	6|d
6|d6|d6�Std||||�}|d
dkr�td||||�}|d
dkr�t|d<d|d<|d|dd<i|dd<qHt||�}nR|d
dkr9t|d<d|d<i|dd<i|dd<nt||�}|S(u�
    Delete an existing node.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the node which will be deleted.
    unameuchangesuresultuucommentutestudeleteR"uhostnameuusernameupasswordubigip.list_nodeucodei�ubigip.delete_nodeuNode was successfully deleted.ucontentuoldunewi�u2This node already does not exist. No changes made.(RR$R#RRR(R%R&R'R(R
RR9((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytdelete_node�s."




cC@s�i|d6id6td6dd6}tdr[t|ddi|d	6|d
6|d6|d6�Std||||�}t||�S(
u
    A function to connect to a bigip device and list a specific pool.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the pool to list.
    unameuchangesuresultuucommentutestulistR"uhostnameuusernameupasswordubigip.list_pool(RR$R#RR(R%R&R'R(R
R	((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pyt	list_pool
s"
c7C@s`i|d6id6td6dd6}tdr�t|ddi|d	6|d
6|d6|d6|d6|d
6|d6|d6|d6|	d6|
d6|d6|d6|
d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d 6|d!6�Std"||||�}|d#d$kr5t|d<d%|d<n'|d#d&krMtd'd(|d)|d*|d+|d,|d-|d.|d/|d0|d1|	d2|
d3|d4|d5|
d6|d7|d8|d9|d:|d;|d<|d=|d>|d?|d@|dA|dB|�}|d#d$kr;t|d<i|ddC<|dD|ddE<dF|d<q\t||�}nt||�}|S(Gu,
    Create a new node if it does not already exist.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the pool to create
    members
        List of members to be added to the pool
    allow_nat
        [yes | no]
    allow_snat
        [yes | no]
    description
        [string]
    gateway_failsafe_device
        [string]
    ignore_persisted_weight
        [enabled | disabled]
    ip_tos_to_client
        [pass-through | [integer]]
    ip_tos_to_server
        [pass-through | [integer]]
    link_qos_to_client
        [pass-through | [integer]]
    link_qos_to_server
        [pass-through | [integer]]
    load_balancing_mode
        [dynamic-ratio-member | dynamic-ratio-node |
        fastest-app-response | fastest-node |
        least-connections-members |
        least-connections-node |
        least-sessions |
        observed-member | observed-node |
        predictive-member | predictive-node |
        ratio-least-connections-member |
        ratio-least-connections-node |
        ratio-member | ratio-node | ratio-session |
        round-robin | weighted-least-connections-member |
        weighted-least-connections-node]
    min_active_members
        [integer]
    min_up_members
        [integer]
    min_up_members_action
        [failover | reboot | restart-all]
    min_up_members_checking
        [enabled | disabled]
    monitor
        [name]
    profiles
        [none | profile_name]
    queue_depth_limit
        [integer]
    queue_on_connection_limit
        [enabled | disabled]
    queue_time_limit
        [integer]
    reselect_tries
        [integer]
    service_down_action
        [drop | none | reselect | reset]
    slow_ramp_time
        [integer]
    unameuchangesuresultuucommentutestucreateR"uhostnameuusernameupasswordumembersu	allow_natu
allow_snatudescriptionugateway_failsafe_deviceuignore_persisted_weightuip_tos_client:u
ip_tos_serverulink_qos_to_clientulink_qos_to_serveruload_balancing_modeumin_active_membersumin_up_membersumin_up_members_checkingumonitoruprofilesuqueue_depth_limituqueue_on_connection_limituqueue_time_limitureselect_triesuservice_down_actionuslow_ramp_timeubigip.list_poolucodei�u6A pool by this name currently exists.  No change made.i�ubigip.create_poolR%R&R'R(tmemberst	allow_natt
allow_snatR-tgateway_failsafe_devicetignore_persisted_weighttip_tos_to_clienttip_tos_to_servertlink_qos_to_clienttlink_qos_to_servertload_balancing_modetmin_active_memberstmin_up_memberstmin_up_members_actiontmin_up_members_checkingR0tprofilestqueue_depth_limittqueue_on_connection_limittqueue_time_limittreselect_triestservice_down_actiontslow_ramp_timeuolducontentunewuPool was successfully created.(RR$R#RRR(R%R&R'R(R>R?R@R-RARBRCRDRERFRGRHRIRJRKR0RLRMRNRORPRQRRR
RR	((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytcreate_pool*s�]"


	

c5C@sKi|d6id6td6dd6}tdr�t|ddi|d	6|d
6|d6|d6|d6|d
6|d6|d6|d6|	d6|
d6|d6|d6|
d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d 6�Std!||||�}|d"d#kr&td$d%|d&|d'|d(|d)|d*|d+|d,|d-|d.|	d/|
d0|d1|d2|
d3|d4|d5|d6|d7|d8|d9|d:|d;|d<|d=|d>|�}|d"d#kr|d?d@=|d?d@=|d?dA=|d?dA=tdB|||�}qGt||�}n!|d"dCkr8tdDd%|d&|d'|d(|d)|d*|d+|d,|d-|d.|	d/|
d0|d1|d2|
d3|d4|d5|d6|d7|d8|d9|d:|d;|d<|d=|d>|�}|d"d#kr&t|d<dE|d<i|ddF<|d?|ddG<qGt||�}nt||�}|S(HuF
    Create a new pool if it does not already exist. Pool members are managed separately. Only the
    parameters specified are enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the pool to create
    allow_nat
        [yes | no]
    allow_snat
        [yes | no]
    description
        [string]
    gateway_failsafe_device
        [string]
    ignore_persisted_weight
        [enabled | disabled]
    ip_tos_to_client
        [pass-through | [integer]]
    ip_tos_to_server
        [pass-through | [integer]]
    link_qos_to_client
        [pass-through | [integer]]
    link_qos_to_server
        [pass-through | [integer]]
    load_balancing_mode
        [dynamic-ratio-member | dynamic-ratio-node |
        fastest-app-response | fastest-node |
        least-connections-members |
        least-connections-node |
        least-sessions |
        observed-member | observed-node |
        predictive-member | predictive-node |
        ratio-least-connections-member |
        ratio-least-connections-node |
        ratio-member | ratio-node | ratio-session |
        round-robin | weighted-least-connections-member |
        weighted-least-connections-node]
    min_active_members
        [integer]
    min_up_members
        [integer]
    min_up_members_action
        [failover | reboot | restart-all]
    min_up_members_checking
        [enabled | disabled]
    monitor
        [name]
    profiles
        [none | profile_name]
    queue_depth_limit
        [integer]
    queue_on_connection_limit
        [enabled | disabled]
    queue_time_limit
        [integer]
    reselect_tries
        [integer]
    service_down_action
        [drop | none | reselect | reset]
    slow_ramp_time
        [integer]

    unameuchangesuresultuucommentutestumanageR"uhostnameuusernameupasswordu	allow_natu
allow_snatudescriptionugateway_failsafe_deviceuignore_persisted_weightuip_tos_client:u
ip_tos_serverulink_qos_to_clientulink_qos_to_serveruload_balancing_modeumin_active_membersumin_up_membersumin_up_members_checkingumonitoruprofilesuqueue_depth_limituqueue_on_connection_limituqueue_time_limitureselect_triesuservice_down_actionuslow_ramp_timeubigip.list_poolucodei�ubigip.modify_poolR%R&R'R(R?R@R-RARBRCRDRERFRGRHRIRJRKR0RLRMRNRORPRQRRucontentumembersReferenceuselfLinkuPooli�ubigip.create_poolu}Pool was created and enforced to the desired state.  Note: Only parameters specified were enforced.  See changes for details.uoldunew(RR$R#RRRR(R%R&R'R(R?R@R-RARBRCRDRERFRGRHRIRJRKR0RLRMRNRORPRQRRR
RRR8((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmanage_pool�s�]"
		

c5C@sVi|d6id6td6dd6}tdr�t|ddi|d	6|d
6|d6|d6|d6|d
6|d6|d6|d6|	d6|
d6|d6|d6|
d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d 6�Std!||||�}|d"d#kr&td$d%|d&|d'|d(|d)|d*|d+|d,|d-|d.|	d/|
d0|d1|d2|
d3|d4|d5|d6|d7|d8|d9|d:|d;|d<|d=|d>|�}|d"d#kr|d?d@=|d?d@=|d?dA=|d?dA=tdB|||�}qRt||�}n,|d"dCkrCdD|d<nt||�}|S(Eu/
    Modify an existing pool. Pool members are managed separately. Only the
    parameters specified are enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the pool to create
    allow_nat
        [yes | no]
    allow_snat
        [yes | no]
    description
        [string]
    gateway_failsafe_device
        [string]
    ignore_persisted_weight
        [enabled | disabled]
    ip_tos_to_client
        [pass-through | [integer]]
    ip_tos_to_server
        [pass-through | [integer]]
    link_qos_to_client
        [pass-through | [integer]]
    link_qos_to_server
        [pass-through | [integer]]
    load_balancing_mode
        [dynamic-ratio-member | dynamic-ratio-node |
        fastest-app-response | fastest-node |
        least-connections-members |
        least-connections-node |
        least-sessions |
        observed-member | observed-node |
        predictive-member | predictive-node |
        ratio-least-connections-member |
        ratio-least-connections-node |
        ratio-member | ratio-node | ratio-session |
        round-robin | weighted-least-connections-member |
        weighted-least-connections-node]
    min_active_members
        [integer]
    min_up_members
        [integer]
    min_up_members_action
        [failover | reboot | restart-all]
    min_up_members_checking
        [enabled | disabled]
    monitor
        [name]
    profiles
        [none | profile_name]
    queue_depth_limit
        [integer]
    queue_on_connection_limit
        [enabled | disabled]
    queue_time_limit
        [integer]
    reselect_tries
        [integer]
    service_down_action
        [drop | none | reselect | reset]
    slow_ramp_time
        [integer]

    unameuchangesuresultuucommentutestumodifyR"uhostnameuusernameupasswordu	allow_natu
allow_snatudescriptionugateway_failsafe_deviceuignore_persisted_weightuip_tos_client:u
ip_tos_serverulink_qos_to_clientulink_qos_to_serveruload_balancing_modeumin_active_membersumin_up_membersumin_up_members_checkingumonitoruprofilesuqueue_depth_limituqueue_on_connection_limituqueue_time_limitureselect_triesuservice_down_actionuslow_ramp_timeubigip.list_poolucodei�ubigip.modify_poolR%R&R'R(R?R@R-RARBRCRDRERFRGRHRIRJRKR0RLRMRNRORPRQRRucontentumembersReferenceuselfLinkuPooli�u$A pool with this name was not found.(RR$R#RRR(R%R&R'R(R?R@R-RARBRCRDRERFRGRHRIRJRKR0RLRMRNRORPRQRRR
RR((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmodify_pool�s�]"
	
cC@sLi|d6id6td6dd6}tdr[t|ddi|d	6|d
6|d6|d6�Std||||�}|d
dkr�td||||�}|d
dkr�t|d<d|d<|d|dd<i|dd<qHt||�}nR|d
dkr9t|d<d|d<i|dd<i|dd<nt||�}|S(u�
    Delete an existing pool.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the pool which will be deleted
    unameuchangesuresultuucommentutestudeleteR"uhostnameuusernameupasswordubigip.list_poolucodei�ubigip.delete_pooluPool was successfully deleted.ucontentuoldunewi�u2This pool already does not exist. No changes made.(RR$R#RRR(R%R&R'R(R
RR9((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytdelete_poolos."




c
C@s�i|d6id6td6dd6}tdrbt|ddi|d	6|d
6|d6|d6|d6�Std
||||�}|ddkr{|ddd}td|||||�}|ddkritd
||||�}	|	ddkrt|	|�}d|d<|S|	ddd}
x|D]
}|d=q(Wx|
D]
}|d=q@Wtd|||
�}q�t||�}n,|ddkr�d|d<nt||�}|S(u�
    Manage the members of an existing pool.  This function replaces all current pool members.
    Only the parameters specified are enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the pool to modify
    members
        list of pool members to manage.

    unameuchangesuresultuucommentutestumanageR"uhostnameuusernameupasswordumembersubigip.list_poolucodei�ucontentumembersReferenceuitemsubigip.replace_pool_membersuZmodification of the pool was successful but an error occurred upon retrieving new listing.u
generationuPool Membershipi�u$A pool with this name was not found.(RR$R#RRR(
R%R&R'R(R>R
Rtcurrent_membersRtnew_listingtnew_memberstcurrent_membert
new_member((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmanage_pool_members�s:"




cC@sIi|d6id6td6dd6}tdrbt|ddi|d	6|d
6|d6|d6|d6�Std
||||�}|ddkr|ddd}t}x,|D]$}	|	d|dkr�t}Pq�q�W|rt|d<djd|d�|d<i|dd<i|dd<qEtd|||||�}
|
ddkrt|d<djd|d�|d<i|dd<td
||||�}|ddkr�t|
|�}|S|ddd}x,|D]$}	|	d|dkr�|	}
Pq�q�W|
|dd<qEt|
|�}n,|ddkr6d|d<nt||�}|S(uW
    A function to connect to a bigip device and add a new member to an existing pool.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the pool to modify
    member
        The member to add to the pool
    unameuchangesuresultuucommentutestuaddR"uhostnameuusernameupasswordumembersubigip.list_poolucodei�ucontentumembersReferenceuitemsuAMember: {name} already exists within this pool.  No changes made.R(uoldunewubigip.add_pool_memberu7Member: {name} has been successfully added to the pool.i�u$A pool with this name was not found.(RR$R#RRRR(R%R&R'R(tmemberR
t
existing_poolRWtexistsRZR[tpool_listingR>tadded_member((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytadd_pool_member�sR"





c#C@s`i|d6id6td6dd6}tdrbt|ddi|d	6|d
6|d6|d6|d6�Std
||||�}|ddkr0|ddd}t}x.|D]&}|d|kr�t}|}Pq�q�W|rtdd|d|d|d|d|d|d|d|d|d|	d|
d|d |d!|
d"|d#|d$|�}td
||||�}|ddkr|ddkr|ddd}x(|D] }|d|kr�|}Pq�q�Wi|d6}i|d6}td%jd|�|||�}q-t||�}q\d&jd|d�|d<n,|dd'krMd(|d<nt||�}|S()u%
    A function to connect to a bigip device and modify a member of an existing pool.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the pool to modify
    member
        The member modify
    connection_limit
        [integer]
    description
        [string]
    dynamic_ratio
        [integer]
    inherit_profile
        [enabled | disabled]
    logging
        [enabled | disabled]
    monitor
        [name]
    priority_group
        [integer]
    profiles
        [none | profile_name]
    rate_limit
        [integer]
    ratio
        [integer]
    session
        [user-enabled | user-disabled]
    member_state (state)
        [ user-up | user-down ]

    unameuchangesuresultuucommentutestumodifyR"uhostnameuusernameupasswordumembersubigip.list_poolucodei�ucontentumembersReferenceuitemsubigip.modify_pool_memberR%R&R'R(R]R,R-R.tinherit_profileR/R0tpriority_groupRLR1R2R3R4uPool Member: {member}uBMember: {name} does not exists within this pool.  No changes made.i�u$A pool with this name was not found.(RR$R#RRRRR(R%R&R'R(R]R,R-R.RcR/R0RdRLR1R2R3tmember_stateR
R^RWR_RZtexisting_memberRtnew_poolRYR[tmodified_membertoldR8((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmodify_pool_memberNsf5"

	 


$
cC@s�i|d6id6td6dd6}tdrbt|ddi|d	6|d
6|d6|d6|d6�Std
||||�}|ddkr{|ddd}t}x.|D]&}	|	d|kr�t}|	}
Pq�q�W|rHtd|||||�}|ddkrxt|d<djd|�|d<|
|dd<i|dd<qxq�t|d<d|d<i|dd<i|dd<nt||�}|S(u;
    Delete an existing pool member.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the pool to be modified
    member
        The name of the member to delete from the pool
    unameuchangesuresultuucommentutestudeleteR"uhostnameuusernameupasswordumembersubigip.list_poolucodei�ucontentumembersReferenceuitemsubigip.delete_pool_memberu/Pool Member: {member} was successfully deleted.R]uoldunewu9This pool member already does not exist. No changes made.(RR$R#RRRR(R%R&R'R(R]R
RRWR_RZRfR9((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytdelete_pool_member�s<"




cC@s�i|d6id6td6dd6}tdr[t|ddi|d	6|d
6|d6|d6�Std||||�}t||�S(
u�
    A function to list a specific virtual.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the virtual to list
    unameuchangesuresultuucommentutestulistR"uhostnameuusernameupasswordubigip.list_virtual(RR$R#RR(R%R&R'R(R
R	((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytlist_virtuals"
c+.WC@s7i|d6id6td6dd6}+tdrlt|+ddi+|d	6|d
6|d6|d6|d6|d
6|d6|d6|d6|	d6|
d6|d6|d6|
d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d 6|d!6|d"6|d#6|d$6|d%6|d&6|d'6| d(6|!d)6|"d*6|#d+6|$d,6|%d-6|&d.6|'d/6|(d06|)d16|*d26�Std3||||�},|,d4d5kr�t|+d<d6|+d<n�|,d4d7kr$td8d9|d:|d;|d<|d=|d>|d?|d@|dA|dB|dC|	dD|
dE|dF|
dG|dH|dI|dJ|dK|dL|dM|dN|dO|dP|dQ|dR|dS|dT|dU|dV|dW|dX|dY| dZ|!d[|"d\|#d]|$d^|%d_|&d`|'da|(db|)dc|*�+}-|-d4d5krt|+d<i|+ddd<|-de|+ddf<dg|+d<q3t|,|+�}+nt|,|+�}+|+S(hu�
    A function to connect to a bigip device and create a virtual server if it does not already exists.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the virtual to create
    destination
        [ [virtual_address_name:port] | [ipv4:port] | [ipv6.port] ]
    pool
        [ [pool_name] | none]
    address_status
        [yes | no]
    auto_lasthop
        [default | enabled | disabled ]
    bwc_policy
        [none] | string]
    cmp_enabled
        [yes | no]
    dhcp_relay
        [yes | no}
    connection_limit
        [integer]
    description
        [string]
    state
        [disabled | enabled]
    fallback_persistence
        [none | [profile name] ]
    flow_eviction_policy
        [none | [eviction policy name] ]
    gtm_score
        [integer]
    ip_forward
        [yes | no]
    ip_protocol
        [any | protocol]
    internal
        [yes | no]
    twelve_forward(12-forward)
        [yes | no]
    last_hop-pool
        [ [pool_name] | none]
    mask
        { [ipv4] | [ipv6] }
    mirror
        { [disabled | enabled | none] }
    nat64
        [enabled | disabled]
    persist
        [list]
    profiles
        [none | default | list ]
    policies
        [none | default | list ]
    rate_class
        [name]
    rate_limit
        [integer]
    rate_limit-mode
        [destination | object | object-destination |
        object-source | object-source-destination |
        source | source-destination]
    rate_limit-dst
        [integer]
    rate_limit-src
        [integer]
    rules
        [none | list ]
    related_rules
        [none | list ]
    reject
        [yes | no]
    source
        { [ipv4[/prefixlen]] | [ipv6[/prefixlen]] }
    source_address_translation
        [none | snat:pool_name | lsn | automap | dictionary ]
    source_port
        [change | preserve | preserve-strict]
    state
        [enabled | disabled]
    traffic_classes
        [none | default | list ]
    translate_address
        [enabled | disabled]
    translate_port
        [enabled | disabled]
    vlans
        [none | default | dictionary]

        vlan_ids
            [ list]
        enabled
            [ true | false ]
    unameuchangesuresultuucommentutestucreateR"uhostnameuusernameupasswordudestinationupooluaddress_statusuauto_lasthopu
bwc_policyucmp_enableduconnection_limitu
dhcp_relayudescriptionufallback_persistenceuflow_eviction_policyu	gtm_scoreu
ip_forwarduip_protocoluinternalutwelve_forwardu
last_hop_poolumaskumirrorunat64upersistuprofilesupoliciesu
rate_classu
rate_limiturate_limit_modeurate_limit_dsturate_limit_srcurulesu
related_rulesurejectusourceusource_address_translationusource_portu
virtual_stateutraffic_classesutranslate_addressutranslate_portuvlansubigip.list_virtualucodei�u9A virtual by this name currently exists.  No change made.i�ubigip.create_virtualR%R&R'R(tdestinationR-tpooltaddress_statustauto_lasthopt
bwc_policytcmp_enabledR,t
dhcp_relaytfallback_persistencetflow_eviction_policyt	gtm_scoret
ip_forwardtip_protocoltinternalttwelve_forwardt
last_hop_pooltmasktmirrortnat64tpersistRLtpoliciest
rate_classR1trate_limit_modetrate_limit_dsttrate_limit_srctrulest
related_rulestrejecttsourcetsource_address_translationtsource_portR4ttraffic_classesttranslate_addressttranslate_porttvlansuolducontentunewu!Virtual was successfully created.(RR$R#RRR(.R%R&R'R(RmRnRoRpRqRrR,RsR-RtRuRvRwRxRyRzR{R|R}R~RRLR�R�R1R�R�R�R�R�R�R�R�R�t
virtual_stateR�R�R�R�R
Rtvirtual((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytcreate_virtual9s��"


	

c+0WC@s�i|d6id6td6dd6}+tdrlt|+ddi+|d	6|d
6|d6|d6|d6|d
6|d6|d6|d6|	d6|
d6|d6|d6|
d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d 6|d!6|d"6|d#6|d$6|d%6|d&6|d'6| d(6|!d)6|"d*6|#d+6|$d,6|%d-6|&d.6|'d/6|(d06|)d16|*d26�Std3||||�},|,d4d5kr7td6d7|d8|d9|d:|d;|d<|d=|d>|d?|d@|dA|	dB|
dC|dD|
dE|dF|dG|dH|dI|dJ|dK|dL|dM|dN|dO|dP|dQ|dR|dS|dT|dU|dV|dW| dX|!dY|"dZ|#d[|$d\|%d]|&d^|'d_|(d`|)da|*�+}-|-d4d5kr%td3||||�}.|.d4d5krt|.db�}.t|,db�},tdc|+|,|.�}+q4t|.|+�}+q�t|-|+�}+n�|,d4ddkr�tded7|d8|d9|d:|d;|d<|d=|d>|d?|d@|dA|	dB|
dC|dD|
dE|dF|dG|dH|dI|dJ|dK|dL|dM|dN|dO|dP|dQ|dR|dS|dT|dU|dV|dW| dX|!dY|"dZ|#d[|$d\|%d]|&d^|'d_|(d`|)da|*�+}/|/d4d5kr�t|+d<i|+ddf<|/dg|+ddh<di|+d<q�t|/|+�}+nt|,|+�}+|+S(ju$	
    Manage a virtual server.  If a virtual does not exists it will be created, otherwise only the
    parameters specified will be enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the virtual to create
    destination
        [ [virtual_address_name:port] | [ipv4:port] | [ipv6.port] ]
    pool
        [ [pool_name] | none]
    address_status
        [yes | no]
    auto_lasthop
        [default | enabled | disabled ]
    bwc_policy
        [none] | string]
    cmp_enabled
        [yes | no]
    dhcp_relay
        [yes | no}
    connection_limit
        [integer]
    description
        [string]
    state
        [disabled | enabled]
    fallback_persistence
        [none | [profile name] ]
    flow_eviction_policy
        [none | [eviction policy name] ]
    gtm_score
        [integer]
    ip_forward
        [yes | no]
    ip_protocol
        [any | protocol]
    internal
        [yes | no]
    twelve_forward(12-forward)
        [yes | no]
    last_hop-pool
        [ [pool_name] | none]
    mask
        { [ipv4] | [ipv6] }
    mirror
        { [disabled | enabled | none] }
    nat64
        [enabled | disabled]
    persist
        [list]
    profiles
        [none | default | list ]
    policies
        [none | default | list ]
    rate_class
        [name]
    rate_limit
        [integer]
    rate_limit-mode
        [destination | object | object-destination |
        object-source | object-source-destination |
        source | source-destination]
    rate_limit-dst
        [integer]
    rate_limit-src
        [integer]
    rules
        [none | list ]
    related_rules
        [none | list ]
    reject
        [yes | no]
    source
        { [ipv4[/prefixlen]] | [ipv6[/prefixlen]] }
    source_address_translation
        [none | snat:pool_name | lsn | automap | dictionary ]
    source_port
        [change | preserve | preserve-strict]
    state
        [enabled | disabled]
    traffic_classes
        [none | default | list ]
    translate_address
        [enabled | disabled]
    translate_port
        [enabled | disabled]
    vlans
        [none | default | dictionary]

        vlan_ids
            [ list]
        enabled
            [ true | false ]
    unameuchangesuresultuucommentutestumanageR"uhostnameuusernameupasswordudestinationupooluaddress_statusuauto_lasthopu
bwc_policyucmp_enableduconnection_limitu
dhcp_relayudescriptionufallback_persistenceuflow_eviction_policyu	gtm_scoreu
ip_forwarduip_protocoluinternalutwelve_forwardu
last_hop_poolumaskumirrorunat64upersistuprofilesupoliciesu
rate_classu
rate_limiturate_limit_modeurate_limit_dsturate_limit_srcurulesu
related_rulesurejectusourceusource_address_translationusource_portu
virtual_stateutraffic_classesutranslate_addressutranslate_portuvlansubigip.list_virtualucodei�ubigip.modify_virtualR%R&R'R(RmR-RnRoRpRqRrR,RsRtRuRvRwRxRyRzR{R|R}R~RRLR�R�R1R�R�R�R�R�R�R�R�R�R4R�R�R�R�u
generationuVirtuali�ubigip.create_virtualuolducontentunewuCVirtual was successfully created and enforced to the desired state.(RR$R#RRRRR(0R%R&R'R(RmRnRoRpRqRrR,RsR-RtRuRvRwRxRyRzR{R|R}R~RRLR�R�R1R�R�R�R�R�R�R�R�R�R�R�R�R�R�R
RRt	relistingR�((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmanage_virtual;s.�"
		

c+/WC@sgi|d6id6td6dd6}+tdrlt|+ddi+|d	6|d
6|d6|d6|d6|d
6|d6|d6|d6|	d6|
d6|d6|d6|
d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d6|d 6|d!6|d"6|d#6|d$6|d%6|d&6|d'6| d(6|!d)6|"d*6|#d+6|$d,6|%d-6|&d.6|'d/6|(d06|)d16|*d26�Std3||||�},|,d4d5kr7td6d7|d8|d9|d:|d;|d<|d=|d>|d?|d@|dA|	dB|
dC|dD|
dE|dF|dG|dH|dI|dJ|dK|dL|dM|dN|dO|dP|dQ|dR|dS|dT|dU|dV|dW| dX|!dY|"dZ|#d[|$d\|%d]|&d^|'d_|(d`|)da|*�+}-|-d4d5kr%td3||||�}.|.d4d5krt|.db�}.t|,db�},tdc|+|,|.�}+q4t|.|+�}+qct|-|+�}+n,|,d4ddkrTde|+d<nt|,|+�}+|+S(fu	
    Modify an virtual server.  modify an existing virtual.  Only parameters specified will be enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the virtual to create
    destination
        [ [virtual_address_name:port] | [ipv4:port] | [ipv6.port] ]
    pool
        [ [pool_name] | none]
    address_status
        [yes | no]
    auto_lasthop
        [default | enabled | disabled ]
    bwc_policy
        [none] | string]
    cmp_enabled
        [yes | no]
    dhcp_relay
        [yes | no}
    connection_limit
        [integer]
    description
        [string]
    state
        [disabled | enabled]
    fallback_persistence
        [none | [profile name] ]
    flow_eviction_policy
        [none | [eviction policy name] ]
    gtm_score
        [integer]
    ip_forward
        [yes | no]
    ip_protocol
        [any | protocol]
    internal
        [yes | no]
    twelve_forward(12-forward)
        [yes | no]
    last_hop-pool
        [ [pool_name] | none]
    mask
        { [ipv4] | [ipv6] }
    mirror
        { [disabled | enabled | none] }
    nat64
        [enabled | disabled]
    persist
        [list]
    profiles
        [none | default | list ]
    policies
        [none | default | list ]
    rate_class
        [name]
    rate_limit
        [integer]
    rate_limit-mode
        [destination | object | object-destination |
        object-source | object-source-destination |
        source | source-destination]
    rate_limit_dst
        [integer]
    rate_limit_src
        [integer]
    rules
        [none | list ]
    related_rules
        [none | list ]
    reject
        [yes | no]
    source
        { [ipv4[/prefixlen]] | [ipv6[/prefixlen]] }
    source_address_translation
        [none | snat:pool_name | lsn | automap | dictionary ]
    source_port
        [change | preserve | preserve-strict]
    state
        [enabled | disabled]
    traffic_classes
        [none | default | list ]
    translate_address
        [enabled | disabled]
    translate_port
        [enabled | disabled]
    vlans
        [none | default | dictionary ]

        vlan_ids
            [ list]
        enabled
            [ true | false ]

    unameuchangesuresultuucommentutestumodifyR"uhostnameuusernameupasswordudestinationupooluaddress_statusuauto_lasthopu
bwc_policyucmp_enableduconnection_limitu
dhcp_relayudescriptionufallback_persistenceuflow_eviction_policyu	gtm_scoreu
ip_forwarduip_protocoluinternalutwelve_forwardu
last_hop_poolumaskumirrorunat64upersistuprofilesupoliciesu
rate_classu
rate_limiturate_limit_modeurate_limit_dsturate_limit_srcurulesu
related_rulesurejectusourceusource_address_translationusource_portu
virtual_stateutraffic_classesutranslate_addressutranslate_portuvlansubigip.list_virtualucodei�ubigip.modify_virtualR%R&R'R(RmR-RnRoRpRqRrR,RsRtRuRvRwRxRyRzR{R|R}R~RRLR�R�R1R�R�R�R�R�R�R�R�R�R4R�R�R�R�u
generationuVirtuali�u'A Virtual with this name was not found.(RR$R#RRRR(/R%R&R'R(RmRnRoRpRqRrR,RsR-RtRuRvRwRxRyRzR{R|R}R~RRLR�R�R1R�R�R�R�R�R�R�R�R�R�R�R�R�R�R
RRR�((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmodify_virtual|s��"
	
cC@sLi|d6id6td6dd6}tdr[t|ddi|d	6|d
6|d6|d6�Std||||�}|d
dkr�td||||�}|d
dkr�t|d<d|d<|d|dd<i|dd<qHt||�}nR|d
dkr9t|d<d|d<i|dd<i|dd<nt||�}|S(u�
    Delete an existing virtual.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the virtual which will be deleted
    unameuchangesuresultuucommentutestudeleteR"uhostnameuusernameupasswordubigip.list_virtualucodei�ubigip.delete_virtualu!Virtual was successfully deleted.ucontentuoldunewi�u5This virtual already does not exist. No changes made.(RR$R#RRR(R%R&R'R(R
RR9((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytdelete_virtual�	s."




cC@s�i|d6id6td6dd6}tdrbt|ddi|d	6|d
6|d6|d6|d6�Std
|||||�}t||�S(u2
    A function to list an exsiting monitor.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    monitor_type
        The type of monitor to list
    name
        The name of the monitor to list
    unameuchangesuresultuucommentutestulistR"uhostnameuusernameupasswordumonitor_typeubigip.list_monitor(RR$R#RR(R%R&R'tmonitor_typeR(R
R	((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytlist_monitor�	s"
cK@smi|d6id6td6dd6}tdr�i|d6|d6|d	6|d
6|d6}x'tj|�D]\}}	|	||<qeWt|d|�Std|||||�}
|
d
dkr�t|d<d|d<n�|
d
dkrZtd||||||�}|d
dkrHt|d<i|dd<|d|dd<d|d<qit||�}nt|
|�}|S(u�
    A function to connect to a bigip device and create a monitor.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    monitor_type
        The type of monitor to create
    name
        The name of the monitor to create
    kwargs
        [ arg=val ] ...

        Consult F5 BIGIP user guide for specific options for each monitor type.
        Typically, tmsh arg names are used.
    unameuchangesuresultuucommentutestuhostnameuusernameupasswordumonitor_typeucreateubigip.list_monitorucodei�u9A monitor by this name currently exists.  No change made.i�ubigip.create_monitoruolducontentunewu!Monitor was successfully created.(RR$RRR#RRR(R%R&R'R�R(tkwargsR
R"RRRR	((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytcreate_monitor�	s2"





c
K@s�i|d6id6td6dd6}tdr�i|d6|d6|d	6|d
6|d6}x'tj|�D]\}}	|	||<qeWt|d|�Std|||||�}
|
d
dkr*td||||||�}|d
dkr|
dd=|dd=td||
|�}q�t||�}n�|
d
dkr�td||||||�}|d
dkr�t|d<i|dd<|d|dd<d|d<q�t||�}nt|
|�}|S(uG
    Create a new monitor if a monitor of this type and name does not already exists.  If it does exists, only
    the parameters specified will be enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    monitor_type
        The type of monitor to create
    name
        The name of the monitor to create
    kwargs
        [ arg=val ] ...

        Consult F5 BIGIP user guide for specific options for each monitor type.
        Typically, tmsh arg names are used.
    unameuchangesuresultuucommentutestuhostnameuusernameupasswordumonitor_typeumanageubigip.list_monitorucodei�ubigip.modify_monitorucontentuselfLinkuMonitori�ubigip.create_monitoruoldunewu!Monitor was successfully created.(	RR$RRR#RRRR(
R%R&R'R�R(R�R
R"RRRRR	((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmanage_monitor
s:"



cK@sZi|d6id6td6dd6}tdr�i|d6|d6|d	6|d
6|d6}x'tj|�D]\}}	|	||<qeWt|d|�Std|||||�}
|
d
dkr*td||||||�}|d
dkr|
dd=|dd=td||
|�}qVt||�}n,|
d
dkrGd|d<nt|
|�}|S(u
    Modify an existing monitor.  If it does exists, only
    the parameters specified will be enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    monitor_type
        The type of monitor to create
    name
        The name of the monitor to create
    kwargs
        [ arg=val ] ...

        Consult F5 BIGIP user guide for specific options for each monitor type.
        Typically, tmsh arg names are used.
    unameuchangesuresultuucommentutestuhostnameuusernameupasswordumonitor_typeumodifyubigip.list_monitorucodei�ubigip.modify_monitorucontentuselfLinkuMonitori�u'A Monitor with this name was not found.(RR$RRR#RRR(R%R&R'R�R(R�R
R"RRRR((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmodify_monitori
s."


cC@sYi|d6id6td6dd6}tdrbt|ddi|d	6|d
6|d6|d6|d6�Std
|||||�}|ddkrtd|||||�}|ddkr�t|d<d|d<|d|dd<i|dd<qUt||�}nR|ddkrFt|d<d|d<i|dd<i|dd<nt||�}|S(u
    Modify an existing monitor.  If it does exists, only
    the parameters specified will be enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    monitor_type
        The type of monitor to create
    name
        The name of the monitor to create
    kwargs
        [ arg=val ] ...

        Consult F5 BIGIP user guide for specific options for each monitor type.
        Typically, tmsh arg names are used.
    unameuchangesuresultuucommentutestudeleteR"uhostnameuusernameupasswordumonitor_typeubigip.list_monitorucodei�ubigip.delete_monitoru!Monitor was successfully deleted.ucontentuoldunewi�u5This Monitor already does not exist. No changes made.(RR$R#RRR(R%R&R'R�R(R
RR9((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytdelete_monitor�
s0"




cC@s�i|d6id6td6dd6}tdrbt|ddi|d	6|d
6|d6|d6|d6�Std
|||||�}t||�S(u2
    A function to list an existing profile.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    profile_type
        The type of profile to list
    name
        The name of the profile to list
    unameuchangesuresultuucommentutestulistR"uhostnameuusernameupassworduprofile_typeubigip.list_profile(RR$R#RR(R%R&R'tprofile_typeR(R
R	((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytlist_profile�
s"
c	K@s@i|d6id6td6dd6}tdrbt|ddi|d	6|d
6|d6|d6|d6�Std
|||||�}|ddkr�t|d<d|d<n�|ddkr-td||||||�}|ddkrt|d<i|dd<|d|dd<d|d<q<t||�}nt||�}|S(uV
    A function to connect to a bigip device and create a profile.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    profile_type
        The type of profile to create
    name
        The name of the profile to create
    kwargs
        [ arg=val ] ...

        Consult F5 BIGIP user guide for specific options for each profile type.
        Typically, tmsh arg names are used.

    Special Characters ``|``, ``,`` and ``:`` must be escaped using ``\`` when
    used within strings.

    unameuchangesuresultuucommentutestucreateR"uhostnameuusernameupassworduprofile_typeubigip.list_profileucodei�u9A profile by this name currently exists.  No change made.i�ubigip.create_profileuolducontentunewu!Profile was successfully created.(RR$R#RRR(	R%R&R'R�R(R�R
RR	((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytcreate_profiles,"




c
K@s�i|d6id6td6dd6}tdr�i|d6|d6|d	6|d
6|d6}x'tj|�D]\}}	|	||<qeWt|d|�Std|||||�}
|
d
dkr*td||||||�}|d
dkr|
dd=|dd=td||
|�}q�t||�}n�|
d
dkr�td||||||�}|d
dkr�t|d<i|dd<|d|dd<d|d<q�t|
|�}nt|
|�}|S(uG
    Create a new profile if a monitor of this type and name does not already exists.  If it does exists, only
    the parameters specified will be enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    profile_type
        The type of profile to create
    name
        The name of the profile to create
    kwargs
        [ arg=val ] ...

        Consult F5 BIGIP user guide for specific options for each profile type.
        Typically, tmsh arg names are used.
    unameuchangesuresultuucommentutestuhostnameuusernameupassworduprofile_typeumanageubigip.list_profileucodei�ubigip.modify_profileucontentuselfLinkuProfilei�ubigip.create_profileuoldunewu!Profile was successfully created.(	RR$RRR#RRRR(
R%R&R'R�R(R�R
R"RRRRR	((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmanage_profileHs:"



cK@sZi|d6id6td6dd6}tdr�i|d6|d6|d	6|d
6|d6}x'tj|�D]\}}	|	||<qeWt|d|�Std|||||�}
|
d
dkr*td||||||�}|d
dkr|
dd=|dd=td||
|�}qVt||�}n,|
d
dkrGd|d<nt|
|�}|S(u
    Modify an existing profile.  If it does exists, only
    the parameters specified will be enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    profile_type
        The type of profile to create
    name
        The name of the profile to create
    kwargs
        [ arg=val ] ...

        Consult F5 BIGIP user guide for specific options for each monitor type.
        Typically, tmsh arg names are used.
    unameuchangesuresultuucommentutestuhostnameuusernameupassworduprofile_typeumodifyubigip.list_profileucodei�ubigip.modify_profileucontentuselfLinkuProfilei�u'A Profile with this name was not found.(RR$RRR#RRR(R%R&R'R�R(R�R
R"RRRR((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytmodify_profile�s."


cC@sYi|d6id6td6dd6}tdrbt|ddi|d	6|d
6|d6|d6|d6�Std
|||||�}|ddkrtd|||||�}|ddkr�t|d<d|d<|d|dd<i|dd<qUt||�}nR|ddkrFt|d<d|d<i|dd<i|dd<nt||�}|S(u
    Modify an existing profile.  If it does exists, only
    the parameters specified will be enforced.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    profile_type
        The type of profile to create
    name
        The name of the profile to create
    kwargs
        [ arg=val ] ...

        Consult F5 BIGIP user guide for specific options for each profile type.
        Typically, tmsh arg names are used.
    unameuchangesuresultuucommentutestudeleteR"uhostnameuusernameupassworduprofile_typeubigip.list_profileucodei�ubigip.delete_profileu!Profile was successfully deleted.ucontentuoldunewi�u5This Profile already does not exist. No changes made.(RR$R#RRR(R%R&R'R�R(R
RR9((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pytdelete_profile�s0"




(,t__doc__t
__future__RRRtsalt.utils.jsonRtsalt.extRRRRRR#R)R+RR:R;R<R=RSRTRURVR\RbRjRkRlR�R�R�R�R�R�R�R�R�R�R�R�R�R�(((s5/usr/lib/python2.7/site-packages/salt/states/bigip.pyt<module>s�				$			6�Y	7	���	7	O	Z	C	���	5	 	B	K	B	=		A	K	B

Zerion Mini Shell 1.0