Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/openstack/image/v2/__pycache__/image.cpython-39.pyc
Ðазад
a u�hY@ � @ sN d dl mZ d dlmZ d dl mZ d dl mZ G dd� dejejej�Z dS )� )� exceptions)� _download)�resource)�utilsc st e Zd ZdZdZdZdZdZdZdZ dZ dZdZe jddddd d ddd dddddddd�ZdZe �d�Ze �d�Ze �d�Ze �d�Ze jded�Ze jded�Ze �d�Ze �d�Ze �d�Ze �d�Ze �d�Ze jddd �Ze jddd �Ze �d!�Z e jd"e!d�Z"e �d#�Z#e �d �Z$e �d�Z%e �d$�Z&e �d�Z'e �d%�Z(e �d&�Z)e �d'�Z*e �d(�Z+e jd)e,d�Z-e �d*�Z.e �d+�Z/e jd,e0d�Z1e �d-�Z2e �d.�Z3e �d/�Z4e �d0�Z5e �d1�Z6e �d2�Z7e jd3e!d�Z8e �d4�Z9e �d5�Z:e jd6e!d�Z;e jd7e!d�Z<e jd8e!d�Z=e �d9�Z>e �d:�Z?e �d;�Z@e �d<�ZAe �d=�ZBe �d>�ZCe jd?e!d�ZDe �d@�ZEe jdAe!d�ZFe �dB�ZGe �dC�ZHe �dD�ZIe jdEed�ZJe jdFed�ZKe �dG�ZLe �dH�ZMe �dI�ZNe �dJ�ZOe �dK�ZPe jdLed�ZQe jdMed�ZRe �dN�ZSdOdP� ZTdQdR� ZUdSdT� ZVdUdV� ZWdWdX� ZXdcdZd[�ZY� fd\d]�ZZdd� fd_d`� Z[e\de� fdadb� �Z]� Z^S )f�ImageZimagesz/imagesT�PATCH�name� visibilityZ member_status�owner�statusZsize_minZsize_maxZ protected� is_hidden�sort_keyZsort_dir�sort�tag� created_at� updated_atZ os_hidden)r N�checksum�container_format�disk_format)�typeZos_hash_algoZ os_hash_value�min_disk�min_ram�owner_id)�alias� properties�size�store�virtual_size�file� locations� direct_url�url�metadata�architecture�hypervisor_type�instance_type_rxtx_factor� instance_uuidZimg_config_drive� kernel_id� os_distro� os_versionZos_secure_boot�os_shutdown_timeout� ramdisk_id�vm_mode�hw_cpu_sockets�hw_cpu_cores�hw_cpu_threads�hw_disk_bus� hw_cpu_policy�hw_cpu_thread_policy�hw_rng_model�hw_machine_type� hw_scsi_model�hw_serial_port_count�hw_video_model�hw_video_ram�hw_watchdog_action�os_command_line�hw_vif_modelZhw_vif_multiqueue_enabledZhw_boot_menu�vmware_adaptertype� vmware_ostypeZauto_disk_config�os_type� os_admin_user�hw_qemu_guest_agent�os_require_quiesce�schemac C s t �| j| jd|�}|�|�S )zCall an action on an image ID.�actions)r �urljoin� base_path�id�post)�self�session�actionr! � rK ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/openstack/image/v2/image.py�_action� s z Image._actionc C s | � |d� dS )z~Deactivate an image Note: Only administrative users can view image locations for deactivated images. � deactivateN�rM �rH rI rK rK rL rN � s zImage.deactivatec C s | � |d� dS )z\Reactivate an image Note: The image must exist in order to be reactivated. � reactivateNrO rP rK rK rL rQ � s zImage.reactivatec C s* t �| j| jd�}|j|| jddd�d�S )z"Upload data into an existing imager �application/octet-stream� �zContent-Type�Accept��data�headers)r rD rE rF �putrW )rH rI r! rK rK rL �upload� s ��zImage.uploadc C s<