404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.221.188.241: ~ $
3

e�$gϮ�@s(ddlmZddlZddlZejddd�Zeed�s<eje_ejZddl	Z	ddl
Z
ddlmZm
Z
ddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZmZddlTej �Z!ej"�Z#dd�Z$dd�Z%dd�Z&dd�Z'dd�Z(Gdd�de)�Z*Gd d!�d!�Z+Gd"d#�d#�Z,Gd$d%�d%�Z-Gd&d'�d'�Z.Gd(d)�d)�Z/Gd*d+�d+�Z0Gd,d-�d-�Z1Gd.d/�d/�Z2Gd0d1�d1�Z3Gd2d3�d3�Z4Gd4d5�d5�Z5Gd6d7�d7�Z6Gd8d9�d9�Z7Gd:d;�d;�Z8Gd<d=�d=�Z9d>d?�Z:e;d@k�r$e:�dS)A�)�geteuidNzrhn-client-toolsT)Zfallback�ugettext)�rhnreg�hardware)�
up2dateErrors)�up2dateUtils)�pkgUtils)�
up2dateLog)�config)�convert_url_from_puny)�up2dateAuth)�rpclib)�idn_puny_to_unicode)�sstr)�PM_PLUGIN_NAME�PM_PLUGIN_CONF)�*cCs&tj|tt�td|�tt�g�dS)Nz%s)�snack�ButtonChoiceWindowr�ERROR�BACK)�screen�errmsg�r�/usr/lib/python3.6/tui.py�ErrorWindow/srcCs8tj|tt�td|�tt�g�|j�tjd�dS)Nz%s�)rrrZFATAL_ERROR�OK�finish�sys�exit)rrrrr�FatalErrorWindow3sr!cCs.tj|tt�td|�tt�g�|j�dS)Nz%s)rrr�WARNINGrr)rrrrr�
WarningWindow9sr#cCs�tj|tt�tt�dtt�dtt�dtt�dtt�dtt	�dtt
�dtt�dtt�dtt
�dtt�tt�tt�gdd�}|tt�j�kr�|j�dSdSdS)N�
z

�F)�widthrr)rrrZCONFIRM_QUITZCONFIRM_QUIT_SURE�WHY_REGISTER_SEC�WHY_REGISTER_SEC_TXT�WHY_REGISTER_DLD�WHY_REGISTER_DLD_TXT�WHY_REGISTER_SUPP�WHY_REGISTER_SUPP_TXT�WHY_REGISTER_COMP�WHY_REGISTER_COMP_TXTZCONFIRM_QUIT_WILLNOT�WHY_REGISTER_TIPZCONTINUE_REGISTERINGZREGISTER_LATER2�lowerr)r�buttonrrr�ConfirmQuitWindow?s
vr2c
Gs�y||�}Wn�tjk
rDt|ttj�d�tj�d�Yn�tjk
rpt||j	�tj�d�Yn�tj
k
r�tj�d}t||j	dtt
j�t
j�t
j�f�Yn:tjk
r�tj�d}t||j	dt�|�YnX|S)Nrrr$z

)r�CommunicationErrorrZHOSTED_CONNECTION_ERRORr
�
getServerlURLr�exc_infoZSSLCertificateVerifyFailedErrorrZNoBaseChannelErrorr!ZBASECHANNELERRORr�getArchZgetOSRelease�
getVersionZSSLCertificateFileNotFoundZSSL_CERT_FILE_NOT_FOUND_ERRER)r�funcZparams�results�errr�tui_call_wrapperVs(
r;c@seZdZdS)�WindowSkipExceptionN)�__name__�
__module__�__qualname__rrrrr<nsr<c@s(eZdZdZdd�Zdd�Zdd�ZdS)�AlreadyRegisteredWindowc	Cs<tj�s|jrt��||_||_tjj�}t	j
jtj
��}|ddd}|ddd}tj|jtt�dd�}tj|jtt�dftt�dfg�|_|j|jdddd�tj|dd	|dd
ttdtd�d
t|jj�dtd�d
|dtd�d
|dtd�dd�}|j|dddd�||_dS)NrZusername�	system_idr��nextr )�growx��z

zSpacewalk Location:� r$zLogin:z
System ID:)�padding)rrrr)rZ
registered�testr<r�tuir�_snack�sizer
Z	xmlrpclib�loadsrZgetSystemId�GridFormr�SYSTEM_ALREADY_SETUP�	ButtonBar�YES_CONT�	NO_CANCEL�bb�add�TextboxZSYSTEM_ALREADY_REGISTERED�_r�	serverURL�SYSTEM_ALREADY_REGISTERED_CONT�g)	�selfrrJrLZsystemIdXmlZoldUsernameZoldsystemId�toplevel�tbrrr�__init__ts&

Tz AlreadyRegisteredWindow.__init__cCsdS)Nr)rZrrr�saveResults�sz#AlreadyRegisteredWindow.saveResultscCs6tjd|j�|jj�}|jj|�}|dkr2dS|S)Nz
Running %s�F12rC)�log�	log_debug�namerY�runOncerS�
buttonPressed)rZ�resultr1rrr�run�s
zAlreadyRegisteredWindow.runN)r=r>r?rbr]r^rfrrrrr@qsr@c@s0eZdZdZdd�Zdd�Zdd�Zdd�Zd	S)
�SatelliteUrlWindowcCs�||_||_d|j_t|jj�|_tj|j�}||jkrR||_tj	|j�t
j�tj
j�}tj|tt�dd�}t}t}t}tj|dddt|�ddd�}	|j|	dddd�tjtd��}	|j|	dd�tjd	d�}
tjt|��}	|
j|	ddddd
�tjd�|_|jj|j�|
j|jdddd�tjt|��}	|
j|	ddddd
�tjd�|_|jj|j�|
j|jdddd�|j|
dd	�tj|tt �dftt!�d
ftt"�dfg�|_#|j|j#ddddd�||_$dS)Nrr��
�)�scroll�wrap)�
anchorLeft�rB)rH�anchorRight�(rC�back�cancel)rHrD)rrrr)rrrr)rrrr)%rrJ�alreadyRegisteredrrW�serverr�makeNiceServerUrlr
�setServerURL�cfg�saverrKrLrNrZSATELLITE_URL_WINDOWZSATELLITE_URL_TEXTZSATELLITE_URL_PROMPTZSATELLITE_URL_PROMPT2rUrT�Label�Grid�setField�Entry�urlEntry�set�sslEntry�	sslCACertrP�NEXTr�CANCELrSrY)rZrrJ�fixed_server_urlrLr[Zprompt_textZ	url_labelZ	ssl_label�label�gridrrrr]�sT




zSatelliteUrlWindow.__init__cCs�|jj�dkrBtj|jtt�tt�tt�gd�|j	j
|j�dS|jj�dd�dkr�|jj�dkr�tj|jtt�tt�tt�gd�|j	j
|j�dSdS)Nrn)�buttonsr�Zhttpsr)
r}�valuerrrrrZSATELLITE_REQUIREDrrY�
setCurrentrZSSL_REQUIRED)rZrrr�validateFields�sz!SatelliteUrlWindow.validateFieldscCs\|jj�}tj|�}||kr |}||j_|jj�|j_tj	|�tj
|jj��tj�dS)N)
r}r�rrurJrWrr�r
rvZsetSSLCACertrwrx)rZZserverEntryr�rrrr^�s


zSatelliteUrlWindow.saveResultscCsltjd|j�|jj�d}x>|s\|jj�}|jj|�}|dkrFd}|dkrX|j	�}q Pq W|jj
�|S)Nz
Running %srr_rC)r`rarbr�refreshrYrfrSrdr��	popWindow)rZ�validrer1rrrrfs



zSatelliteUrlWindow.runN)r=r>r?rbr]r�r^rfrrrrrg�s
A
rgc@s(eZdZdZdd�Zdd�Zdd�ZdS)�*AlreadyRegisteredSubscriptionManagerWindowcCs�tj�s|jrt��||_||_tjj�}tj	|jt
t�dd�}tj|jt
t
�dft
t�dfg�|_|j|jdddd�tj|dd|ddt
td	td	td
�dd�}|j|dddd�||_dS)
NrrBrCr r)rDrErFz

r$)rH)rrrr)rZrhsm_registeredrIr<rrJrrKrLrNrrOrPrQrRrSrTrUr"ZRHSM_SYSTEM_ALREADY_REGISTEREDrXrY)rZrrJrLr[r\rrrr]s 

z3AlreadyRegisteredSubscriptionManagerWindow.__init__cCsdS)Nr)rZrrrr^2sz6AlreadyRegisteredSubscriptionManagerWindow.saveResultscCs6tjd|j�|jj�}|jj|�}|dkr2dS|S)Nz
Running %sr_rC)r`rarbrYrcrSrd)rZrer1rrrrf5s
z.AlreadyRegisteredSubscriptionManagerWindow.runN)r=r>r?rbr]r^rfrrrrr�sr�c@s(eZdZdZdd�Zdd�Zdd�ZdS)�
ConnectWindowcCs�||_||_tjj�}t|jj�|_td|_	tj
|jtt�dd�}t
|jd}|j	rf|t|j	7}tj|dd|ddt|�dd�}|j|dddd�||_dS)	NZ	httpProxyrz

rrErF)rH)rrrr)rrJrrKrLrrWrtrw�proxyrNrZCONNECT_WINDOWZCONNECT_WINDOW_TEXTZCONNECT_WINDOW_TEXT2rUrTrY)rZrrJrLr[�textr\rrrr]Cs

zConnectWindow.__init__c	CsPtjd|j�|jj�}|jj�yt|jtj	�Wn
dS|jj
�dS)Nz
Running %srqrC)r`rarbrY�drawrr�r;rZgetCapsr�)rZrerrrrf\s


zConnectWindow.runcCsdS)Nr)rZrrrr^qszConnectWindow.saveResultsN)r=r>r?rbr]rfr^rrrrr�@sr�c@s(eZdZdZdd�Zdd�Zdd�ZdS)�StartWindowcCs�||_||_tjj�}tj|jtt�dd�}tt�}tj	|dd|dd|dd�}|j
|dddd�tj|jtt�dftt
�dftt�d	fg�|_|j
|jdddd
�||_dS)NrrBrri�)rH�why_registerrCrr)rD)rrrr)rrJrrKrLrNrZSTART_REGISTER_WINDOWZSTART_REGISTER_TEXTrUrTrPZWHY_REGISTERr�r�rSrY)rZrrJrLr[Zstart_register_textr\rrrr]ws
"

zStartWindow.__init__cCsdS)Nr)rZrrrr^�szStartWindow.saveResultscCsXtjd|j�|jj�}|jj|�}|dkr2dS|dkrTt|j|j	�}|j
�|S|S)Nz
Running %sr_rCr�)r`rarbrYrcrSrd�WhyRegisterWindowrrJrf)rZrer1Zwhy_reg_winrrrrf�s
zStartWindow.runN)r=r>r?rbr]r^rfrrrrr�tsr�c@s eZdZdZdd�Zdd�ZdS)r�cCs�||_||_tjj�}tj|jtt�dd�}tdt	dt
dtdtdt
dtdtdtdt}tj|dd|ddt|�dd�}|j|dddd�tj|jtt�d	fg�|_|j|jdddd
�||_dS)NrrBz

r$rrir�)rHrq)rD)rrrr)rrJrrKrLrNrZWHY_REGISTER_WINDOWZWHY_REGISTER_TEXTr'r(r)r*r+r,r-r.r/rUrTrPZ
BACK_REGISTERrSrY)rZrrJrLr[Zwhy_register_textr\rrrr]�s
F&zWhyRegisterWindow.__init__cCs*tjd|j�|jj�}|jj|�}|S)Nz
Running %s)r`rarbrYrcrSrd)rZrer1rrrrf�s
zWhyRegisterWindow.runN)r=r>r?rbr]rfrrrrr��sr�c@s0eZdZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
InfoWindowcCs||_||_d|j_|jj|_tjj�}tj|t	t
�dd�}t|j�}|j}||jkrb|d|7}t|}t
}t}	tj|dddt	|�ddd�}
|j|
dddd�tjd	d�}tjt	|��}
|j|
ddddd
�tjd�|_|jj|j�|j|jdddd�tjt	t��}
|j|
ddddd
�ytjddd�|_Wn&tk
�r\tjddd
�|_YnX|jj|j�|j|jdddd�|j|dd�tj|ddt	|	��}
|j|
dd	dd�tj|t	t�dft	t�dft	t �dfg�|_!|j|j!ddddd�||_"dS)Nrrrhz (%s)rirj)rkrl)rmrB)rHrorF)�password)ZhiddenrCrqrr)rHrD)rrrr)rrrr)rrrr)#rrJrsrWrtrrKrLrNrZREGISTER_WINDOWrZLOGIN_PROMPTZLOGINZ	LOGIN_TIPrUrTrzryr{r|�
userNameEntryr~�userNameZPASSWORD�
passwordEntry�	TypeErrorr��TextboxReflowedrPr�rr�rSrY)rZrrJrLr[Zdecoded_serverZurlZlogin_promptZlogin_labelZ	login_tipr�r�rrrr]�sV






zInfoWindow.__init__c
CsL|jj�dkrBtj|jtt�tt�tt�gd�|j	j
|j�dS|jj�dkr�tj|jtt�tt�tt�gd�|j	j
|j�dSy t
j|jj�|jj��|j_Wn�tjk
�rtj�d}tj|jttd��ttd��t|j�ttd��gd�|j	j
|j�dStjk
�rFtj�d}t|jtd�|j�YnXdS)	Nrn)r�rr�ErrorzThe server indicated an error:
rz?There was an error communicating with the registration server:
)r�r�rrrrrZ
USER_REQUIREDrrYr�r�ZPASSWORD_REQUIREDrZreserveUserrJrsrZValidationErrorrr5rVrr3r!)rZr:rrrr�	s. 8zInfoWindow.validateFieldscCs |jj�|j_|jj�|j_dS)N)r�r�rJr�r�r�)rZrrrr^%szInfoWindow.saveResultscCsltjd|j�|jj�d}x>|s\|jj�}|jj|�}|dkrFd}|dkrX|j	�}q Pq W|jj
�|S)Nz
Running %srr_rC)r`rarbrr�rYrfrSrdr�r�)rZr�rer1rrrrf)s



zInfoWindow.runN)r=r>r?rbr]r�r^rfrrrrr��s
@r�c@s0eZdZdZdd�Zdd�Zdd�Zdd�Zd	S)
�OSReleaseWindowcCsx||_tj�stjd�t��tj|j|j�|_	t
|j	d�dkrRtjd�t��||_tj
j�|_d|_tj|jtt�dd�}||_tj|jddtt��|_|j|jdddd	�tt�}|jjr�tj|ddd
�|_ntj|d�|_|j|jddddd�tjtt��|_|j|jdddd	�tj|jdd
d|jddd�|_|j|jdd�xRt |j	dj!�dd�d�D]4\}}||j	dk�r�|d}|jj"d||��qtWtj|jddtt#��|_$|j|j$dddd	�tt%�}|jj&�rtj||jdd
�|_&ntj||j�|_&|j|j&ddddd�tj'|tt(�dftt)�dftt*�dfg�|_+|j|j+dddd�|jj,�dS)Nz5Server does not support EUS, skipping OSReleaseWindow�channelsrz3No available EUS channels, skipping OSReleaseWindowF�rri)rm)�isOn)rHrmrB�)r&rjcSs|dS)Nrr)�arrr�<lambda>jsz*OSReleaseWindow.__init__.<locals>.<lambda>)�keyZreceiving_updatesrrGrhr�rCrqrr�)rD)rrrr)rrrr)-rJrZserver_supports_eusr`rar<ZgetAvailableChannelsr�r��available_channels�lenrrrKrLZ
selectChannelrNrZSELECT_OSRELEASErYr�Z
OS_VERSIONZostextrTZLIMITED_UPDATES�limited_updates_buttonZSingleRadioButtonryZ
MINOR_RELEASEZsublabelZListbox�channelList�sorted�items�appendZCHANNEL_PAGE_TIPZtipZALL_UPDATES�all_updates_buttonrPr�rr�rSr�)rZrrJr[Zoptiontext1r�r�Zoptiontext2rrrr]@sb

$



zOSReleaseWindow.__init__cCsptjd|j�|jj�d}xB|dkr`|jj�}|jj|�}|dkrJd}|dkr\|j	�}q Pq W|jj
�|S)Nz
Running %srrr_rC)r`rarbrr�rYrfrSrdr�r�)rZr�rer1rrrrf�s




zOSReleaseWindow.runcCs�d}d}|jj�r&|jj�|jdk}tt�}|rdtj|j	|tt
�|jj�tt�tt�gd�}|S|j
j�sr|r�tj|j	|tt�tt�tt�gd�}|S|S)N�okFZdefault_channel)r�)r��selectedr��currentr�rZCONFIRM_OS_RELEASE_SELECTIONrrrZCONFIRM_OS_WARNINGrr�r�ZCONFIRM_OS_ALL)rZZmsgboxZ
later_release�titlerrrr��s 


zOSReleaseWindow.validateFieldscCsz|jjjdd�|jj�rVtjd|jj��|jj�|jjd<|jj�|j_d|j_	|j	j�rv|j	j�|j_	d|j_dS)N�channelzSelected Channel %sr)
rJ�other�popr�r�r`rar�r�r�)rZrrrr^�s

zOSReleaseWindow.saveResultsN)r=r>r?rbr]rfr�r^rrrrr�=s
Mr�c@s(eZdZdZdd�Zdd�Zdd�ZdS)�HardwareWindowc	Cs�||_||_tjj�}tj�\}}|dk	rB||jjd<||jjd<tj	�|_tj
|tt�dd�}tj
dtt��}|j|dddd�tjdd�}tjttd	���}	|j|	ddd.dd
�tjd�|_|j|jdddd�|j|dddd�|j�rtjtt�dd�|_ntjtt��|_|j|jddd/dd
�tjtt��}	|j|	dddd0d�tjdd�}d}
|
td�ttj��d7}
tjttd���|_|j|jddd1dd
�tjttj���|_|j|jdddd�|
td�7}
x.|jD]$}|ddk�r�|
|dd7}
�q�W|
td�7}
xb|jD]X}|ddk�rt|d�}|
|d7}
|j dk�r`|jj!|j �n|jj!t|���qW|
td�7}
x6|jD],}|ddk�r�|
td�|dd7}
�q�W|
td�7}
xT|jD]J}|ddk�r�|d �r�|
|d d7}
n|d!�r�|
|d!d7}
�q�W|
td"�7}
x2|jD](}|dd#k�r0|
td$�|d%7}
�q0Wtj
d&t|
��}
|j|
dd�tj
|dd'tt"��|_#|j|j#dd(d2dd
�tj$|tt%�d)ftt&�d*ftt'�d+fg�|_(|j|j(dd,d3dd-�||_)dS)4N�	virt_uuid�	virt_typerr�r%r)rmrBz
Profile name:)rHrorp)r�)rHrmrj)rmrHrhrnz	Version: z  zCPU model: �classZCPUZmodelr$z
Hostname: ZNETINFOZhostnamezCPU speed: z%d MHzZspeedzIP Address: ZipaddrZip6addrzMemory: ZMEMORYz%s megabytesZram�Prir�rCrqrrr�)rHrD)rrrr)rrrr)rrrr)rrrr)rrrr)rrrr)*rrJrrKrLrZ
get_virt_infor�rZHardwarerNrZHARDWARE_WINDOWr�ZHARDWARE_WINDOW_DESC1rTrzryrVr{r|�profileEntry�includeHardware�CheckboxZHARDWARE_WINDOW_CHECKBOX�hardwareButtonZDESELECTrr7ZversionLabelZ
versionLabel2r�profileNamer~ZHARDWARE_WINDOW_DESC2ZadditionalHWLabelrPr�rr�rSrY)rZrrJrLr�r�r[r�r�r�Z
hardware_textZhwZunicode_hostnamer\rrrr]�s�





zHardwareWindow.__init__cCs |jj�|j_|jj�|j_dS)N)r�r�rJr�r�r�r�)rZrrrr^5szHardwareWindow.saveResultscCs6tjd|j�|jj�}|jj|�}|dkr2dS|S)Nz
Running %sr_rC)r`rarbrYrcrSrd)rZrer1rrrrf9s
zHardwareWindow.runN)r=r>r?rbr]r^rfrrrrr��snr�c@s0eZdZdZdd�Zdd�Zdd�Zdd�Zd	S)
�PackagesWindowc	Cs�||_||_tjj�}tj|tt�dd�}||_tj	|ddtt
��}|j|dddd�tjtt
�d�|_|j|jddddd�tjtt��}|j|dddd�tj|ddd�|_|j|jdd	�|jgk�rJtj|tt�dd�|_tjd
d�|_|jj|jdd�|jj�|jj�d}tjd�r2d}tj|d
�|_|jj�xL|jD]B}|jjdt|d�t|d�t|d�ft|d�dd��qRWtj|tt �dftt!�dftt"�dfg�|_#|j|j#ddddd�dS)Nrr�rri)rm)rHrmrB�rjrp�dZsupportsExtendedPackageProfile)r6z%s-%s-%srb�version�release)�itemr�rCrqrrrh)rHrD)rrrr)rrrr)$rrJrrKrLrNrZPACKAGES_WINDOWrYr�ZPACKAGES_WINDOW_DESC1rTr�ZPACKAGES_WINDOW_DESC2�packagesButtonryZPACKAGES_WINDOW_UNCHECKZCheckboxTree�packageListZPACKAGES_WINDOW_PKGLIST�pwin�Scale�scaler�r�rrwrZgetInstalledPackageListr�r�rPr�rr�rS)	rZrrJrLr[r�r�r6�packagerrrr]EsJ







zPackagesWindow.__init__cCs4|jjt|d|d��|jj�|jj�dS)Ng�?r�)r�r~�intr�r�rr�)rZ�amount�totalrrr�setScale{s
zPackagesWindow.setScalecCsH|jj�|j_|jj�}x*|jjD]}|d|kr"|jjj|�q"WdS)Nrb)r�r�rJ�includePackagesr�ZgetSelection�selectedPackagesr�)rZZ	selectionZpkgrrrr^�s

zPackagesWindow.saveResultscCs6tjd|j�|jj�}|jj|�}|dkr2dS|S)Nz
Running %sr_rC)r`rarbrYrcrSrd)rZrer1rrrrf�s
zPackagesWindow.runN)r=r>r?rbr]r�r^rfrrrrr�Bs
6r�c@s(eZdZdZdd�Zdd�Zdd�ZdS)�
SendWindowcCs�||_||_tjj�}tj|tt�dd�}tj|ddtt	��}|j
|dd�tj|tt�dftt
�dftt�dfg�|_|j
|jddd	dd�||_dS)
NrrBr�rCrqrr)rHrD)rrrr)rrJrrKrLrNrZSEND_WINDOWr�ZSEND_WINDOW_DESCrTrPr�rr�rSrY)rZrrJrLr[r�rrrr]�s


zSendWindow.__init__cCsdS)Nr)rZrrrr^�szSendWindow.saveResultscCs6tjd|j�|jj�}|jj|�}|dkr2dS|S)Nz
Running %sr_rC)r`rarbrYrcrSrd)rZrer1rrrrf�s
zSendWindow.runN)r=r>r?rbr]r^rfrrrrr��sr�c@s0eZdZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
SendingWindowcCsP||_||_tjj�}tj|tt�dd�|_tj	dd�|_
|jj|j
dd�dS)Nrrpr�r)rrJrrKrLrNrZSENDING_WINDOWr�r�r�rT)rZrrJrLrrrr]�s
zSendingWindow.__init__c%Cs�tjd|j�|jj�|jj�d}yPtjdt|jj	��t
j|jj|jj
|jj|jj	d�}|j}t|d�}W�n(tjk
r�tj�d}t|jtd�|j�Yn�tjk
r�tj�d}t|jtd�|j�Yn�tjk
�rtj�d}t|jtd�|j�Yn�tjk
�rVtj�d}t|jtd�|j�YnLtjk
�rxt|jt�Yn*tjtj��t|jtd��YnXt
j|��s�t|jtd��|jdd	�t
j �|_!|jd
d	�|jj"�rbyt
j#||jj$�Wnbtjk
�r8tj�d}t|jtd�|j�Yn*tjtj��t|jtd��YnX|jd
d	�|jj%�r�yt
j&||jj'�Wnbtjk
�r�tj�d}t|jtd�|j�Yn*tjtj��t|jtd��YnXd}yt(j)�}Wn,tjk
�r,t|jtj�d�YnXt
j*|�yt
j+�\|j_,|j_-WnHt.k
�r�tj�d}t/|jtd�t0t1f|j�d|j_2YnXt
j3�|jd	d	�|jj4�||j_5dS)Nz
Running %szother is %s)r�rArzProblem registering system:
zProblem registering system.z&Problem writing out system id to disk.rhrBz"Problem sending hardware profile:
z!Problem sending hardware profile.rjzProblem sending package list:
zProblem sending package list.z%Could not open %s
%s is not enabled.
rC)6r`rarbr�r�rr��strrJr�rZregisterSystem2r�r�r�ZrawDictrrr3rr5r!rVrZRhnUuidUniquenessErrorZInsuffMgmntEntsErrorZRegistrationDeniedErrorZActivationKeyUsageLimitErrorZACT_KEY_USAGE_LIMIT_ERRORZ
log_exceptionZ
writeSystemIdr�Z
getOemInfo�oemInfor�ZsendHardwarerr�ZsendPackagesr�rZupdateLoginInfoZsendVirtInfoZpluginEnable�pm_plugin_present�pm_plugin_conf_changed�IOErrorr#rr�pm_plugin_conf_errorZspawnRhnCheckForUIr��reg_info)rZr�ZsystemIdr:Zlirrrrf�s�








zSendingWindow.runcCsdS)Nr)rZrrrr^.szSendingWindow.saveResultscCs4|jjt|d|d��|jj�|jj�dS)Ng�?r�)r�r~r�r�r�rr�)rZr�r�rrrr�1s
zSendingWindow.setScaleN)r=r>r?rbr]rfr^r�rrrrr��s

kr�c@s(eZdZdZdd�Zdd�Zdd�ZdS)�FinishWindowcCs�||_||_tjj�}tj|tt�dd�}tj|ddtt	��}|j
|dd�tj|ttd��dfg�|_
|j
|j
ddddd�||_dS)	NrrBr�ZFinishrC)rHrD)rrrr)rrJrrKrLrNrZ
FINISH_WINDOWr�ZFINISH_WINDOW_TEXT_TUIrTrPrVrSrY)rZrrJrLr[r�rrrr]:s
zFinishWindow.__init__cCsdS)Nr)rZrrrr^MszFinishWindow.saveResultscCs6tjd|j�|jj�}|jj|�}|dkr2dS|S)Nz
Running %sr_rC)r`rarbrYrcrSrd)rZrer1rrrrfQs
zFinishWindow.runN)r=r>r?rbr]r^rfrrrrr�7sr�c@s(eZdZdZdd�Zdd�Zdd�ZdS)�ReviewWindowc
Cs"||_||_|j|_tjj�}tj|tt�dd�}d}|jj	sJ|t
d7}|jjr^|td7}|jj
rr|td7}|td7}t|jd�dkr�d}x|jdD]}||d7}q�Wtdtdd}tjd	|jj�|t7}|||d7}t|jd
�dk�rld}	xP|jd
D]B}
|
dk�r2|	td7}	n$|
dk�rJ|	td7}	n|	|
d7}	�qW|t|	d7}t|jd
�dk�r�d}x|jd
D]}||7}�q�W|t|7}tj|dd|ddt|�dd�|_|j|jdddd�tj|tt�dfg�|_ |j|j ddddd�||_!dS)NrrBrnz

r�rr$z%s
zserver type is %s Zsystem_slotsZenterprise_entitledZvirtualization_hostZuniversal_activation_keyrir�)rHrC)rHrD)rrrr)rrrr)"rrJr�rrKrLrNrZ
REVIEW_WINDOWr�ZPM_PLUGIN_WARNINGr�ZPM_PLUGIN_CONF_ERRORr�ZPM_PLUGIN_CONF_CHANGEDZREVIEW_WINDOW_PROMPTr�ZCHANNELS_TITLEZOK_CHANNELSr`ra�
serverTypeZCHANNELS_SAT_WARNINGZ
MANAGEMENTZVIRTZSLOTSZACTIVATION_KEYrUZ
review_windowrTrPrrSrY)
rZrrJrLr[Zreview_window_textZchannel_listr�r�Z	slot_listZslotZact_key_listZact_keyrrrr]]sT


(zReviewWindow.__init__cCsdS)Nrr)rZrrrr^�szReviewWindow.saveResultscCsNtjd|j�|jj�}|jj|�}|dkr2d}|jjs>d}|jj	rJd}|S)Nz
Running %sr_rCr )
r`rarbrYrcrSrdrJr�r�)rZrer1rrrrf�s
zReviewWindow.runN)r=r>r?rbr]r^rfrrrrr�Zs?r�c@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�TuiZRHN_REGISTER_TUIcCs�||_||_tjj�|_|j�d|_ytj�|_	Wn$t
jk
rXt|t
d��YnXtttttttttttttg
|_tj�d|_tds�tj dd�td|_!dS)Nrz"You specified an invalid protocol.z Only https and http are allowed.r�z'/usr/share/rhn/CLN-ORG-TRUSTED-SSL-CERTzBYou specified an invalid protocol.Only https and http are allowed.)"rrIrrKrL�	drawFramersrZ
getServerTyper�rZInvalidProtocolErrorr!rVr�r@r�rgr�r�r�r�r�r�r�r�r��windowsr
r4rWrwr~r�)rZrrIrrrr]�s6zTui.__init__cCs|jj�dS)N)rr)rZrrr�__del__�szTui.__del__cCs4t|_|jjddt|j��|jjttd���dS)NrzL  <Tab>/<Alt-Tab> between elements  |  <Space> selects  |  <F12> next screen)ZCOPYRIGHT_TEXTZwelcomeTextrZdrawRootTextrZpushHelpLinerV)rZrrrr��sz
Tui.drawFramecCs~d|_d|_i|_ddddddddddd�
|_i|_d|jd<d|_d|_d|_d|_d|_	g|_
g|_d|_d|_
d|_dS)Nrn)
Zentitlement_numZregistration_numZ
first_name�	last_nameZcompanyZaddressZcity�state�zipZcountryZregistration_numberrr)r�r�r�ZproductInfor�r�r�r�r�r�r�r�r�r�r�)rZrrr�initResults�s2

zTui.initResultscCsRtjd|j�|j�d}�z"d}�x|t|j�k�r<d}y|j||j|�}Wn0tk
r�|dkrt|d}n|d}w(YnXtjd|�|j�}tjd|�|dkr�|dkr�|d}|dkr�|j|jt	jkr�|d8}d}q(|d	kr�dS|d
k�rtjd�t
|j�dk�r:dSq(|dkr(|d}|j�d}q(WWd|jj�XdS)
Nz
Running %sZforwardrrzindex is %sz	Result %srqZbackwardr rrzCaught a cancel requestrC)
r`rarbr�r�r�rr<rfr�r2r^r)rZ�	direction�index�winrerrrrf�sF


zTui.runN)	r=r>r?rbr]r�r�r�rfrrrrr��s!!r�cCs~d}tjtjtj�ttj�dkrBtjddks>tjddkrBd}tj�}t�dkrh|rht	|t
d��t||�}|j�dS)Nrrz-tz--testz2You must run the RHN registration program as root.)
�signal�SIGINT�SIG_IGNr�r�argvrZSnackScreenrr!rVr�rf)rIrrJrrr�main5s
r��__main__)<�osrr�gettextZtranslation�t�hasattrrrVrr�Zup2date_clientrrrrrr	r
Zup2date_client.configrrZrhnr
Zrhn.connectionsrZrhn.i18nrZup2date_client.pmPluginrrZup2date_client.rhnreg_constantsZinitLogr`ZinitUp2dateConfigrwrr!r#r2r;�	Exceptionr<r@rgr�r�r�r�r�r�r�r�r�r�r�r�r�r�r=rrrr�<module>sd
/w)4))w~P$#S	


Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 113 B 0644
__init__.cpython-36.pyc File 113 B 0644
capabilities.cpython-36.opt-1.pyc File 5.28 KB 0644
capabilities.cpython-36.pyc File 5.34 KB 0644
cldetect.cpython-36.opt-1.pyc File 2.31 KB 0644
cldetect.cpython-36.pyc File 2.31 KB 0644
clientCaps.cpython-36.opt-1.pyc File 1.98 KB 0644
clientCaps.cpython-36.pyc File 1.98 KB 0644
clpwd.cpython-36.opt-1.pyc File 3.9 KB 0644
clpwd.cpython-36.pyc File 3.9 KB 0644
config.cpython-36.opt-1.pyc File 10.38 KB 0644
config.cpython-36.pyc File 10.38 KB 0644
debUtils.cpython-36.opt-1.pyc File 2.03 KB 0644
debUtils.cpython-36.pyc File 2.03 KB 0644
getMethod.cpython-36.opt-1.pyc File 2.25 KB 0644
getMethod.cpython-36.pyc File 2.25 KB 0644
haltree.cpython-36.opt-1.pyc File 3.07 KB 0644
haltree.cpython-36.pyc File 3.07 KB 0644
hardware.cpython-36.opt-1.pyc File 18.42 KB 0644
hardware.cpython-36.pyc File 18.42 KB 0644
hardware_gudev.cpython-36.opt-1.pyc File 7.69 KB 0644
hardware_gudev.cpython-36.pyc File 7.69 KB 0644
hardware_hal.cpython-36.opt-1.pyc File 6.73 KB 0644
hardware_hal.cpython-36.pyc File 6.73 KB 0644
hardware_udev.cpython-36.opt-1.pyc File 7.67 KB 0644
hardware_udev.cpython-36.pyc File 7.67 KB 0644
pkgUtils.cpython-36.opt-1.pyc File 269 B 0644
pkgUtils.cpython-36.pyc File 269 B 0644
pkgplatform.cpython-36.opt-1.pyc File 288 B 0644
pkgplatform.cpython-36.pyc File 288 B 0644
pmPlugin.cpython-36.opt-1.pyc File 2.45 KB 0644
pmPlugin.cpython-36.pyc File 2.45 KB 0644
rhnChannel.cpython-36.opt-1.pyc File 4.39 KB 0644
rhnChannel.cpython-36.pyc File 4.39 KB 0644
rhnHardware.cpython-36.opt-1.pyc File 468 B 0644
rhnHardware.cpython-36.pyc File 468 B 0644
rhnPackageInfo.cpython-36.opt-1.pyc File 1.9 KB 0644
rhnPackageInfo.cpython-36.pyc File 1.9 KB 0644
rhncli.cpython-36.opt-1.pyc File 7.17 KB 0644
rhncli.cpython-36.pyc File 7.17 KB 0644
rhnreg.cpython-36.opt-1.pyc File 27 KB 0644
rhnreg.cpython-36.pyc File 27.25 KB 0644
rhnreg_constants.cpython-36.opt-1.pyc File 13.69 KB 0644
rhnreg_constants.cpython-36.pyc File 13.69 KB 0644
rhnserver.cpython-36.opt-1.pyc File 4.6 KB 0644
rhnserver.cpython-36.pyc File 4.6 KB 0644
rpcServer.cpython-36.opt-1.pyc File 7.27 KB 0644
rpcServer.cpython-36.pyc File 7.27 KB 0644
rpmUtils.cpython-36.opt-1.pyc File 3.11 KB 0644
rpmUtils.cpython-36.pyc File 3.11 KB 0644
transaction.cpython-36.opt-1.pyc File 2.59 KB 0644
transaction.cpython-36.pyc File 2.59 KB 0644
tui.cpython-36.opt-1.pyc File 31.25 KB 0644
tui.cpython-36.pyc File 31.25 KB 0644
up2dateAuth.cpython-36.opt-1.pyc File 7.07 KB 0644
up2dateAuth.cpython-36.pyc File 7.07 KB 0644
up2dateErrors.cpython-36.opt-1.pyc File 13.32 KB 0644
up2dateErrors.cpython-36.pyc File 13.32 KB 0644
up2dateLog.cpython-36.opt-1.pyc File 2.48 KB 0644
up2dateLog.cpython-36.pyc File 2.48 KB 0644
up2dateUtils.cpython-36.opt-1.pyc File 4.06 KB 0644
up2dateUtils.cpython-36.pyc File 4.06 KB 0644