| Server IP : 162.144.4.212 / Your IP : 216.73.216.108 Web Server : Apache System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64 User : cozeellc ( 2980) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.9/site-packages/dnf-plugins/__pycache__/ |
Upload File : |
a
���f�, � @ s@ d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dl Zd dl
mZmZ d dl
Z
ej�d d� d dlmZ d dlmZ d dlmZ d dlmZmZmZ d Zed
�Zed�Zed�Zed
�Zed�Zed�Zed�Z ed�Z!G dd� dej"�Z#G dd� dej$j%�Z&dd� Z'G dd� de(�Z)dd� Z*dd� Z+dS )� N)�PRIO_PLUGINCONFIG)�_�loggerz*/usr/share/oracle-cloud-agent/plugins/osms)�actions)�config)�ustr)�
get_cacert� get_proxy�
OsmsServerz
_osms.jsonz)OSMS based repositories will be disabled.z2There was an error communicating with OSMS server.z/This system is not registered with OSMS server.z2This system is receiving updates from OSMS server.z�For security reasons packages from OSMS based repositories can be verified only with locally installed gpg keys. GPG key '%s' has been rejected.z.Package profile information could not be sent.z/Missing required login information for OSMS: %sz9OSMS plugin has to be run under with the root privileges.c sJ e Zd ZdZ� fdd�Zdd� Zddd�Zd d
� Zdd� Zd
d� Z � Z
S )�
OsmsPluginZ
osmspluginc s t t| ��||� || _|| _tj�| jjj t
�| _d| _i | _
t�| jj�| _| �| j�| _d| j�� v r�| j�d�}|D ]\}}| j�||t� q|tj�� s�t�t� d| j_| jjs�d S | jjdkr�d}n"| jjdkr�d}n| jjdk r�d}t|� t�d� | �� d S )NF�main� �INFO�DEBUG�WARNINGzinitialized OSMS plugin) �superr �__init__�base�cli�os�path�join�conf�
persistdir�STORED_CHANNELS_NAME�stored_channels_path�connected_to_osms�up2date_cfg�copy�read_config�parser�sections�items�
_set_valuer �dnf�util� am_i_rootr �warning�MUST_BE_ROOT�enabled�
debuglevel�init_root_logger�debug�activate_channels)�selfr r �options�key�value� log_level�� __class__� �:/usr/lib/python3.9/site-packages/dnf-plugins/osmsplugin.pyr , s4
zOsmsPlugin.__init__c C s | j jsd S | jrd| jj_d S )NT)r r) r �demands� root_user�r. r5 r5 r6 r H s zOsmsPlugin.configTc
C s< i }d }d}d }d }d }d }| � � } |s0| }�nDt�� | _t| jdd�\}}}t| j�}| jd }zt| jjd�� � }W n6 t
y� }
zt�dt
t|
� W Y d }
~
d S d }
~
0 0 t�� }|r�|s�t�dtt� | �i � d S zt| jjd�j�|�}W n8 t
�y. }
zt�dt
t|
� W Y d }
~
d S d }
~
0 0 d| _t�t� |D ]$}
|
d �rDt|
�� �||
d <