golden hour
/opt/saltstack/salt/lib/python3.10/site-packages/salt/cloud/clouds/__pycache__
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.cpython-310.pyc
171 B
Del
OK
aliyun.cpython-310.pyc
19.81 KB
Del
OK
azurearm.cpython-310.pyc
39.67 KB
Del
OK
clc.cpython-310.pyc
8.91 KB
Del
OK
cloudstack.cpython-310.pyc
10.87 KB
Del
OK
digitalocean.cpython-310.pyc
27.39 KB
Del
OK
dimensiondata.cpython-310.pyc
12.62 KB
Del
OK
ec2.cpython-310.pyc
92.28 KB
Del
OK
gce.cpython-310.pyc
48.78 KB
Del
OK
gogrid.cpython-310.pyc
11.07 KB
Del
OK
hetzner.cpython-310.pyc
11.82 KB
Del
OK
joyent.cpython-310.pyc
22.78 KB
Del
OK
libvirt.cpython-310.pyc
16.69 KB
Del
OK
linode.cpython-310.pyc
59.17 KB
Del
OK
lxc.cpython-310.pyc
10.9 KB
Del
OK
msazure.cpython-310.pyc
71.44 KB
Del
OK
oneandone.cpython-310.pyc
18.39 KB
Del
OK
opennebula.cpython-310.pyc
90.2 KB
Del
OK
openstack.cpython-310.pyc
23.53 KB
Del
OK
packet.cpython-310.pyc
12.06 KB
Del
OK
parallels.cpython-310.pyc
11.89 KB
Del
OK
profitbricks.cpython-310.pyc
25.34 KB
Del
OK
proxmox.cpython-310.pyc
27.25 KB
Del
OK
pyrax.cpython-310.pyc
2.59 KB
Del
OK
qingcloud.cpython-310.pyc
16.64 KB
Del
OK
saltify.cpython-310.pyc
11.91 KB
Del
OK
scaleway.cpython-310.pyc
9.36 KB
Del
OK
softlayer.cpython-310.pyc
13.26 KB
Del
OK
softlayer_hw.cpython-310.pyc
13.5 KB
Del
OK
tencentcloud.cpython-310.pyc
20.55 KB
Del
OK
vagrant.cpython-310.pyc
8.32 KB
Del
OK
virtualbox.cpython-310.pyc
9.57 KB
Del
OK
vmware.cpython-310.pyc
94.14 KB
Del
OK
vultrpy.cpython-310.pyc
12.8 KB
Del
OK
xen.cpython-310.pyc
25.66 KB
Del
OK
Edit: vmware.cpython-310.pyc
o �xet� � @ s^ d Z ddlZddlZddlZddlZddlZddlZddlm Z ddl mZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlmZ z ddlmZ dZW n eyU dZY nw zddlmZ e� W n eyj Y nw d Zd ZdZdZd ZdZdZ e�!e"�Z#dZ$dd� Z%dd� Z&dd� Z'dd� Z(dd� Z)dd� Z*dd� Z+d�dd �Z, ! d�d"d#�Z- d�d$d%�Z. d�d&d'�Z/d(d)� Z0d*d+� Z1d,d-� Z2d.d/� Z3d0d1� Z4d2d3� Z5d4d5� Z6d6d7� Z7d�d8d9�Z8d:d;� Z9d�d<d=�Z:d>d?� Z;d@dA� Z<dBdC� Z=d�dFdG�Z>dHdI� Z?dJdK� Z@d�dMdN�ZAdOdP� ZBdQdR� ZCd�dSdT�ZDdUdV� ZEd�dWdX�ZFd�dYdZ�ZGd�d[d\�ZHd�d]d^�ZId�d_d`�ZJd�dadb�ZKd�dcdd�ZLd�dedf�ZMd�dgdh�ZNd�didj�ZOd�dkdl�ZPd�dmdn�ZQd�dodp�ZRd�dqdr�ZSd�dsdt�ZTd�dudv�ZUd�dwdx�ZVd�dydz�ZWd�d{d|�ZXd�d}d~�ZYd�dd��ZZd�d�d��Z[d�d�d��Z\d�d�d��Z]d�d�d��Z^d�d�d��Z_d�d�d��Z`d�d�� Zad�d�� Zbd�d�� Zcd�d�� Zdd�d�d��Zed�d�d��Zfd�d�d��Zgd�d�d��Zhd�d�d��Zid�d�d��Zjd�d�d��Zkd�d�d��Zld�d�d��Zmd�d�d��Znd�d�d��Zod�d�d��Zpd�d�d��Zqd�d�d��Zrd�d�d��Zsd�d�d��Ztd�d�d��Zud�d�d��Zvd�d�d��Zwd�d�d��Zxd�d�d��Zyd�d�d��Zzd�d�dZ{d�d�dĄZ|d�d�dƄZ}d�d�dȄZ~dS )�aH VMware Cloud Module =================== .. versionadded:: 2015.5.4 The VMware cloud module allows you to manage VMware ESX, ESXi, and vCenter. See :ref:`Getting started with VMware <cloud-getting-started-vmware>` to get started. :codeauthor: Nitin Madhok <nmadhok@g.clemson.edu> Dependencies ============ - pyVmomi Python Module pyVmomi ------- PyVmomi can be installed via pip: .. code-block:: bash pip install pyVmomi .. note:: Version 6.0 of pyVmomi has some problems with SSL error handling on certain versions of Python. If using version 6.0 of pyVmomi, Python 2.6, Python 2.7.9, or newer must be present. This is due to an upstream dependency in pyVmomi 6.0 that is not supported in Python versions 2.7 to 2.7.8. If the version of Python is not in the supported range, you will need to install an earlier version of pyVmomi. See `Issue #29537`_ for more information. .. _Issue #29537: https://github.com/saltstack/salt/issues/29537 Based on the note above, to install an earlier version of pyVmomi than the version currently listed in PyPi, run the following: .. code-block:: bash pip install pyVmomi==5.5.0.2014.1.1 The 5.5.0.2014.1.1 is a known stable version that this original VMware cloud driver was developed against. .. note:: Ensure python pyVmomi module is installed by running following one-liner check. The output should be 0. .. code-block:: bash python -c "import pyVmomi" ; echo $? Configuration ============= To use this module, set up the vCenter or ESX/ESXi URL, username and password in the cloud configuration at ``/etc/salt/cloud.providers`` or ``/etc/salt/cloud.providers.d/vmware.conf``: .. code-block:: yaml my-vmware-config: driver: vmware user: 'DOMAIN\user' password: 'verybadpass' url: '10.20.30.40' vcenter01: driver: vmware user: 'DOMAIN\user' password: 'verybadpass' url: 'vcenter01.domain.com' protocol: 'https' port: 443 vcenter02: driver: vmware user: 'DOMAIN\user' password: 'verybadpass' url: 'vcenter02.domain.com' protocol: 'http' port: 80 esx01: driver: vmware user: 'admin' password: 'verybadpass' url: 'esx01.domain.com' .. note:: Optionally, ``protocol`` and ``port`` can be specified if the vCenter server is not using the defaults. Default is ``protocol: https`` and ``port: 443``. .. note:: .. versionchanged:: 2015.8.0 The ``provider`` parameter in cloud provider configuration was renamed to ``driver``. This change was made to avoid confusion with the ``provider`` parameter that is used in cloud profile configuration. Cloud provider configuration now uses ``driver`` to refer to the salt-cloud driver that provides the underlying functionality to connect to a cloud provider, while cloud profile configuration continues to use ``provider`` to refer to the cloud provider configuration that you define. To test the connection for ``my-vmware-config`` specified in the cloud configuration, run :py:func:`test_vcenter_connection` � N)�randint)�SaltCloudSystemExit)�vimTF)�disable_warningszVMware ESXi 5.5�� Z%moveAllDiskBackingsAndDisallowSharingZ"moveAllDiskBackingsAndAllowSharingZmoveChildMostDiskBackingZcreateNewChildDiskBackingz[^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$�vmwarec C s t � du rdS t� du rdS tS )zL Check for VMware configuration and if required libs are available. F)�get_configured_provider�get_dependencies�__virtualname__� r r �L/opt/saltstack/salt/lib/python3.10/site-packages/salt/cloud/clouds/vmware.py�__virtual__� s r c C s"