%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/lib/python2.7/site-packages/salt/cloud/clouds/
Upload File :
Create Path :
Current File : //proc/self/root/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddlZddl	Z
ddlZ
ddlj
Z
ddlmZmZmZddlmZddlmZyddlZeZWnek
r�eZnXyddlmZeZWnek
reZnXeje�Z dZ!d	�Z"d
�Z#d�Z$da&da'da(da)da*d�Z+dd
�Z,ed�Z-ed�Z.d�Z/d�Z0dd�Z1d�Z2ddd�Z3dded�Z4d�Z5dd�Z6ddd�Z7dd�Z8dd�Z9dd�Z:d�Z;d�Z<dd dd!�Z=d"�Z>dd#�Z?dd$d%�Z@d&d'�ZAd&d(�ZBdd)�ZCddd*�ZDddd+�ZEddd,�ZFddd-�ZGdddd.�ZHdS(/uw
Proxmox Cloud Module
======================

.. versionadded:: 2014.7.0

The Proxmox cloud module is used to control access to cloud providers using
the Proxmox system (KVM / OpenVZ / LXC).

Set up the cloud configuration at ``/etc/salt/cloud.providers`` or
 ``/etc/salt/cloud.providers.d/proxmox.conf``:

.. code-block:: yaml

    my-proxmox-config:
      # Proxmox account information
      user: myuser@pam or myuser@pve
      password: mypassword
      url: hypervisor.domain.tld
      driver: proxmox
      verify_ssl: True

:maintainer: Frank Klaassen <frank@cloudright.nl>
:depends: requests >= 2.2.1
:depends: IPy >= 0.81
i(tabsolute_importtprint_functiontunicode_literalsN(tSaltCloudSystemExittSaltCloudExecutionFailuretSaltCloudExecutionTimeout(tsix(trange(tIPuproxmoxcC@s*t�tkrtSt�tkr&tStS(u*
    Check for PROXMOX configurations
    (tget_configured_providertFalsetget_dependenciest__virtualname__(((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt__virtual__Es
cC@stjttptd�S(u/
    Return the first configured instance.
    uuser(uuser(tconfigtis_provider_configuredt__opts__t__active_provider_name__R(((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyR	Rs	cC@s$itd6td6}tjt|�S(u*
    Warn if dependencies aren't met.
    urequestsuIPy(tHAS_REQUESTStHAS_IPYRtcheck_driver_dependenciesR(tdeps((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyR]s
cC@s�tjdt�tdt�atjdt�tdt�f}tjdt�tdt�}tjdt�tdtdt�ai|d6|d6}djt�}t	j
|d	td
|�j�}i|ddd
6at
j|dd�adS(u;
    Retrieve CSRF and API tickets for the Proxmox API
    uurlt
search_globaluuserupasswordu
verify_ssltdefaultuusernameu(https://{0}:8006/api2/json/access/tickettverifytdataudatauticketu
PVEAuthCookieuCSRFPreventionTokenN(Rtget_cloud_config_valueR	RR
turltTruet
verify_ssltformattrequeststposttjsontticketRt	text_typetcsrf(tusernametpasswdtconnect_datatfull_urlt
returned_data((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt
_authenticaterscC@s�tdks$tdks$tdkr;tjd�t�ndjt|�}tjd|||�idd6dd6dd	6}|d
kr�t|d<tj	|dt
d
|dtd|�}n�|dkr�t|d<tj|dt
d
|dtd|�}nj|dkr>t|d<tj|dt
d
|dtd|�}n*|dkrhtj
|dt
dt�}n|j�y-|j�}d|kr�t�n|dSWn+tk
r�tjd�tj|�nXdS(u-
    Execute the HTTP request to the API
    u'Not authenticated yet, doing that now..uhttps://{0}:8006/api2/json/{1}u%s: %s (%s)uapplication/jsonuAcceptu!application/x-www-form-urlencodeduContent-Typeusalt-cloud-proxmoxu
User-AgentupostuCSRFPreventionTokenRRtcookiestheadersuputudeleteugetudatauError in trying to process JSONN(R"tNoneR$RtlogtdebugR*RRR Rtputtdeletetgettraise_for_statusR!Rt	Exceptionterror(t	conn_typetoptiont	post_dataR(thttpheaderstresponseR)((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pytquery�sL$







	

cC@s7td|�}||kr#||Stjd|�tS(u�
    Since Proxmox works based op id's rather than names as identifiers this
    requires some filtering to retrieve the required information.
    t
includeConfigu%VM with name "%s" could not be found.(tget_resources_vmsR.tinfoR
(tnamet
allDetailstvms((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt_get_vm_by_name�s
cC@scxLtjtd|��D]2\}}tj|d�tj|�kr|SqWtjd|�tS(u(
    Retrieve a VM based on the ID.
    R<uvmidu#VM with ID "%s" could not be found.(Rt	iteritemsR=R#R.R>R
(tvmidR@tvm_namet
vm_details((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt
_get_vm_by_id�s
%"cC@sttdd��S(u�
    Proxmox allows the use of alternative ids instead of autoincrementing.
    Because of that its required to query what the first available ID is.
    ugetucluster/nextid(tintR;(((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt_get_next_vmid�scC@s{xdtjtdt��D]J\}}|d}||dksO|d|krtjd|�tSqWtjd|�tS(u�
    Proxmox VMs refuse to start when the IP is already being used.
    This function can be used to prevent VMs being created with duplicate
    IP's or to generate a warning.
    R<uconfigu
ip_addressuIP "%s" is already definedu"IP '%s' is available to be defined(RRCR=RR.R/R
(tip_addrRERFt	vm_config((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt_check_ip_available�s%
 cC@si}|}|jd�}|ddkrtj|d�|d<tj|d�|d<tj|d�|d	<tj|d
�|d<tj|d�|d
<tj|d�|d<tj|d�|d<tj|�|d<|dk	rd|krtj|d�|d<qn|S(u�
    Upon requesting a task that runs for a longer period of time a UPID is given.
    This includes information about the job and can be used to lookup information in the log.
    u:iuUPIDiunodeiupidiupstartiu	starttimeiutypeiuvmidiuuseruupidu
technologyN(tsplitRR#R-(tnodetvm_trettupid((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt_parse_proxmox_upid�scC@satjd|�tdd�}|r]x5|D]*}|d|kr,tjd|�|Sq,WntS(u�
    Retrieve the (latest) logs and retrieve the status for a UPID.
    This can be used to verify whether a task has completed.
    u$Getting creation status for upid: %sugetu
cluster/tasksuupiduFound upid task: %s(R.R/R;R
(RQttasksttask((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt_lookup_proxmox_task
s
cC@s�tjd|�tdd�}i}xA|D]9}d|kr,|ddkr,|d}|||<q,q,W|dk	r�tjd|�||Stjd|�|S(	u�
    Retrieve all hypervisors (nodes) available on this environment
    CLI Example:

    .. code-block:: bash

        salt-cloud -f get_resources_nodes my-proxmox-config
    u&Getting resource: nodes.. (filter: %s)ugetucluster/resourcesutypeunodeu5Filter given: %s, returning requested resource: nodesu3Filter not given: %s, returning all resource: nodesN(R.R/R;R-(tcallt	resFiltert	resourcesRPtresourceR?((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pytget_resources_nodess	

	cC@s�tjd|�tdd�}i}x||D]t}d|kr,|ddkr,|d}|||<|r�t||d	||d
||d�||d<q�q,q,W|dk	r�tjd|�||Stjd
|�|S(u�
    Retrieve all VMs available on this environment

    CLI Example:

    .. code-block:: bash

        salt-cloud -f get_resources_vms my-proxmox-config
    u$Getting resource: vms.. (filter: %s)ugetucluster/resourcesutypeuopenvzuqemuulxcunameuvmidunodeuconfigu5Filter given: %s, returning requested resource: nodesu3Filter not given: %s, returning all resource: nodes(uopenvzuqemuulxcN(R.R/R;tget_vmconfigR-(RVRWR<RXRPRYR?((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyR=9s$



#	cC@satjd|t�}|s$d}ntjjj||ttjjjtjjjt|���S(u-
    Return the script deployment object
    uscriptubootstrap-salt(	RRRtsalttutilstcloudt	os_scripttsalt_config_to_yamlt
minion_config(ROtscript_name((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pytscript]s	cC@sY|dkrtd��ntdd�}i}x"|D]}|d}|||<q7W|S(u�
    Return a list of the hypervisors (nodes) which this Proxmox PVE machine manages

    CLI Example:

    .. code-block:: bash

        salt-cloud --list-locations my-proxmox-config
    uactionufThe avail_locations function must be called with -f or --function, or with the --list-locations optionugetunodesunode(RR;(RVtnodesRPRNR?((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pytavail_locationsos


ulocalcC@s||dkrtd��ni}xTtjt��D]@\}}x1tddj||��D]}|||d<q\Wq4W|S(u�
    Return a list of the images that are on the provider

    CLI Example:

    .. code-block:: bash

        salt-cloud --list-images my-proxmox-config
    uactionu`The avail_images function must be called with -f or --function, or with the --list-images optionugetunodes/{0}/storage/{1}/contentuvolid(RRRCReR;R(RVtlocationRPt	host_namethost_detailstitem((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pytavail_images�s
"cC@s�|dkrtd��ni}xztjtdt��D]`\}}tjd|�tjd|�i||<tj|d�||d<tj|d�||d<tj|d	�||d
<tj|d�||d<g}g}d
|dkr~|dd
dkr~|dd
jd�}xX|D]M}t	|�j
�dkra|jtj|��q*|jtj|��q*Wn|||d<|||d<q:W|S(u�
    Return a list of the VMs that are managed by the provider

    CLI Example:

    .. code-block:: bash

        salt-cloud -Q my-proxmox-config
    uactionu=The list_nodes function must be called with -f or --function.R<uVM_Name: %suvm_details: %suvmiduiduimageudiskusizeustatusustateu
ip_addressuconfigu-u uPRIVATEuprivate_ipsu
public_ips(RRRCR=RR.R/R#RMRtiptypetappend(RVRPRERFtprivate_ipst
public_ipstipstip_((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt
list_nodes�s.
%
$
cC@s(|dkrtd��ntdt�S(u�
    Return a list of the VMs that are on the provider

    CLI Example:

    .. code-block:: bash

        salt-cloud -F my-proxmox-config
    uactionuBThe list_nodes_full function must be called with -f or --function.R<(RR=R(RV((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pytlist_nodes_full�s
cC@s tjjjt�td|�S(u�
    Return a list of the VMs that are on the provider, with select fields

    CLI Example:

    .. code-block:: bash

        salt-cloud -S my-proxmox-config
    uquery.selection(R\R]R^tlist_nodes_selectRrR(RV((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyRs�s
cC@sy=|dr<tjttpd|dd|�tkr<tSWntk
rPnXi}tddddj|d�d	td
d|dddd
g�dtddtd�tj	d|d�d|kr^d|kr^|d}|r^ddl
m}m}y|t
j|d��}Wn%|k
rDtjd|d�q[Xt
j|�|d<q^nyt�}t||�}Wn4tk
r�}tjd|d|dtj�tSX||d<|d}	d|kr�|dtkr�|}
n
|d}
|d}|d}d|kr*t
j|d�}nRd|krPt
j|dd�}n,d |krvt
j|d d�}nt�tjd!|�t|d"d#d$�s�id%j|	�d&6St|	|
d'd(�s�tjd)|	|
�t�ntjd*|
|�t|
d+�sid,j|	�d&6Stjd-|td.d/�}
tjd0|t�}||d<|
|d1<||d0<||d2<||d0<td3|t�}tj	d4|d�tjd5|dtj|��tddd6d7j|d�d	td
d8|dddd
g�dtd�|S(9u�
    Create a single VM from a data dict

    CLI Example:

    .. code-block:: bash

        salt-cloud -p proxmox-ubuntu vmhostname
    uprofileuproxmoxROucloud.fire_eventueventustarting createusalt/cloud/{0}/creatingunametargsucloud.filter_eventucreatinguproviderudrivertsock_dirusock_dirt	transportu	transportuCreating Cloud VM %suuse_dnsu
ip_addressi(t
gethostbynametgaierroruResolving of %s faileduoError creating %s on PROXMOX

The following exception was thrown when trying to run the initial deployment: 
%stexc_info_on_loglevelu
creation_dataucloneuvmidunodeu
technologyu
public_ipsuprivate_ipsuUsing IP address %suupidttimeouti,u'Unable to create {0}, command timed outuErrorRVuactionuNode %s (%s) failed to start!u+Waiting for state "running" for vm %s on %surunningu&Unable to start {0}, command timed outussh_usernameRurootupassworduusernameussh_hostucloud.bootstrapuCreated Cloud VM '%s'u'%s' VM creation details:
%sucreated instanceusalt/cloud/{0}/createducreated(Rtis_profile_configuredRRR
tAttributeErrort	__utils__RR.R>tsocketRwRxRR#R/RItcreate_nodeR4R5tloggingtDEBUGRRtwait_for_createdtstarttwait_for_stateRtpprinttpformat(RORPtuse_dnsRwRxt
ip_addresstnewidRtexcR?RDthosttnodeTypetssh_usernametssh_password((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pytcreate�s�
	

"


	



	


	




"cC@sodjt�}tj|dt�}tjdtjtjB�}|j	|j
�d}tjj
j|�adS(u�
    Download https://<url>/pve-docs/api-viewer/apidoc.js
    Extract content of pveapi var (json formated)
    Load this json content into global variable "api"
    u.https://{0}:8006/pve-docs/api-viewer/apidoc.jsRu(?<=pveapi =)(.*)(?=^;)iN(RRRR2RtretcompiletDOTALLt	MULTILINEtfindallttextR\R]R!tloadstapi(R(R)t	re_filtertapi_json((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt_import_apims
uuGETc
@s�tdkrt�nt}g|jd�D]}|dkr,|^q,}d�g}t|dkrkgn|�}x@|d D]4}�d|7�t�fd�|D��d}qW�d|d7�t�fd�|D��}y |d|dd	j�}Wn#tk
r*}	tj	d
|	�nXxp|D]h}
t
jd|
�}|r�xGtd�D])}|j
|jd
�tj|��q]Wq2|j
|
�q2W|S(uM
    Return the parameter list from api for defined path and HTTP method
    u/ui����c3@s%|]}|d�kr|VqdS(upathN((t.0Ri(tsearch_path(s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pys	<genexpr>�suchildrenc3@s%|]}|d�kr|VqdS(upathN((R�Ri(R�(s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pys	<genexpr>�suinfou
parametersu
propertiesumethod not found: "%s"u
(\w+)\[n\]i
iN(R�R-R�RMtsettnexttkeystKeyErrorR.R5R�tmatchRtaddtgroupRR#(
tpathtmethodt
forced_paramstsubtleveltpath_levelstpropst
parameterstelemR�tpropt	numericalti((R�s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt_get_properties|s.
.$ 
*c
C@s�i}d|krd|d<n|ddCkrEtjd�t�nd|krvtjdt�tdt�|d<n|ddDkr�tjd	�t�n|d}||d
<x+dED]#}||kr�||||<q�q�W|ddkr;|d|d<|d|d<x�dFD]#}||kr||||<qqWnU|ddkr=|d|d<|d|d<dG}x7t	dd |�D]#}||kr�||||<q�q�Wd!|kr�|d!|d"<nd|kr�tj
d#�nd|kr�d|kr�d$|dd%|d<d&|kr:|dd'|d&|d<q:q�nS|ddkr�dH}x:t	d.d |�D]#}||krf||||<qfqfWntd/d0d1d2j|d�d3itd4d5|t
|��d66d7td8�tjd9|�d:|kr�|d:tkr�|ddkr�i}|d
|d;<x3dID]+}d>||kr5|d>|||<q5q5Wtd?d@j||dA�|�}n"td?dBj||d�|�}t||�S(Ju?
    Build and submit the requestdata to create a new node
    u
technologyuopenvzuqemuulxcuKWrong VM type. Valid options are: qemu, openvz (proxmox3) or lxc (proxmox4)uhostudefault_hostRu"No host given to create this VM onuvmiducpuunitsudescriptionumemoryuonbootunameuhostnameuimageu
ostemplateucpusudisku
ip_addressu
nameserverupassworduswapupoolidustorageucpulimiturootfsucoresunet0u/nodes/{node}/lxcuPOSTupubkeyussh-public-keysu@The "disk" option is not supported for LXC hosts and was ignoredubridge=vmbr0,ip=u/24,name=eth0,type=vethugwu,gw=uacpiucpuupoolusata0uostypeuide2u/nodes/{node}/qemuucloud.fire_eventueventurequesting instanceusalt/cloud/{0}/requestingRtucloud.filter_eventu
requestingukwargsRuusock_diru8Preparing to generate a node using these parameters: %s ucloneunewiduformatufulluclone_upostunodes/{0}/qemu/{1}/cloneu
clone_fromu
nodes/{0}/{1}(uqemuuopenvzulxcN(ucpuunitsudescriptionumemoryuonboot(ucpusudisku
ip_addressu
nameserverupassworduswapupoolidustorage(
ucpuunitsucpulimiturootfsucoresudescriptionumemoryuonbootunet0upasswordu
nameserveruswapustorageurootfs(	uacpiucoresucpuupoolustorageusata0uostypeuide2unet0(udescriptionuformatufulluname(R.R5RRRR	RR
R-R�twarningR}RtlistR/RR;RR(ROR�tnewnodetvmhostR�tstatic_propst
postParamsRN((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyR�s�

	
	



	
#	
 ,
%"cC@sD|dkrtd��nt�}td||tt�||S(u>
    Show the details from Proxmox concerning an instance
    uactionu<The show_instance action must be called with -a or --action.ucloud.cache_node(RRrR}RR(R?RVRd((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt
show_instances	uopenvzcC@s�|dkrqxbtjt��D]K\}}x<tddj||��D]}|d|krG|}qGqGWqWntddj|||��}|S(u
    Get VM configuration
    ugetu
nodes/{0}/{1}uvmidunodes/{0}/{1}/{2}/configN(R-RRCReR;R(RDRNt	node_typeRgRhRiR((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyR[s"i,cC@s�tj�}t|�}|s4tjd�t�nxwtr�d|krj|ddkrjtjd�tStjd�tj�||kr�tjd�tSt|�}q7WdS(u;
    Wait until a the vm has been created successfully
    uHwait_for_created: No task information retrieved based on given criteria.ustatusuOKuHost has been created!iu4Timeout reached while waiting for host to be createdN(	ttimeRUR.R5RRR/tsleepR
(RQRzt
start_timeR>((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyR�.s
		


cC@s�tj�}td|�}|s7tjd�t�nx�tr�|d|krktjd|d|�tStjd�tj�||kr�tjd|d|�tStd|�}tjd|d|d|�q:Wd	S(
u@
    Wait until a specific state has been reached on a node
    RDu8wait_for_state: No VM retrieved based on given criteria.ustatusuHost %s is now in "%s" state!unameiu1Timeout reached while waiting for %s to become %su%State for %s is: "%s" instead of "%s"N(	R�t
get_vm_statusR.R5RRR/R�R
(RDtstateRzR�RN((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyR�Ds"
		
		cC@s�|dkrtd��ntddddj|�di|d6d	td
dtd�t|�}|d!k	r�td
|d�ddkr�t||dd�nt|dd�s�idj|�d6St	j
d�tddj|d|d��tddddj|�di|d6d	td
dtd�tjdt
�tkrttd|tjd�dt�nidj|�d 6Sd!S("um
    Destroy a node.

    CLI Example:

    .. code-block:: bash

        salt-cloud --destroy mymachine
    ufunctionuEThe destroy action must be called with -d, --destroy, -a or --action.ucloud.fire_eventueventudestroying instanceusalt/cloud/{0}/destroyingRtunameRuusock_dirRvu	transportRDuvmidustatusustoppeduactionu%Unable to stop {0}, command timed outuErroriudeleteu
nodes/{0}/{1}unodeuidudestroyed instanceusalt/cloud/{0}/destroyeduupdate_cachedirucloud.delete_minion_cachediru:iu{0} was destroyed.u	DestroyedN(RR}RRRBR-R�tstopR�R�R�R;R2R
RRRM(R?RVtvmobj((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pytdestroy\s:





$c
C@s/tjd|||�|dk	rGtjd|||�t|�}n"tjd|||�t|�}|s�d|ks�d|ks�d|kr�tjd|||�t�ntjd|�td	d
j|d|d|d|��}t	||�}|t
k	r+|dk	r+tjd|�tSt
S(
u4
    Convenience function for setting VM status
    uSet status to %s for %s (%s)u(set_vm_status: via ID - VMID %s (%s): %su*set_vm_status: via name - VMID %s (%s): %sunodeutypeuvmidu#Unable to set status %s for %s (%s)u2VM_STATUS: Has desired info (%s). Setting status..upostunodes/{0}/{1}/{2}/status/{3}uSet_vm_status action result: %sN(R.R/R-RGRBR5RR;RRRR
R(tstatusR?RDR�Rtresult((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt
set_vm_status�s(	
	
+	
	!cC@s�|d
k	r+tjd|�t|�}n>|d
k	rVtjd|�t|�}ntjd�t�tjd|�|d
k	r�d|kr�tjd|d�tdd	j|d|d
|d��}|Stjd�t	S(uD
    Get the status for a VM, either via the ID or the hostname
    uget_vm_status: VMID %suget_vm_status: name %su"get_vm_status: No ID or NAME givenuVM found: %sunodeu.VM_STATUS: Has desired info. Retrieving.. (%s)unameugetu nodes/{0}/{1}/{2}/status/currentutypeuvmidu"VM or requested status not found..N(
R-R.R/RGRBRR;RR5R
(RDR?R�R((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyR��s"
	
cC@ss|dkrtd��ntjd||�td|d|�s_tjd||�t�nidj|�d6S(	uj
    Start a node.

    CLI Example:

    .. code-block:: bash

        salt-cloud -a start mymachine
    uactionu4The start action must be called with -a or --action.uStart: %s (%s) = StartustartRDuUnable to bring VM %s (%s) up..u{0} was started.uStarted(RR.R/R�R5RR(R?RDRV((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyR��s
	cC@s`|dkrtd��ntd|d|�sLtjd||�t�nidj|�d6S(u}
    Stop a node ("pulling the plug").

    CLI Example:

    .. code-block:: bash

        salt-cloud -a stop mymachine
    uactionu3The stop action must be called with -a or --action.ustopRDu!Unable to bring VM %s (%s) down..u{0} was stopped.uStopped(RR�R.R5RR(R?RDRV((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyR��s
	cC@s`|dkrtd��ntd|d|�sLtjd||�t�nidj|�d6S(uy
    Shutdown a node via ACPI.

    CLI Example:

    .. code-block:: bash

        salt-cloud -a shutdown mymachine
    uactionu7The shutdown action must be called with -a or --action.ushutdownRDu Unable to shut VM %s (%s) down..u{0} was shutdown.uShutdown(RR�R.R5RR(R?RDRV((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pytshutdowns
	(It__doc__t
__future__RRRR�R�R�R�tsalt.utils.cloudR\tsalt.utils.jsontsalt.configRtsalt.exceptionsRRRtsalt.extRtsalt.ext.six.movesRRRRtImportErrorR
tIPyRRt	getLoggert__name__R.RR
R	RR-RR"R$RR�R*R;RBRGRIRLRRRURZR=RcReRjRqRrRsR�R�R�RR�R[R�R�R�R�R�R�R�R�(((s=/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.pyt<module>sz





	
			2
			$	-	~	%	n8!

Zerion Mini Shell 1.0