Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/cinderclient/v3/__pycache__/volumes.cpython-39.pyc
Ðазад
a t�hs. � @ s\ d Z ddlmZ ddlmZ ddlmZ ddlmZ G dd� dej�ZG dd� dej �Z d S ) z Volume interface (v3 extension).� )�api_versions)�base)�volumesc @ s2 e Zd Zddd�Zdd� Zddd�Zd d d �ZdS )�VolumeNc C s^ | j jt�d�krJ|du rdn|}|du r.dn|}| j �| ||||||�S | j �| ||||�S )ah Upload a volume to image service as an image. :param force: Boolean to enables or disables upload of a volume that is attached to an instance. :param image_name: The new image name. :param container_format: Container format type. :param disk_format: Disk format type. :param visibility: The accessibility of image (allowed for 3.1-latest). :param protected: Boolean to decide whether prevents image from being deleted (allowed for 3.1-latest). :returns: tuple (response, body) �3.1N�privateF)�manager�api_versionr Z APIVersion�upload_to_image)�self�force� image_name�container_format�disk_format� visibility� protected� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/cinderclient/v3/volumes.pyr s ��zVolume.upload_to_imagec C s | j �| |� dS )zRevert a volume to a snapshot.N)r �revert_to_snapshot)r �snapshotr r r r 2 s zVolume.revert_to_snapshotc C s | j �| ||||�S )z!Migrate the volume to a new host.)r �migrate_volume)r �host�force_host_copy�lock_volume�clusterr r r r 6 s �zVolume.migrate_volumeFc C s | j j||||||||| d� S )�Manage an existing volume.) r �ref�name�description�volume_type�availability_zone�metadata�bootabler )r �manage) r r r r r r r r! r"