Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/libcloud/compute/drivers/__pycache__/vsphere.cpython-39.pyc
Ðазад
a q�h�G � @ s@ d Z ddlZddlZzddlZe W n ey> ed��Y n0 ddlmZ ddlmZ ddlm Z m Z ddlmZ ddlmZ dd lmZ dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZmZ ddlm Z ddgZ!dZ"dZ#G dd� de�Z$G dd� de�Z%G dd� de%�Z&dS )z� VMware vSphere driver supporting vSphere v5.5. Note: This driver requires pysphere package (https://pypi.python.org/pypi/pysphere) which can be installed using pip. For more information, please refer to the official documentation. � NzRMissing "pysphere" dependency. You can install it using pip - pip install pysphere)�VIServer)�VITask)�VIMor�MORTypes)�VimService_services)�VIVirtualMachine)�wrap_non_libcloud_exceptions)�ConnectionUserAndKey)� LibcloudError)�InvalidCredsError)� NodeDriver)�NodeLocation)� NodeImage)�Node)� NodeState�Provider)�is_public_subnet�VSphereNodeDriver�VSphere_5_5_NodeDriver�5.5� c s6 e Zd Zd� fdd� Zdd� Zdd� Zd d � Z� ZS )�VSphereConnectionTNc sb |r|rt d��|r|} n|r$|} nt d��| | _d | _tt| �jf |||||||d�|�� d S )Nz-host and url arguments are mutually exclusivez0Either "host" or "url" argument must be provided)�user_id�key�secure�host�port�url�timeout)� ValueError�host_or_url�client�superr �__init__) �selfr r r r r r r �kwargsr �� __class__� ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/libcloud/compute/drivers/vsphere.pyr# = s ��zVSphereConnection.__init__c C s� t � | _tj�dd �}z | jj| j| j| jt |d� W nl t y� } zT|j}t|d�rdt |d|j�}t |dd �}|dkr�t|��t|| jd��W Y d }~n d }~0 0 t�| j� d S )NZLIBCLOUD_DEBUG)r �user�passwordZsock_timeout� trace_file�strerror�faultZInvalidLoginFault)�value�driver)r r! �os�environ�get�connectr r r �DEFAULT_CONNECTION_TIMEOUT� Exception�message�hasattr�getattrr r r0 �atexit�register� disconnect)r$ r, �er7 r. r( r( r) r4 R s"