ruạṛ
a ���f�1 � @ s d Z ddlZddlZddlZddlZzddlmZmZ W n" eyZ ddl mZmZ Y n0 ddl mZmZm Z mZ daddddd d ddd ddddg d�fdd�Zg d�ZG dd� d�ZG dd� d�Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd.d)d*�Zd/d,d-�ZdS )0zj This module includes the Config and Up2date Config classes use by the up2date agent to hold config info. � N)�urlsplit� urlunsplit)�ustr�sstr�idn_ascii_to_puny�idn_puny_to_unicode)zUse a HTTP Proxyr )zRemote server URLz#https://your.server.url.here/XMLRPC)z#Whether or not debugging is enabledr )zLocation of system idz/etc/sysconfig/rhn/systemid)z4Override the automatically determined system version� )z;HTTP proxy in host:port format, e.g. squid.example.com:3128r )z'The username for an authenticated proxyr )z.The password to use for an authenticated proxyr )z$To use an authenticated proxy or notr )zBNumber of attempts to make at network connections before giving up� )z)The CA cert used to verify the ssl serverz'/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT)zDisable the reboot actionr zDConfig options that can not be overwritten by a config update action)� sslCACert� serverURL�disallowConfChanges�noReboot)z<Use the defined httpProxy setting for external communicationr )ZenableProxyr �debug�systemIdPathZversionOverride� httpProxy� proxyUser� proxyPasswordZenableProxyAuthZnetworkRetriesr r r ZenableExternalProxy)r r ZtmpDirc @ sl e Zd ZdZddd�Zddd�Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� Zdd� Z dd� ZdS )� ConfigFilez;class for handling persistent config options for the clientNc C s i | _ || _| jr| �� d S �N)�dict�fileName�load��self�filename� r �9/usr/share/oracle-cloud-agent/plugins/osms/osms/config.py�__init__@ s zConfigFile.__init__c C s� |r || _ | j d krd S t�| j tj�s,d S t| j d�}d}|�� D �]�}|�d�dkrZqD||�� }|slqD|d dkr�|d d� �� }qDnd}|�dd�}t |�d kr�qD|d �� }t |d �� �}d }|�d �} | dkr�|d | � }|}d }|�rr|�d�} |dv �rt|�t �� ��}nTt | �dk�rPzt|�}W n t�yL Y n0 n"| d dk�rdg }nd d� | D �}||f}|| jv �r�| j| }|d u�r�||d f}|d u�r�|d |f}|| j|<