Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/uaclient/__pycache__/ |
Upload File : |
o F��c� � @ s� d dl Z d dlZd dlZd dlmZ d dlmZmZm Z m Z mZ d dlm Z d dlmZ d dlmZmZmZmZmZ G dd� de jd �ZdS ) � N)�join)�Any�Dict�Optional�Tuple�Type)�error)� urlencode)�config� exceptions�system�util�versionc @ s� e Zd ZdZdZeejdee fdd���Z eejdefdd���Zdde ej ddfd d �Zdd� Z ddede e fdd�Zdefdd�Zdedee eeef e eeef f fdd�ZdS )�UAServiceClient� N�returnc C � dS )z1Set in subclasses to the type of API error raisedN� ��selfr r �8/usr/lib/python3/dist-packages/uaclient/serviceclient.py� api_error_cls � zUAServiceClient.api_error_clsc C r )z@String in subclasses, the UAConfig attribute containing base urlNr r r r r �cfg_url_base_attr r z!UAServiceClient.cfg_url_base_attr�cfgc C s, |st �� dk}tj|d�| _d S || _d S )Nr )� root_mode)�os�getuidr �UAConfigr )r r r r r r �__init__ s zUAServiceClient.__init__c C s d� t�� �ddd�S )NzUA-Client/{}�application/json)z user-agent�accept�content-type)�formatr �get_versionr r r r �headers&