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/entitlements/__pycache__/ |
Upload File : |
o F��c-5 � @ s$ d dl Z d dlZd dlmZmZmZmZmZ d dlm Z m Z mZmZm Z mZmZ d dlmZmZ d dlmZ d dlmZ ddgZd Zd Zddd �ZdZe �� Z ddedeee ddfdd�Z d dee dee deee ddfdd�Z!dedee fdd�Z"G dd� de�Z#dd� Z$dS )!� N)�Any�Dict�List�Optional�Tuple)�apt�event_logger� exceptions�messages�snap�system�util)�IncompatibleService� UAEntitlement)�ApplicationStatus)�StaticAffordanceg �?g �?z http-proxyzhttps-proxyz)Invalid Auth-Token provided to livepatch.z2Your running kernel is not supported by Livepatch.)zUnknown Auth-Tokenzunsupported kernelz/snap/bin/canonical-livepatch� protocol_type�retry_sleeps�returnc C s, t �t�sdS t jtdd�| �g|d� dS )a� Unset livepatch configuration settings for http and https proxies. :param protocol_type: String either http or https :param retry_sleeps: Optional list of sleep lengths to apply between retries. Specifying a list of [0.5, 1] tells subp to retry twice on failure; sleeping half a second before the first retry and 1 second before the second retry. N�configz {}-proxy=�r )r �which� LIVEPATCH_CMD�subp�format)r r � r �A/usr/lib/python3/dist-packages/uaclient/entitlements/livepatch.py�unconfigure_livepatch_proxy s �r � http_proxy�https_proxyc C sb | s|rt �tjjtjd�� | rtjt dd�| �g|d� |r/tjt dd�|�g|d� dS dS )a� Configure livepatch to use http and https proxies. :param http_proxy: http proxy to be used by livepatch. If None, it will not be configured :param https_proxy: https proxy to be used by livepatch. If None, it will not be configured :@param retry_sleeps: Optional list of sleep lengths to apply between snap calls )�servicer z http-proxy={}r zhttps-proxy={}N) �event�infor �SETTING_SERVICE_PROXYr �LivepatchEntitlement�titler r r �r r r r r r �configure_livepatch_proxy4 s"