
    x[h
              
           % S r SSKrSSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  S/ S	Q\S
/S.r\	\S'   \R                  " \5      r/ SQrS/rSrS r\SS4S jrS\S\S\S\SS4
S jrg)z*Spacewalk: Install and configure spacewalk    N)subp)Cloud)Config)
MetaSchema)PER_INSTANCEcc_spacewalk)rhelfedora	openeuler	spacewalk)iddistros	frequencyactivate_by_schema_keysmeta)redhatr
   r   z	rhn-setupz'/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERTc                      Sn  [         R                   " SS/SS9  Sn U $ ! [         R                   a  nUR                  S:w  a  e  S nAU $ S nAff = f)NFzrhn-profile-syncz	--verbosecaptureT   )r   ProcessExecutionError	exit_code)already_registeredes     ?/usr/lib/python3/dist-packages/cloudinit/config/cc_spacewalk.pyis_registeredr      sc     		%{3UC!  %% ;;! s    AA

Ac                    [         R                  SUU 5        S/nUR                  SSU -  /5        UR                  S[        U5      /5        U(       a  UR                  S[        U5      /5        U(       a  UR                  S[        U5      /5        U(       a  UR                  S[        U5      /5        [        R                  " US	S
9  g )Nz;Registering using `rhnreg_ks` profile '%s' into server '%s'	rhnreg_ksz--serverUrlzhttps://%s/XMLRPCz--profilenamez--proxyz--sslCACertz--activationkeyFr   )LOGinfoextendstrr   )serverprofile_nameca_cert_pathproxyactivation_keycmds         r   do_registerr)   (   s     HHE
 -CJJ2V;<=JJ\!234

Is5z*+

M3|#456

%s>':;<IIc5!    namecfgcloudargsreturnc                    SU;  a  [         R                  SU 5        g US   nUR                  S5      nU(       a{  UR                  R	                  [
        5        [        5       (       dL  [        UUR                  R                  SS9R                  UR                  S5      UR                  S5      S9  g g [         R                  S	U 5        g )
Nr   z=Skipping module named %s, no 'spacewalk' key in configurationr#   T)fqdnr&   r'   )r&   r'   zOSkipping module named %s, 'spacewalk/server' key was not found in configuration)r   debuggetdistroinstall_packagesrequired_packagesr   r)   
datasourceget_hostnamehostname)r+   r,   r-   r.   spacewalk_servers        r   handler;   @   s    #		K	
 	
k
Cwwx(%%&78   --4-8AAggg&"ww'78	  			.	
r*   )__doc__logging	cloudinitr   cloudinit.cloudr   cloudinit.configr   cloudinit.config.schemar   cloudinit.settingsr   r   __annotations__	getLogger__name__r   r   r6   def_ca_cert_pathr   r)   r"   listr;    r*   r   <module>rI      s    0   ! # . + . +}	j  !
+ M < " "
"0
 
6 
% 
t 
 
r*   