Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/libcloud/backup/drivers/__pycache__/gce.cpython-39.pyc
Ðазад
a q�h�A � @ s� d gZ ddlmZ ddlmZmZmZmZ ddlm Z m Z ddlmZm Z dZdZG dd � d e�ZG d d� de �ZG dd � d e�Zd S )�GCEBackupDriver� )� parse_date)�BackupDriver�BackupTargetRecoveryPoint�BackupTargetJob�BackupTarget)�BackupTargetType�BackupTargetJobStatusType)�GoogleResponse�GoogleBaseConnectionZv1� c @ s e Zd ZdS )�GCEResponseN)�__name__� __module__�__qualname__� r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/libcloud/backup/drivers/gce.pyr ! s r c sB e Zd ZdZdZeZd � fdd� Z� fdd�Z� fdd �Z � Z S )� GCEConnectiona{ Connection class for the GCE driver. GCEConnection extends :class:`google.GoogleBaseConnection` for 2 reasons: 1. modify request_path for GCE URI. 2. Implement gce_params functionality described below. If the parameter gce_params is set to a dict prior to calling request(), the URL parameters will be updated to include those key/values FOR A SINGLE REQUEST. If the response contains a nextPageToken, gce_params['pageToken'] will be set to its value. This can be used to implement paging in list: >>> params, more_results = {'maxResults': 2}, True >>> while more_results: ... driver.connection.gce_params=params ... driver.ex_list_urlmaps() ... more_results = 'pageToken' in params ... [<GCEUrlMap id="..." name="cli-map">, <GCEUrlMap id="..." name="lc-map">] [<GCEUrlMap id="..." name="web-map">] zwww.googleapis.comNc s: t t| �j||f|||d�|�� dt|f | _d | _d S )N)�secure� auth_type�credential_file�/compute/%s/projects/%s)�superr �__init__�API_VERSION�request_path� gce_params)�self�user_id�keyr r r �project�kwargs�� __class__r r r ? s ���zGCEConnection.__init__c s0 t t| ��||�\}}| jr(|�| j� ||fS )z� Update URL parameters with values from self.gce_params. @inherits: :class:`GoogleBaseConnection.pre_connect_hook` )r r �pre_connect_hookr �update)r �params�headersr"