0x1949 Team - FAZEMRX - MANAGER
Edit File: contract.cpython-310.pyc
o �(�f�w � @ s� d dl Z d dlZd dlZd dlmZ d dlmZmZmZm Z m Z d dlm m Z d dlmZmZmZmZmZmZmZmZmZ d dlmZ d dlmZ d dlmZ d dlm Z d d l!m"Z"m#Z# d d l$m%Z% d dl&m'Z' dZ(d Z)d Z*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2ddddd�Z3e�4� Z5e�6e�7e8��Z9edddg�Z:G dd� de%j;�Z<de=fdd �Z> !dHd"ed#ee?ef d$ee?ef d%e@d&e@d'dfd(d)�ZA * !dId"ed+ee?ef d,ee?ef d%e@d&e@d'e ee@f fd-d.�ZBd/ejCd'ejDfd0d1�ZEd"efd2d3�ZFd"ed'ee fd4d5�ZGd"ed6e?d'ee?ef fd7d8�ZHd9ee?e?f d:ee?e?f d'eIfd;d<�ZJ dJd=ee?ef d>e?d?e?de e? d'eeIee?ef f f d@dA�ZK dKd+ee?ef dBe e? de e? d'dfdCdD�ZLd"edEee?ef d'ee: fdFdG�ZMdS )L� N)� namedtuple)�Any�Dict�List�Optional�Tuple) �clouds�event_logger� exceptions�http�messages�secret_manager�system�util�version)�_enabled_services)�_is_attached)�UAConfig)�ATTACH_FAIL_DATE_FORMAT)�attachment_data_file�machine_id_file)� serviceclient)�get_user_or_root_log_file_pathz/v1/context/machines/tokenz3/v1/contracts/{contract}/context/machines/{machine}z /v1/resourcesz3/v1/resources/{resource}/context/machines/{machine}z/v1/clouds/{cloud_type}/tokenz3/v1/contracts/{contract}/machine-activity/{machine}z/v1/contractz/v1/magic-attach� � � � )�series_overrides�series�cloud�variant�EnableByDefaultService�namer c sj e Zd ZdZ d(dee ddf� fdd� Zeje j g d�d� d(d d ��Zdee ef fdd�Zd e dee ef fdd�Zeje j g d�d�dejfdd��Z d(de de dee dee ef fdd�Zdd� Zde dee ef fdd�Zdee ef fdd�Zde fdd �Z d(de d!e dee dee ef fd"d#�Z d(de d!e dee defd$d%�Zd&d'� Z� ZS ))�UAContractClient�contract_urlN�cfg�returnc s t � j|d� t�� | _d S )N�r% )�super�__init__�mtf�get_machine_token_file�machine_token_file)�selfr% �� __class__� �3/usr/lib/python3/dist-packages/uaclient/contract.pyr) E s zUAContractClient.__init__)r r r )�retry_sleepsc C s� |st �| j�}| �� }|�dd�|�i� | �� }|�� |d<