Current File : //lib/python2.7/site-packages/cloudinit/config/cc_spacewalk.pyc
�
oB�]c@s\dZddlmZddgZdgZdZd�Zed
d
d
d�Zd	�Z	d
S(s�
Spacewalk
---------
**Summary:** install and configure spacewalk

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/

**Internal name:** ``cc_spacewalk``

**Module frequency:** per instance

**Supported distros:** redhat, fedora

**Config keys**::

    spacewalk:
       server: <url>
       proxy: <proxy host>
       activation_key: <key>
i����(tutiltredhattfedoras	rhn-setups'/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERTcCs[t}y#tjddgdt�t}Wn+tjk
rV}|jdkrW�qWnX|S(Nsrhn-profile-syncs	--verbosetcapturei(tFalseRtsubptTruetProcessExecutionErrort	exit_code(talready_registeredte((sA/usr/lib/python2.7/site-packages/cloudinit/config/cc_spacewalk.pyt
is_registered&s

cCs�|dk	r"|jd||�ndg}|jdd|g�|jdt|�g�|r}|jdt|�g�n|r�|jdt|�g�n|r�|jdt|�g�ntj|d	t�dS(
Ns;Registering using `rhnreg_ks` profile '%s' into server '%s't	rhnreg_kss--serverUrlshttps://%s/XMLRPCs
--profilenames--proxys--sslCACerts--activationkeyR(tNonetinfotextendtstrRRR(tservertprofile_nametca_cert_pathtproxytlogtactivation_keytcmd((sA/usr/lib/python2.7/site-packages/cloudinit/config/cc_spacewalk.pytdo_register4s	
	c
Cs�d|kr |jd|�dS|d}|jd�}|r�|jjt�t�s�t||jjdt	�d|jd�d|d|jd��q�n|jd|�dS(	Nt	spacewalks=Skipping module named %s, no 'spacewalk' key in configurationRtfqdnRRRsOSkipping module named %s, 'spacewalk/server' key was not found in configuration(
tdebugtgettdistrotinstall_packagestrequired_packagesRRt
datasourcetget_hostnameR(tnametcfgtcloudRt_argstspacewalk_server((sA/usr/lib/python2.7/site-packages/cloudinit/config/cc_spacewalk.pythandleGs	
		N(
t__doc__t	cloudinitRtdistrosRtdef_ca_cert_pathRR
RR'(((sA/usr/lib/python2.7/site-packages/cloudinit/config/cc_spacewalk.pyt<module>s