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_software_update.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_versiontstableinterfacetstatust	certifiedtsupported_bys	
---
module: bigip_software_update
short_description: Manage the software update settings of a BIG-IP
description:
  - Manage the software update settings of a BIG-IP.
version_added: 2.5
options:
  auto_check:
    description:
      - Specifies whether to automatically check for updates on the F5
        Networks downloads server.
    type: bool
  auto_phone_home:
    description:
      - Specifies whether to automatically send phone home data to the
        F5 Networks PhoneHome server.
    type: bool
  frequency:
    description:
      - Specifies the schedule for the automatic update check.
    type: str
    choices:
      - daily
      - monthly
      - weekly
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
  - Wojciech Wypior (@wojtek0806)
s�
- name: Enable automatic update checking
  bigip_software_update:
    auto_check: yes
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Disable automatic update checking and phoning home
  bigip_software_update:
    auto_check: no
    auto_phone_home: no
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
st
auto_check:
  description: Whether the system checks for updates automatically.
  returned: changed
  type: bool
  sample: True
auto_phone_home:
  description: Whether the system automatically sends phone home data.
  returned: changed
  type: bool
  sample: True
frequency:
  description: Frequency of auto update checks
  returned: changed
  type: str
  sample: weekly
(t
AnsibleModule(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tf5_argument_spect
ParameterscB`sIeZidd6dd6ZdddgZdddgZdddgZRS(t
auto_checkt	autoChecktauto_phone_homet
autoPhonehomet	frequency(t__name__t
__module__tapi_maptapi_attributest
updatablestreturnables(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR
ds
t
ApiParameterscB`seZed��ZRS(cC`s"|jddkrdS|jdS(NR(t_valuestNone(tself((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyRxs(RRtpropertyR(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyRwstModuleParameterscB`s&eZed��Zed��ZRS(cC`s6|jddkrdS|jdtkr.dSdSdS(NRtenabledtdisabled(RRtTrue(R((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR�s
cC`s6|jddkrdS|jdtkr.dSdSdS(NRRR (RRR!(R((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR�s
(RRRRR(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyRs	tChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(Rtgetattrt_filter_paramst	Exception(Rtresultt
returnable((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyt	to_return�s
(RRR((((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR"�st
UsableChangescB`seZRS((RR(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR)�stReportableChangescB`s&eZed��Zed��ZRS(cC`s2|jddkrtS|jddkr.tSdS(NRRR (RR!tFalse(R((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR�scC`s2|jddkrtS|jddkr.tSdS(NRRR (RR!R+(R((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR�s(RRRRR(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR*�st
DifferencecB`s&eZdd�Zd�Zd�ZRS(cC`s||_||_dS(N(twantthave(RR-R.((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(R#tAttributeErrort_Difference__default(RtparamR&((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(R#R-R.R0(RR2tattr1tattr2((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyt	__default�s
N(RRRR/R3R1(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR,�s	t
ModuleManagercB`sPeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(cO`s[|jdd�|_t|jj�|_d|_td|jj�|_t	�|_
dS(Ntmoduletparams(tgetRR8R	R9tclientR.RR-R)tchanges(Rtargstkwargs((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR/�s
	cC`smt�}|j�}td|jj��}|j�}|j|�|jtd|��|j|�|S(NR9tchanged(tdicttupdateR*R<R(t_announce_deprecations(RR&R?t
reportableR<((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pytexec_module�s	

cC`sH|jdg�}x/|D]'}|jjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopR8t	deprecate(RR&twarningstwarning((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyRB�s


cC`s�t|j|j�}tj}t�}xX|D]P}|j|�}|dkrUq.q.t|t�rt|j	|�q.|||<q.W|r�t
d|�|_tSt
S(NR9(R,R-R.R
RR@R3Rt
isinstanceRAR)R<R!R+(RtdiffRR?tktchange((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyt_update_changed_options�s		
cC`s|j�}|rtStS(N(RPR!R+(RR&((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyt
should_update�scC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceR.RQR+R8t
check_modeR!tupdate_on_device(R((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyRA�s
cC`s�dj|jjd|jjd�}|jjj|�}y|j�}Wn%tk
rr}tt|���nXd|kr�|ddkr�d|kr�t|d��q�t|j	��nt
d|�S(Ns,https://{0}:{1}/mgmt/tm/sys/software/update/tservertserver_porttcodei�tmessageR9(tformatR;tprovidertapiR:tjsont
ValueErrorR
tstrtcontentR(Rturitresptresponsetex((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyRRs
cC`s�|jj�}dj|jjd|jjd�}|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/software/update/RURVR\RWi�RX(R<t
api_paramsRYR;RZR[tpatchR\R]R
R^R_(RR9R`RaRbRc((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyRTs
(
RRR/RDRBRPRQRARRRT(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR7�s								tArgumentSpeccB`seZd�ZRS(cC`sut|_tdtdd�dtdd�dtdddd	g��}i|_|jjt�|jj|�dS(
NRttypetboolRRtchoicestdailytmonthlytweekly(R!tsupports_check_modeR@t
argument_specRAR(RRn((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyR/,s				(RRR/(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyRf+scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NRnRmR8RF(
RfRRnRmR7RDt	exit_jsonR
t	fail_jsonR^(tspecR8tmmtresultsRc((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pytmain>s		t__main__N(!t
__future__RRRRgt
__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
RRR"R)R*tobjectR,R7RfRtR(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_software_update.pyt<module>s<


 
b	

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