%PDF- %PDF-
Direktori : /lib/python3/dist-packages/sos/report/plugins/__pycache__/ |
Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/subscription_manager.cpython-312.pyc |
� i��d� � �D � d dl mZmZ d dlZd dlmZmZ G d� dee� Zy)� )�Plugin�RedHatPluginN)� NoOptionError�NoSectionErrorc �8 � e Zd ZdZdZdZdZdZd� Zd� Z d� Z d � Zy )�SubscriptionManagerz subscription-manager information�subscription_manager)�system�packagemanager�sysmgmt)�/etc/rhsm/rhsm.conf)zsubscription-managerc � � d}|j dd� }|r5|j dd� }|j dd� }|rd|z }d|�d|�|��}|j dd � }|r&|r$|d |z z }|j dd� }|r|d|z z }|S ) N� �server�proxy_hostname�proxy_scheme� proxy_port�:z--proxy �://� proxy_userz --proxy-user %s�proxy_passwordz:%s)�get)�self�config�proxyr r r r r s �I/usr/lib/python3/dist-packages/sos/report/plugins/subscription_manager.py�get_proxy_stringz$SubscriptionManager.get_proxy_string s� � ������H�.>�?���!�:�:�h��?�L����H�l�;�J�� �:�-� ��+7��+5�7�E��Z�Z��,�7� ��Z��'�*�4�4�E�#�Z�Z��2B�C�N�����/�/���� c �� � |j dd� dk7 rdnd}|j dd� }t |� dkD rd|z }d |�d |j dd� �|�|j dd� ��S ) Nr �insecure�1�sr �portr r �httpr �hostname�prefix)r �len)r r �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� Jr c � � | j g d�� | j dd�� | j dd�� | j dd�� | j g d �d �� | j d| j � z � t j d � }| j |D �cg c] }d|z �� c}d�� d}d } ddlm} |� }| j |� }| j |� }d|�d|j dd� �d|��}|j dd� } | rd| i}| j ||d�� y c c}w # t t t t f$ r Y �5w xY w)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.configr1 r r) r �ModuleNotFoundError�ImportErrorr r ) r �certs�cert�curlcmdr8 r1 r r � server_urlr5 s r �setupzSubscriptionManager.setup5 s� � ���� +� ,� ���;�!:� � <����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>