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_vcmp_guest.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
lm
Z
ddlmZy�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�ddlmZddlmZddlmZddlmZddlmZddl mZddl!mZddl"mZnXdefd��YZ#de#fd��YZ$de#fd��YZ%de#fd��YZ&de&fd ��YZ'd!e&fd"��YZ(d#e)fd$��YZ*d%e)fd&��YZ+d'e)fd(��YZ,d)�Z-e.d*kr�e-�ndS(+i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontstableinterfacetstatust	certifiedtsupported_bys�
---
module: bigip_vcmp_guest
short_description: Manages vCMP guests on a BIG-IP
description:
  - Manages vCMP guests on a BIG-IP. This functionality only exists on
    actual hardware and must be enabled by provisioning C(vcmp) with the
    C(bigip_provision) module.
version_added: 2.5
options:
  name:
    description:
      - The name of the vCMP guest to manage.
    type: str
    required: True
  vlans:
    description:
      - VLANs that the guest uses to communicate with other guests, the host, and with
        the external network. The available VLANs in the list are those that are
        currently configured on the vCMP host.
      - The order of these VLANs is not important; in fact, it's ignored. This module will
        order the VLANs for you automatically. Therefore, if you deliberately re-order them
        in subsequent tasks, you will find that this module will B(not) register a change.
    type: list
  initial_image:
    description:
      - Specifies the base software release ISO image file for installing the TMOS
        hypervisor instance and any licensed BIG-IP modules onto the guest's virtual
        disk. When creating a new guest, this parameter is required.
    type: str
  initial_hotfix:
    description:
      - Specifies the hotfix ISO image file which will be applied on top of the base
        image.
    type: str
    version_added: 2.9
  mgmt_network:
    description:
      - Specifies the method by which the management address is used in the vCMP guest.
      - When C(bridged), specifies that the guest can communicate with the vCMP host's
        management network.
      - When C(isolated), specifies that the guest is isolated from the vCMP host's
        management network. In this case, the only way that a guest can communicate
        with the vCMP host is through the console port or through a self IP address
        on the guest that allows traffic through port 22.
      - When C(host only), prevents the guest from installing images and hotfixes other
        than those provided by the hypervisor.
      - If the guest setting is C(isolated) or C(host only), the C(mgmt_address) does
        not apply.
      - Concerning mode changing, changing C(bridged) to C(isolated) causes the vCMP
        host to remove all of the guest's management interfaces from its bridged
        management network. This immediately disconnects the guest's VMs from the
        physical management network. Changing C(isolated) to C(bridged) causes the
        vCMP host to dynamically add the guest's management interfaces to the bridged
        management network. This immediately connects all of the guest's VMs to the
        physical management network. Changing this property while the guest is in the
        C(configured) or C(provisioned) state has no immediate effect.
    type: str
    choices:
      - bridged
      - isolated
      - host only
  delete_virtual_disk:
    description:
      - When C(state) is C(absent), will additionally delete the virtual disk associated
        with the vCMP guest. By default, this value is C(no).
    type: bool
    default: no
  mgmt_address:
    description:
      - Specifies the IP address, and subnet or subnet mask that you use to access
        the guest when you want to manage a module running within the guest. This
        parameter is required if the C(mgmt_network) parameter is C(bridged).
      - When creating a new guest, if you do not specify a network or network mask,
        a default of C(/24) (C(255.255.255.0)) will be assumed.
    type: str
  mgmt_route:
    description:
      - Specifies the gateway address for the C(mgmt_address).
      - If this value is not specified when creating a new guest, it is set to C(none).
      - The value C(none) can be used during an update to remove this value.
    type: str
  state:
    description:
      - The state of the vCMP guest on the system. Each state implies the actions of
        all states before it.
      - When C(configured), guarantees that the vCMP guest exists with the provided
        attributes. Additionally, ensures that the vCMP guest is turned off.
      - When C(disabled), behaves the same as C(configured) the name of this state
        is just a convenience for the user that is more understandable.
      - When C(provisioned), will ensure that the guest is created and installed.
        This state will not start the guest; use C(deployed) for that. This state
        is one step beyond C(present) as C(present) will not install the guest;
        only setup the configuration for it to be installed.
      - When C(present), ensures the guest is properly provisioned and starts
        the guest so that it is in a running state.
      - When C(absent), removes the vCMP from the system.
    type: str
    choices:
      - configured
      - disabled
      - provisioned
      - present
      - absent
    default: present
  cores_per_slot:
    description:
      - Specifies the number of cores that the system allocates to the guest.
      - Each core represents a portion of CPU and memory. Therefore, the amount of
        memory allocated per core is directly tied to the amount of CPU. This amount
        of memory varies per hardware platform type.
      - The number you can specify depends on the type of hardware you have.
      - In the event of a reboot, the system persists the guest to the same slot on
        which it ran prior to the reboot.
    type: int
  partition:
    description:
      - Device partition to manage resources on.
    type: str
    default: Common
  number_of_slots:
    description:
      - Specifies the number of slots for the system to use for creating the guest.
      - This value dictates how many cores a guest is allocated from each slot that
        it is assigned to.
      - Possible values are dependent on the type of blades being used in this cluster.
      - The default value depends on the type of blades being used in this cluster.
    type: int
    version_added: 2.7
  min_number_of_slots:
    description:
      - Specifies the minimum number of slots that the guest must be assigned to in
        order to deploy.
      - This field dictates the number of slots that the guest must be assigned to.
      - If at the end of any allocation attempt the guest is not assigned to at least
        this many slots, the attempt fails and the change that initiated it is reverted.
      - A guest's C(min_number_of_slots) value cannot be greater than its C(number_of_slots).
    type: int
    version_added: 2.7
  allowed_slots:
    description:
      - Contains those slots that the guest is allowed to be assigned to.
      - When the host determines which slots this guest should be assigned to, only slots
        in this list will be considered.
      - This is a good way to force guests to be assigned only to particular slots, or,
        by configuring disjoint C(allowed_slots) on two guests, that those guests are
        never assigned to the same slot.
      - By default this list includes every available slot in the cluster. This means,
        by default, the guest may be assigned to any slot.
    type: list
    version_added: 2.7
notes:
  - This module can take a lot of time to deploy vCMP guests. This is an intrinsic
    limitation of the vCMP system because it is booting real VMs on the BIG-IP
    device. This boot time is very similar in length to the time it takes to
    boot VMs on any other virtualization platform; public or private.
  - When BIG-IP starts, the VMs are booted sequentially; not in parallel. This
    means that it is not unusual for a vCMP host with many guests to take a
    long time (60+ minutes) to reboot and bring all the guests online. The
    BIG-IP chassis will be available before all vCMP guests are online.
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
  - Wojciech Wypior (@wojtek0806)
s�
- name: Create a vCMP guest
  bigip_vcmp_guest:
    name: foo
    mgmt_network: bridge
    mgmt_address: 10.20.30.40/24
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Create a vCMP guest with specific VLANs
  bigip_vcmp_guest:
    name: foo
    mgmt_network: bridge
    mgmt_address: 10.20.30.40/24
    vlans:
      - vlan1
      - vlan2
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Remove vCMP guest and disk
  bigip_vcmp_guest:
    name: guest1
    state: absent
    delete_virtual_disk: yes
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  register: result
s�
vlans:
  description: The VLANs assigned to the vCMP guest, in their full path format.
  returned: changed
  type: list
  sample: ['/Common/vlan1', '/Common/vlan2']
N(t
AnsibleModule(tenv_fallback(t
namedtuple(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(t
parseStats(tis_valid_ip(tip_interfacet
ParameterscB`s�eZi
dd6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6Zddddd	ddd
dddgZdddddddddddgZdddddddddddgZRS(t
mgmt_routetmanagementGwtmgmt_networktmanagementNetworktmgmt_addresstmanagementIpt
initial_imagetinitialImagetinitial_hotfixt
initialHotfixtvirtual_disktvirtualDisktcores_per_slottcoresPerSlottnumber_of_slotstslotstmin_number_of_slotstminSlotst
allowed_slotstallowedSlotstvlanststatetname(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatables(((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR�sX
		t
ApiParameterscB`seZRS((R+R,(((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR16stModuleParameterscB`s�eZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	d�Z
d�Zed	��ZRS(
cC`s\|jddkrdS|jddkr.dSt|jd�rL|jdStd��dS(NRtnones5The specified 'mgmt_route' is not a valid IP address.(t_valuestNoneRR(tself((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR;scC`si|jddkrdSy.tdt|jd��}t|j�SWntk
rdtd��nXdS(NRu%ss7The specified 'mgmt_address' is not a valid IP address.(R4R5Rtstrtwith_prefixlent
ValueErrorR(R6taddr((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRHs
cC`s�tdddg�}y�|jdjd�}t|�dkr`|d|dd|d�}n:t|�dkr�|d|ddd�}ntd	��Wn&tk
r�|dddd�}nX|S(
NtDestinationtiptsubnetRt/iiis'The provided mgmt_address is malformed.(R
R4tsplittlenR5RR9(R6R;tpartstresult((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyt
mgmt_tupleTs 

cC`s9|jddkrdS|jddkr.dS|jdS(NR)tpresenttdeployedt
configuredtdisabled(RFRG(R4(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR)es
cC`sQ|jddkrdSg|jdD]}t|j|�^q%}|j�|S(NR((R4R5Rt	partitiontsort(R6txRB((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR(ms
,
cC`sH|jddkrdS|j|jd�r8|jdStd��dS(NRsBThe specified 'initial_image' does not exist on the remote device.(R4R5tinitial_image_existsR(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRuscC`sH|jddkrdS|j|jd�r8|jdStd��dS(NRsCThe specified 'initial_hotfix' does not exist on the remote device.(R4R5tinitial_hotfix_existsR(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRscC`s�dj|jjd|jjd�}|jjj|�}y|j�}Wntk
r_tSX|jdks�d|kr�|ddkr�tSx)|dD]}|dj	|�r�t
Sq�WtS(Ns+https://{0}:{1}/mgmt/tm/sys/software/image/tservertserver_porti�tcodetitemsR*(tformattclienttprovidertapitgettjsonR9tFalseRt
startswithtTrue(R6timageturitresptresponsetresource((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRK�s

+cC`s�dj|jjd|jjd�}|jjj|�}y|j�}Wntk
r_tSX|jdks�d|kr�|ddkr�tSx)|dD]}|dj	|�r�t
Sq�WtS(Ns,https://{0}:{1}/mgmt/tm/sys/software/hotfix/RMRNi�RORPR*(RQRRRSRTRURVR9RWRRXRY(R6thotfixR[R\R]R^((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRL�s

+cC`s2|jddkrdS|jd}|j�|S(NR&(R4R5RI(R6RB((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR&�s


(
R+R,tpropertyRRRCR)R(RRRKRLR&(((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR2:s


		tChangescB`seZd�ZRS(cC`s}i}y_xI|jD]>}t||�}t|t�rG|j|�q|||<qW|j|�}Wntk
rxnX|S(N(R/tgetattrt
isinstancetdicttupdatet_filter_paramst	Exception(R6RBt
returnabletchange((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyt	to_return�s
(R+R,Rj(((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRa�st
UsableChangescB`seZRS((R+R,(((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRk�stReportableChangescB`seZRS((R+R,(((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRl�st
DifferencecB`sDeZdd�Zd�Zd�Zed��Zed��ZRS(cC`s||_||_dS(N(twantthave(R6RnRo((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RbtAttributeErrort_Difference__default(R6tparamRB((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RbRnRoRq(R6Rstattr1tattr2((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyt	__default�s
cC`sP|jj}|jdkr*td��n|jj|jjkrL|jjSdS(Ns:A subnet must be specified when changing the mgmt_address.(RnRCR=R5RRRo(R6Rn((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR�scC`sd|jjdkrdS|jjdkr2|jjSt|jj�t|jj�kr`|jjSdS(N(RnR&R5Rotset(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR&�s
$N(	R+R,R5RpRtRrR`RR&(((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRm�s
			
t
ModuleManagercB`s(eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!RS( cO`sd|jdd�|_t|jj�|_td|jd|jj�|_d|_t	�|_
dS(NtmoduleRRtparams(RUR5RzRR{RRR2RnRoRltchanges(R6targstkwargs((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRp�s
!	cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NR{(RR/RbRnR5RkR|(R6tchangedtkey((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyt_set_changed_options�scC`s�t|j|j�}tj}t�}x9|D]1}|j|�}|dkrUq.q.|||<q.W|rtd|�|_	t
StS(NR{(RmRnRoRR0RdRtR5RkR|RYRW(R6tdiffR0RtkRi((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyt_update_changed_optionss		
cC`sH|jdg�}x/|D]'}|jjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRzt	deprecate(R6RBtwarningstwarning((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyt_announce_deprecationss


cC`s|j�}|rtStS(N(R�RYRW(R6RB((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyt
should_updatescC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NRFtprovisionedREtabsentR{R(s
configuredR�sdeployed(RWRdRnR)RDR�RlR|RjReR�(R6RRBR)t
reportableR|((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pytexec_module"s	

cC`s$|j�r|j�S|j�SdS(N(texistsRetcreate(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRD3s
cC`s|j�r|j�StS(N(R�tremoveRW(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR�9s
cC`s�|j�|_|j�stS|jjr/tS|jjrW|j	�sW|j
�qWn|j�|jj
dkr�|j�n>|jj
dkr�|j�n|jj
dkr�|j
�ntS(NR�RERF(tread_current_from_deviceRoR�RWRzt
check_modeRYR|R t
is_configuredt	configuretupdate_on_deviceRnR)t	provisiontdeploy(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRe>s 



cC`sp|jjrtS|jjr.|j�|_n|j�|j�rSt	d��n|jjrl|j
�ntS(NsFailed to delete the resource.(RzR�RYRntdelete_virtual_diskR�Rotremove_from_deviceR�Rtremove_virtual_disk(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR�Ps

cC`s�|j�|jjrtS|jjjdkr]|jjt	ddj
|jjj���n|j�|jj
dkr�|j�n>|jj
dkr�|j�n|jj
dkr�|j�ntS(NRs{0}/255.255.255.0R�RERF(R�RzR�RYRnRCR=R5ReRdRQR<tcreate_on_deviceR)R�R�R�(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR�\s




cC`s�dj|jjd|jjd|jj�}|jjj|�}y|j�}Wntk
rht	SX|j
dks�d|kr�|ddkr�t	StS(Ns&https://{0}:{1}/mgmt/tm/vcmp/guest/{2}RMRNi�RO(RQRRRSRnR*RTRURVR9RWRRY(R6R[R\R]((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR�ms


+cC`s�|jj�}|jj|d<dj|jjd|jjd�}|jjj|d|�}y|j	�}Wn%t
k
r�}tt|���nXd|kr�|ddkr�d	|kr�t|d	��q�t|j
��n|d
S(NR*s#https://{0}:{1}/mgmt/tm/vcmp/guest/RMRNRVROi�i�tmessagetselfLink(i�i�(R|t
api_paramsRnR*RQRRRSRTtpostRVR9RR7tcontent(R6R{R[R\R]tex((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR�|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/vcmp/guest/{2}RMRNRVROi�R�(R|R�RQRRRSRnR*RTtpatchRVR9RR7R�(R6R{R[R\R]R�((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��s

cC`sjdj|jjd|jjd|jj�}|jjj|�}|jdkrWtSt	|j
��dS(Ns&https://{0}:{1}/mgmt/tm/vcmp/guest/{2}RMRNi�(RQRRRSRnR*RTtdeleteRRYRR�(R6R[R]((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��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/vcmp/guest/{2}RMRNROi�R�R{(
RQRRRSRnR*RTRURVR9RR7R�R1(R6R[R\R]R�((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��s

cC`s|j�r|j�StS(N(tvirtual_disk_existstremove_virtual_disk_from_deviceRW(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��s
cC`s�dj|jjd|jjd�}|jjj|�}y|j�}Wn%tk
rr}tt|���nXd|kr�|ddkr�d|kr�t|d��q�t|j	��nd|kr�|SdS(Ns*https://{0}:{1}/mgmt/tm/vcmp/virtual-disk/RMRNROi�R�RP(
RQRRRSRTRURVR9RR7R�(R6R[R\R]R�((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pytget_virtual_disks_on_device�s
cC`sU|j�}dj|jj�}x-|dD]!}|dj|�rItStSq,WdS(sChecks if a virtual disk exists for a guest

        The virtual disk names can differ based on the device vCMP is installed on.
        For instance, on a shuttle-series device with no slots, you will see disks
        that resemble the following

          guest1.img

        On an 8-blade Viprion with slots though, you will see

          guest1.img/1

        The "/1" in this case is the slot that it is a part of. This method looks
        for the virtual-disk without the trailing slot.

        Returns:
            dict
        s{0}RPR*N(R�RQRoRRXRYRW(R6R]tcheckR^((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��scC`s�dj|jj�}|j�}x�|dD]�}|dj|�r,dj|jjd|jjd|djdd��}|jjj	|�}|j
d	kr�q,q�t|j��q,q,Wt
S(
Ns{0}RPR*s-https://{0}:{1}/mgmt/tm/vcmp/virtual-disk/{2}RMRNR>t~i�(RQRoRR�RXRRRStreplaceRTR�RRR�RY(R6R�R]R^R[((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��s

cC`s�dj|jjd|jjd|jj�}|jjj|�}y|j�}Wn%tk
r{}t	t
|���nX|jdks�d|kr�|ddkr�tSd|kr�|ddkr�d|kr�t	|d��q�t	|j
��ntS(s�Checks to see if guest is disabled

        A disabled guest is fully disabled once their Stats go offline.
        Until that point they are still in the process of disabling.

        :return:
        s,https://{0}:{1}/mgmt/tm/vcmp/guest/{2}/statsRMRNi�ROi�R�(RQRRRSRnR*RTRURVR9RR7RRYR�RW(R6R[R\R]R�((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR�s 

+cC`s3dj|jjd|jjd|jj�}|jjj|�}y|j�}Wntk
rht	SXd|kr�|ddkr�d|kr�t
|d��q�t
|j��n|jdks�d|kr�|ddkr�t	St
|�}d|kr/|dd	d
kr/|dddkr,tSq/nt	S(
Ns,https://{0}:{1}/mgmt/tm/vcmp/guest/{2}/statsRMRNROi�R�i�tstatstrequestedStateR�tvmStatuststopped(RQRRRSRnR*RTRURVR9RWRR�RRRY(R6R[R\R]RB((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pytis_provisioned's*


+
cC`s3dj|jjd|jjd|jj�}|jjj|�}y|j�}Wntk
rht	SXd|kr�|ddkr�d|kr�t
|d��q�t
|j��n|jdks�d|kr�|ddkr�t	St
|�}d|kr/|dd	d
kr/|dddkr,tSq/nt	S(
Ns,https://{0}:{1}/mgmt/tm/vcmp/guest/{2}/statsRMRNROi�R�i�R�R�RER�trunning(RQRRRSRnR*RTRURVR9RWRR�RRRY(R6R[R\R]RB((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pytis_deployedDs*


+
cC`s(|j�rtS|j�|j�tS(N(R�RWtconfigure_on_devicetwait_for_configuredRY(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR�as


cC`s�tdd�}dj|jjd|jjd|jj�}|jjj|d|�}y|j�}Wn%t	k
r�}t
t|���nXd|kr�|ddkr�d	|kr�t
|d	��q�t
|j��ndS(
NR)RFs&https://{0}:{1}/mgmt/tm/vcmp/guest/{2}RMRNRVROi�R�(
RdRQRRRSRnR*RTR�RVR9RR7R�(R6R{R[R\R]R�((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR�hs

cC`sCd}x6|dkr>|j�r.|d7}ntjd�q	WdS(Niii(R�ttimetsleep(R6tnops((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR�{s

cC`s(|j�rtS|j�|j�dS(N(R�RWtprovision_on_devicetwait_for_provisioned(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��s
cC`s�tdd�}dj|jjd|jjd|jj�}|jjj|d|�}y|j�}Wn%t	k
r�}t
t|���nXd|kr�|ddkr�d	|kr�t
|d	��q�t
|j��ndS(
NR)R�s&https://{0}:{1}/mgmt/tm/vcmp/guest/{2}RMRNRVROi�R�(
RdRQRRRSRnR*RTR�RVR9RR7R�(R6R{R[R\R]R�((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��s

cC`sCd}x6|dkr>|j�r.|d7}ntjd�q	WdS(Niii(R�R�R�(R6R�((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��s

cC`s(|j�rtS|j�|j�dS(N(R�RWtdeploy_on_devicetwait_for_deployed(R6((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��s
cC`s�tdd�}dj|jjd|jjd|jj�}|jjj|d|�}y|j�}Wn%t	k
r�}t
t|���nXd|kr�|ddkr�d	|kr�t
|d	��q�t
|j��ndS(
NR)REs&https://{0}:{1}/mgmt/tm/vcmp/guest/{2}RMRNRVROi�R�(
RdRQRRRSRnR*RTR�RVR9RR7R�(R6R{R[R\R]R�((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��s

cC`sCd}x6|dkr>|j�r.|d7}ntjd�q	WdS(Niii(R�R�R�(R6R�((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��s

("R+R,RpR�R�R�R�R�RDR�ReR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRy�s@																															tArgumentSpeccB`seZd�ZRS(c"C`sDt|_tdtdt�dtdd�dtddd	d
g�dt�dt�d
t�dt�dtddddddddg�dtdddd�dtdd�dtdd�dtdd�dtdd�dtddd td!gf��}i|_|jjt�|jj|�dddggg|_dS("NR*trequiredR(ttypetlistRtchoicestbridgedtisolateds	host onlyRRRRR)tdefaultRDRFRGR�R�R�tbooltnoR tintR"R$R&RHtCommontfallbacktF5_PARTITION(RYtsupports_check_modeRdR	t
argument_specReRtrequired_if(R6R�((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyRp�s4							(R+R,Rp(((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyR��scC`s�t�}td|jd|jd|j�}y,td|�}|j�}|j|�Wn)tk
r�}|j	dt
|��nXdS(NR�R�R�RzR�(R�RR�R�R�RyR�t	exit_jsonRt	fail_jsonR7(tspecRztmmtresultsR�((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pytmain�s			t__main__(/t
__future__RRRR�t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNR�tansible.module_utils.basicRR	tcollectionsR
t%library.module_utils.network.f5.bigipRt&library.module_utils.network.f5.commonRR
RRt$library.module_utils.network.f5.urlsRt)library.module_utils.network.f5.ipaddressRt%library.module_utils.compat.ipaddressRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont$ansible.module_utils.network.f5.urlst)ansible.module_utils.network.f5.ipaddresst%ansible.module_utils.compat.ipaddressRR1R2RaRkRltobjectRmRyR�R�R+(((sO/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_vcmp_guest.pyt<module>sT


�&
9z)��$	

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