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/bigiq_regkey_pool.pyc

�
�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: bigiq_regkey_pool
short_description: Manages registration key pools on BIG-IQ
description:
  - Manages registration key (regkey) pools on a BIG-IQ. These pools function as
    a container in-which you will add lists of registration keys. To add registration
    keys, use the C(bigiq_regkey_license) module.
version_added: 2.5
options:
  name:
    description:
      - Specifies the name of the registration key pool.
      - You must be mindful to name your registration pools unique names. While
        BIG-IQ does not require this, this module does. If you do not do this,
        the behavior of the module is undefined and you may end up putting
        licenses in the wrong registration key pool.
    type: str
    required: True
  description:
    description:
      - A description to attach to the pool.
    type: str
  state:
    description:
      - The state of the regkey pool on the system.
      - When C(present), guarantees that the pool exists.
      - When C(absent), removes the pool, and the licenses it contains, from the
        system.
    type: str
    choices:
      - absent
      - present
    default: present
requirements:
  - BIG-IQ >= 5.3.0
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
s�
- name: Create a registration key (regkey) pool to hold individual device licenses
  bigiq_regkey_pool:
    name: foo-pool
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
sz
description:
  description: New description of the regkey pool.
  returned: changed
  type: str
  sample: My description
(t
AnsibleModule(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tf5_argument_spect
ParameterscB`s2eZiZdgZdgZdgZd�ZRS(tdescriptioncC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(treturnablestgetattrt_filter_paramst	Exception(tselftresultt
returnable((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyt	to_returnks
(t__name__t
__module__tapi_maptapi_attributesRt
updatablesR(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyR
Zs
			tModuleParameterscB`s eZed��Zd�ZRS(c`s@�j�}t�fd�|D�d�}|r8|jSdSdS(sReturns UUID of a given name

        Will search for a given name and return the first one returned to us. If no name,
        and therefore no ID, is found, will return the string "none". The string "none"
        is returned because if we were to return the None value, it would cause the
        license loading code to append a None string to the URI; essentially asking the
        remote device for its collection (which we dont want and which would cause the SDK
        to return an False error.

        :return:
        c3`s+|]!}|j�jdkr|VqdS(tnameN(Rt_values(t.0tx(R(sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pys	<genexpr>�stnoneN(tread_current_from_devicetnexttNonetid(Rt
collectiontresource((RsP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pytuuidws

cC`s�dj|jjd|jjd�}|jjj|�}y|j�}Wn%tk
rr}tt|���nXd|kr�|ddkr�d|kr�t|d��q�t|j	��nd|kr�gSg|dD]}t
d|�^q�}|S(	Ns=https://{0}:{1}/mgmt/cm/device/licensing/pool/regkey/licensestservertserver_porttcodei�tmessagetitemstparams(tformattclienttprovidertapitgettjsont
ValueErrorR
tstrtcontentt
ApiParameters(RturitresptresponsetextrR((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyR"�s 
&(RRtpropertyR(R"(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRvsR8cB`seZed��ZRS(cC`s|jdS(NR%(R(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyR(�s(RRR>R((((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyR8�stChangescB`seZRS((RR(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyR?�stReportableChangescB`seZRS((RR(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyR@�st
UsableChangescB`seZRS((RR(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRA�st
DifferencecB`s&eZdd�Zd�Zd�ZRS(cC`s||_||_dS(N(twantthave(RRCRD((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RtAttributeErrort_Difference__default(RtparamR((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RRCRDRF(RRHtattr1tattr2((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyt	__default�s
N(RRR$RERIRG(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRB�s	t
ModuleManagercB`s�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�ZRS(cO`sg|jdd�|_t|jj�|_td|jd|jj�|_t�|_	t
�|_dS(NtmoduleR0R.(R3R$RNR	R.R0RRCR8RDRAtchanges(Rtargstkwargs((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRE�s
!cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NR.(R
RRRCR$RARO(Rtchangedtkey((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyt_set_changed_options�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(NR.(RBRCRDR
RtdictRIR$t
isinstancetupdateR?ROtTruetFalse(RtdiffRRRtktchange((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyt_update_changed_options�s		
cC`s|j�}|rtStS(N(R]RXRY(RR((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyt
should_update�scC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NtpresenttabsentR.RR(RYRURCtstateR_R`R@RORRWt_announce_deprecations(RRRRRat
reportableRO((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pytexec_module�s	

cC`sH|jdg�}x/|D]'}|jjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRNt	deprecate(RRtwarningstwarning((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRbs


cC`s$|j�r|j�S|j�SdS(N(texistsRWtcreate(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyR_
s
cC`s�dj|jjd|jjd|jj�}|jjj|�}y|j�}Wntk
rht	SX|j
dks�d|kr�|ddkr�t	StS(NsAhttps://{0}:{1}/mgmt/cm/device/licensing/pool/regkey/licenses/{2}R)R*i�R+(R/R0R1RCR(R2R3R4R5RYRRX(RR9R:R;((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRls


+cC`s=|j�|_|j�stS|jjr/tS|j�tS(N(R"RDR^RYRNt
check_modeRXtupdate_on_device(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRWs
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(RNRnRXtremove_from_deviceRlR
(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pytremove(s
cC`s(|j�|jjrtS|j�tS(N(RTRNRnRXtcreate_on_device(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRm0s


cC`s�|jj�}|jj|d<dj|jjd|jjd�}|jjj|d|�}y|j�}Wn%t	k
r�}t
t|���nXd|kr�|dd
kr�d	|kr�t
|d	��q�t
|j��ndS(NRs>https://{0}:{1}/mgmt/cm/device/licensing/pool/regkey/licenses/R)R*R4R+i�i�R,(i�i�(
RCt
api_paramsRR/R0R1R2tpostR4R5R
R6R7(RR.R9R:R;R<((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRr7s
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(NsAhttps://{0}:{1}/mgmt/cm/device/licensing/pool/regkey/licenses/{2}R)R*R4R+i�R,(RORsR/R0R1RCR(R2tpatchR4R5R
R6R7(RR.R9R:R;R<((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRoJs

cC`s|j�r|j�StS(N(RlRqRY(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyR`]s
cC`s[dj|jjd|jjd|jj�}|jjj|�}|jdkrWtSdS(NsAhttps://{0}:{1}/mgmt/cm/device/licensing/pool/regkey/licenses/{2}R)R*i�(	R/R0R1RCR(R2tdeleteRRX(RR9R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRpbs

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(NsAhttps://{0}:{1}/mgmt/cm/device/licensing/pool/regkey/licenses/{2}R)R*R+i�R,R.(
R/R0R1RCR(R2R3R4R5R
R6R7R8(RR9R:R;R<((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyR"ls

(RRRERTR]R^RdRbR_RlRWRqRmRrRoR`RpR"(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRM�s 																
tArgumentSpeccB`seZd�ZRS(cC`srt|_tdtdt�dt�dtdddddg��}i|_|jjt�|jj|�dS(	NRtrequiredRRatdefaultR_tchoicesR`(RXtsupports_check_modeRUt
argument_specRWR(RR|((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRE�s			(RRRE(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyRw�scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR|R{RNRf(
RwRR|R{RMRdt	exit_jsonR
t	fail_jsonR6(tspecRNtmmtresultsR<((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pytmain�s		t__main__N(!t
__future__RRRttypet
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt%library.module_utils.network.f5.bigiqR	t&library.module_utils.network.f5.commonR
RRtImportErrort%ansible.module_utils.network.f5.bigiqt&ansible.module_utils.network.f5.commonR
RR8R?R@RAtobjectRBRMRwR�R(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_regkey_pool.pyt<module>s<


)
+�	

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