관리-도구
편집 파일: __init__.cpython-38.pyc
U /?�f�+ � @ s� d Z ddlZddlZddlZddlZddlmZ ddlm Z ddl mZ ddlm Z G dd � d e�ZG d d� de�ZG dd � d e�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�Ze dddd�Ze dddd�Ze dddd�Ze dddd�Ze dd dd�Ze d!d"dd�Ze d#d$dd�Ze d%d&dd�Ze d'd(dd�Ze d)d*dd�Ze d+d,dd�Z e d-d.dd�Z!e d/d0dd�Z"e d1d2dd�Z#dd3l$m%Z% G d4d5� d5ej&j'�Z(G d6d7� d7ej&j)�Z*dS )8z= PyONE is an implementation of Open Nebula XML-RPC bindings. � N)�string_types)�IntEnum)�bindings� )�cast2onec @ s e Zd ZdS )�OneExceptionN��__name__� __module__�__qualname__� r r �</opt/hc_python/lib/python3.8/site-packages/pyone/__init__.pyr ! s r c @ s e Zd ZdS )�OneAuthenticationExceptionNr r r r r r % s r c @ s e Zd ZdS )�OneAuthorizationExceptionNr r r r r r ) s r c @ s e Zd ZdS )�OneNoExistsExceptionNr r r r r r - s r c @ s e Zd ZdS )�OneActionExceptionNr r r r r r 1 s r c @ s e Zd ZdS )�OneApiExceptionNr r r r r r 5 s r c @ s e Zd ZdS )�OneInternalExceptionNr r r r r r 9 s r �DATASTORE_TYPESzIMAGE SYSTEM FILE)�start�DATASTORE_STATESzREADY DISABLED� DISK_TYPESzFILE CD_ROM BLOCK RBD�HISTORY_ACTIONa none migrate live-migrate shutdown shutdown-hard undeploy undeploy-hard hold release stop suspend resume boot delete delete-recreate reboot reboot-hard resched unresched poweroff poweroff-hard disk-attach disk-detach nic-attach nic-detach disk-snapshot-create disk-snapshot-delete terminate terminate-hard disk-resize deploy chown chmod updateconf rename resize update snapshot-resize snapshot-delete snapshot-revert disk-saveas disk-snapshot-revert recover retry monitor�HOST_STATESzINIT MONITORING_MONITORED MONITORED ERROR DISABLED MONITORING_ERROR MONITORING_INIT MONITORING_DISABLED OFFLINE�HOST_STATUSzENABLED DISABLED OFFLINE�IMAGE_STATESzaINIT READY USED DISABLED LOCKED ERROR CLONE DELETE USED_PERS LOCKED_USED LOCKED_USED_PERS�IMAGE_TYPESz1OS CDROM DATABLOCK KERNEL RAMDISK CONTEXT� LCM_STATEa LCM_INIT PROLOG BOOT RUNNING MIGRATE SAVE_STOP SAVE_SUSPEND SAVE_MIGRATE PROLOG_MIGRATE PROLOG_RESUME EPILOG_STOP EPILOG SHUTDOWN CANCEL FAILURE CLEANUP_RESUBMIT UNKNOWN HOTPLUG SHUTDOWN_POWEROFF BOOT_UNKNOWN BOOT_POWEROFF BOOT_SUSPENDED BOOT_STOPPED CLEANUP_DELETE HOTPLUG_SNAPSHOT HOTPLUG_NIC HOTPLUG_SAVEAS HOTPLUG_SAVEAS_POWEROFF HOTPLUG_SAVEAS_SUSPENDED SHUTDOWN_UNDEPLOY EPILOG_UNDEPLOY PROLOG_UNDEPLOY BOOT_UNDEPLOY HOTPLUG_PROLOG_POWEROFF HOTPLUG_EPILOG_POWEROFF BOOT_MIGRATE BOOT_FAILURE BOOT_MIGRATE_FAILURE PROLOG_MIGRATE_FAILURE PROLOG_FAILURE EPILOG_FAILURE EPILOG_STOP_FAILURE EPILOG_UNDEPLOY_FAILURE PROLOG_MIGRATE_POWEROFF PROLOG_MIGRATE_POWEROFF_FAILURE PROLOG_MIGRATE_SUSPEND PROLOG_MIGRATE_SUSPEND_FAILURE BOOT_UNDEPLOY_FAILURE BOOT_STOPPED_FAILURE PROLOG_RESUME_FAILURE PROLOG_UNDEPLOY_FAILURE DISK_SNAPSHOT_POWEROFF DISK_SNAPSHOT_REVERT_POWEROFF DISK_SNAPSHOT_DELETE_POWEROFF DISK_SNAPSHOT_SUSPENDED DISK_SNAPSHOT_REVERT_SUSPENDED DISK_SNAPSHOT_DELETE_SUSPENDED DISK_SNAPSHOT DISK_SNAPSHOT_REVERT DISK_SNAPSHOT_DELETE PROLOG_MIGRATE_UNKNOWN PROLOG_MIGRATE_UNKNOWN_FAILURE DISK_RESIZE DISK_RESIZE_POWEROFF DISK_RESIZE_UNDEPLOYED HOTPLUG_NIC_POWEROFF HOTPLUG_RESIZE HOTPLUG_SAVEAS_UNDEPLOYED HOTPLUG_SAVEAS_STOPPED�MARKETPLACEAPP_STATESz(INIT READY LOCKED ERROR DISABLED�MARKETPLACEAPP_TYPESz1UNKNOWN IMAGE VMTEMPLATE SERVICE_TEMPLATE�PAGINATED_POOLSzLVM_POOL IMAGE_POOL TEMPLATE_POOL VN_POOL DOCUMENT_POOL SECGROUP_POOL�REMOVE_VNET_ATTRSzgAR_ID BRIDGE CLUSTER_ID IP MAC TARGET NIC_ID NETWORK_ID VN_MAD SECURITY_GROUPS VLAN_ID �VM_STATEzjINIT PENDING HOLD ACTIVE STOPPED SUSPENDED DONE FAILED POWEROFF UNDEPLOYED CLONING CLONING_FAILURE)�marketapp_exportc @ sJ e Zd ZdZddd�Zdd� Zdd � Zd d� Zdd � Zdd� Z dd� Z dS )� OneServerzB XML-RPC OpenNebula Server Slightly tuned ServerProxy NTc K s^ || _ |rt�|� dti| _t� }|�|�d�� |�|� t j jj| |fd|i|�� dS )a� Override the constructor to take the authentication or session Will also configure the socket timeout :param uri: OpenNebula endpoint :param session: OpenNebula authentication session :param timeout: Socket timetout :param https_verify: if https cert should be verified :param options: additional options for ServerProxy zmarketapp.export�https� transportN) �_OneServer__session�socket�setdefaulttimeoutr# �_OneServer__helpers�RequestsTransport� set_https� startswith�set_https_verify�xmlrpc�client�ServerProxy�__init__)�self�uri�session�timeout�https_verify�optionsr&