Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/f5/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZyDddlm
Z
dd
lmZddlmZddlmZWnQek
r�ddlm
Z
dd
lmZddlmZddlmZnXdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZd efd!��YZd"�Ze d#kr�e�nd$S(%i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys�
---
module: bigip_sys_db
short_description: Manage BIG-IP system database variables
description:
  - Manage BIG-IP system database variables
version_added: 2.2
options:
  key:
    description:
      - The database variable to manipulate.
    type: str
    required: True
  state:
    description:
      - The state of the variable on the system. When C(present), guarantees
        that an existing variable is set to C(value). When C(reset) sets the
        variable back to the default value. At least one of value and state
        C(reset) are required.
    type: str
    choices:
      - present
      - reset
    default: present
  value:
    description:
      - The value to set the key to. At least one of value and state C(reset)
        are required.
    type: str
notes:
  - Requires BIG-IP version 12.0.0 or greater
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
sq
- name: Set the boot.quiet DB variable on the BIG-IP
  bigip_sys_db:
    key: boot.quiet
    value: disable
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

- name: Disable the initial setup screen
  bigip_sys_db:
    key: setup.run
    value: false
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

- name: Reset the initial setup screen
  bigip_sys_db:
    key: setup.run
    state: reset
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
sr
name:
  description: The key in the system database that was specified
  returned: changed and success
  type: str
  sample: setup.run
default_value:
  description: The default value of the key
  returned: changed and success
  type: str
  sample: true
value:
  description: The value that you set the key to
  returned: changed and success
  type: str
  sample: false
(t
AnsibleModule(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tf5_argument_spect
ParameterscB`s6eZidd6ZdgZdgZdddgZRS(t
default_valuetdefaultValuetvaluetname(t__name__t
__module__tapi_maptapi_attributest
updatablestreturnables(((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR
ss
		t
ApiParameterscB`seZRS((RR(((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR�stModuleParameterscB`seZRS((RR(((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR�stChangescB`seZd�ZRS(cC`s}i}y_xI|jD]>}t||�}t|t�rG|j|�q|||<qW|j|�}Wntk
rxnX|S(N(Rtgetattrt
isinstancetdicttupdatet_filter_paramst	Exception(tselftresultt
returnabletchange((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyt	to_return�s
(RRR%(((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR�st
UsableChangescB`seZRS((RR(((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR&�stReportableChangescB`seZRS((RR(((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR'�st
DifferencecB`s5eZdd�Zd�Zd�Zed��ZRS(cC`s||_||_dS(N(twantthave(R!R)R*((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RtAttributeErrort_Difference__default(R!tparamR"((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RR)R*R,(R!R.tattr1tattr2((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyt	__default�s
cC`si|jjdkrCt|jj�t|jj�krC|jjSn|jj|jjkre|jjSdS(Ntreset(R)tstatetstrR*RR(R!((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR�s
$
N(RRtNoneR+R/R-tpropertyR(((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR(�s			t
ModuleManagercB`steZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
RS(cO`s^|jdd�|_t|jj�|_td|jj�|_t�|_	t
�|_dS(Ntmoduletparams(tpopR6R9R	R:tclientRR)RR*R&tchanges(R!targstkwargs((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR+�s
cC`sH|jdg�}x/|D]'}|jjd|dd|d�qWdS(Nt
__warningstmsgtversion(R;R9t	deprecate(R!R"twarningstwarning((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyt_announce_deprecations�s


cC`s�t|j|j�}tj}t�}xX|D]P}|j|�}|dkrUq.q.t|t�rt|j	|�q.|||<q.W|r�|jj
|d<|jj|d<td|�|_
tStS(NRRR:(R(R)R*R
RRR/R6RRtkeyRR&R=tTruetFalse(R!tdiffRtchangedtkR$((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyt_update_changed_options�s 		
cC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NtpresentR3R:RK(RIRR)R4RNR3R'R=R%RRF(R!RKR"R4t
reportableR=((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pytexec_module�s	

cC`s|j�rtS|j�SdS(N(texistsRIR(R!((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyRN�scC`s�|j�|_|j�stS|jjr/tS|j�|jj	i|jj
d6�|jj	i|jjd6�|j�r�tSt
d��dS(NRGRsFailed to reset the DB variable(tread_current_from_deviceR*t
should_updateRIR9t
check_modeRHtreset_on_deviceR)RRGRRQR
(R!((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR3�s
cC`s^|jjdkr!td��n|j�|_|j�s@tS|jj	rPt
S|j�t
S(Ns,When setting a key, a value must be supplied(R)RR6R
RRR*RSRIR9RTRHtupdate_on_device(R!((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR
s
cC`s|j�}|rtStS(N(RMRHRI(R!R"((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyRSscC`s�dj|jjd|jjd|jj�}|jjj|�}y|j�}Wn%tk
r{}t	t
|���nXt
|d�t
|jj�kr�tSt
S(Ns"https://{0}:{1}/mgmt/tm/sys/db/{2}tservertserver_portR(tformatR<tproviderR)RGtapitgettjsont
ValueErrorR
R5RRHRI(R!turitresptresponsetex((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyRQ s

"cC`s�dj|jjd|jjd|jj�}|jjj|�}y|j�}Wn%tk
r{}t	t
|���nXd|kr�|ddkr�d|kr�t	|d��q�t	|j��ntd|�S(Ns"https://{0}:{1}/mgmt/tm/sys/db/{2}RWRXtcodei�tmessageR:(
RYR<RZR)RGR[R\R]R^R
R5tcontentR(R!R_R`RaRb((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyRR/s

cC`s�|jj�}dj|jjd|jjd|jj�}|jjj|d|�}y|j	�}Wn%t
k
r�}tt|���nXd|kr�|ddkr�d|kr�t|d��q�t|j
��ndS(Ns"https://{0}:{1}/mgmt/tm/sys/db/{2}RWRXR]Rci�Rd(R=t
api_paramsRYR<RZR)RGR[tpatchR]R^R
R5Re(R!R:R_R`RaRb((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyRVEs

cC`s�dj|jjd|jjd|jj�}td|jj�}|jjj	|d|�}y|j
�}Wn%tk
r�}tt
|���nXd|kr�|ddkr�d|kr�t|d��q�t|j��ndS(	Ns"https://{0}:{1}/mgmt/tm/sys/db/{2}RWRXRR]Rci�Rd(RYR<RZR)RGRR*RR[RgR]R^R
R5Re(R!R_R:R`RaRb((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyRUZs

(RRR+RFRMRPRNR3RRSRQRRRVRU(((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR8�s							
				tArgumentSpeccB`seZd�ZRS(c
C`srt|_tdtdt�dtdddddg�dt��}i|_|jjt�|jj|�dS(	NRGtrequiredR4tdefaultRNtchoicesR3R(RHtsupports_check_modeRt
argument_specRR(R!Rm((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyR+ss		(RRR+(((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyRhrscC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NRmRlR9RA(
RhRRmRlR8RPt	exit_jsonR
t	fail_jsonR5(tspecR9tmmtresultsRb((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pytmain�s		t__main__N(!t
__future__RRRttypet
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt%library.module_utils.network.f5.bigipR	t&library.module_utils.network.f5.commonR
RRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commonR
RRRR&R'tobjectR(R8RhRsR(((sK/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_sys_db.pyt<module>s<


$ 
�	

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