File: //usr/lib/python3/dist-packages/sos/upload/__pycache__/__init__.cpython-312.pyc
�
([Qhn3 � �^ � d dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dlm Z G d� de� Z
y)� N)�SoSComponent)�_sos)�__version__c � � � e Zd ZdZdZi dd�dd�dd�dd �d
d �dd �dd �d
d�dd�dd�dd�dd �dd �dd �dd �dd �dd �Z d&� fd� Zed� � Zed� � Z d� Z
d� Zd� Zd� Z
d � Zed!� � Zed"� � Zed#� � Zd$� Zd%� Z� xZS )'� SoSUploadz�
This class is designed to upload files to a distribution
defined location. These files can be either sos reports,
sos collections, or other kind of files like: vmcores,
application cores, logs, etc.
z9Upload a file to a user or policy defined remote location�upload_file� �case_id�low_priorityF�
upload_urlN�upload_directory�upload_user�upload_pass�
upload_method�auto�upload_no_ssl_verify�upload_protocol�upload_s3_endpointzhttps://s3.amazonaws.com�upload_s3_region�upload_s3_bucket�upload_s3_access_key�upload_s3_secret_key�upload_s3_object_prefix�
upload_targetc �8 �� |st �| � |||� d| _ nb|d | _ |d | _ |d | _ || _ || _ || _ || _ t j d� | _ d| _ || _
| j � | _ d | _ y )NT�options�policy�manifest�sos_uiF)�super�__init__�from_cmdline�optsr r �parser�cmdline�args�_upload_file�logging� getLogger�ui_log�archive�load_upload_targets�upload_targetsr )�selfr$ r&