%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/sos/report/plugins/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/subscription_manager.cpython-312.pyc

�

i��d���D�ddlmZmZddlZddlmZmZGd�dee�Zy)�)�Plugin�RedHatPluginN)�
NoOptionError�NoSectionErrorc�8�eZdZdZdZdZdZdZd�Zd�Z	d�Z
d	�Zy
)�SubscriptionManagerz subscription-manager information�subscription_manager)�system�packagemanager�sysmgmt)�/etc/rhsm/rhsm.conf)zsubscription-managerc��d}|jdd�}|r5|jdd�}|jdd�}|rd|z}d|�d|�|��}|jdd	�}|r&|r$|d
|zz
}|jdd�}|r|d|zz
}|S)
N��server�proxy_hostname�proxy_scheme�
proxy_port�:z--proxy �://�
proxy_userz --proxy-user %s�proxy_passwordz:%s)�get)�self�config�proxyrrrrrs        �I/usr/lib/python3/dist-packages/sos/report/plugins/subscription_manager.py�get_proxy_stringz$SubscriptionManager.get_proxy_strings��������H�.>�?���!�:�:�h��?�L����H�l�;�J�� �:�-�
��+7��+5�7�E��Z�Z��,�7�
��Z��'�*�4�4�E�#�Z�Z��2B�C�N�����/�/����c	���|jdd�dk7rdnd}|jdd�}t|�dkDrd|z}d	|�d
|jdd��|�|jdd���S)
Nr�insecure�1�sr�portrr�httpr�hostname�prefix)r�len)rr�securer#s    r�get_server_urlz"SubscriptionManager.get_server_url+sl���
�
�8�Z�8�C�?��R���z�z�(�F�+���t�9�q�=���:�D��$*�F�J�J�x��,L�$(�&�*�*�X�x�*H�J�	Jrc��|jgd��|jdd��|jdd��|jdd��|jgd	�d
��|jd|j�z�tjd
�}|j|D�cgc]}d|z��	c}d��d}d}	ddlm}|�}|j
|�}|j|�}d|�d|jdd��d|��}|jdd�}	|	rd|	i}|j||d��ycc}w#ttttf$rY�5wxYw)N)z
/etc/rhsm/z/var/lib/rhsm/z/var/log/rhsm/rhsm.logz/var/log/rhsm/rhsmcertd.logzsubscription-manager identity�subscription_manager_id)�tagsz$subscription-manager list --consumed�"subscription_manager_list_consumedz%subscription-manager list --installed�subscription_manager_installed)z%subscription-manager list --availablez+subscription-manager list --all --availablez#subscription-manager release --showz#subscription-manager release --listzsyspurpose showz&subscription-manager syspurpose --showzsubscription-manager statusT)�
cmd_as_tagzHrhsm-debug system --sos --no-archive --no-subscriptions --destination %sz/etc/pki/product-default/*.pemzrct cat-cert %s�*subscription_manager_installed_product_idszccurl -vv --cacert /etc/rhsm/ca/redhat-uep.pem https://subscription.rhsm.redhat.com:443/subscriptionr)�get_config_parserz	curl -vv z
 --cacert �rhsm�repo_ca_cert� r�no_proxy�NO_PROXY�)�env�timeout)
�
add_copy_spec�add_cmd_output�get_cmd_output_path�glob�rhsm.configr1rr)r�ModuleNotFoundError�ImportErrorrr)
r�certs�cert�curlcmdr8r1rr�
server_urlr5s
          r�setupzSubscriptionManager.setup5s������+�	,�
	
���;�!:�	�	<����B�!E�	�	G����C�!A�	�	C����
��	�	�	
���B�"�6�6�8�9�	:��	�	�:�;�����%�H�$�.��5�H�!M�	�	O�J����	�5�&�(�F��)�)�&�1�E��,�,�V�4�J�!��z�z�&�.�9���G�
�z�z�(�J�7�H��!�8�,��	
���G��b��9��/I��($�[�-�� �	��	�s�(D9�A"D>�>E�Ec�`�d}d}|jd||�d}d}|jd||�y)Nz"(proxy_password(\s)*=(\s)*)(\S+)\nz\1********\nr
z(password(\s)*=(\s)*)(\S+)\nz/var/lib/rhsm/repo_server_val/*)�do_path_regex_sub)r�	passwdreg�repl�regexps    r�postproczSubscriptionManager.postprocis>��9�	������4�i��F�1�������@�&�$�OrN)�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�files�packagesrr)rErK�rrrrs2��3�J�(�K�6�H�$�E�(�H��&J�2:�hPrr)�sos.report.pluginsrrr=�configparserrrrrTrr�<module>rWs"��4��6�iP�&�,�iPr

Zerion Mini Shell 1.0