Skip to content

XSConsole Python 3 Conversion

Ashwin edited this page Aug 16, 2023 · 6 revisions

I have been working on the Python3 conversion of "github.com/xapi-project/xsconsole" to "github.com/xapi-project/xsconsole/tree/xsconsolepython3" . Repo xsconsolepython3 does not have latest changes.

Package Info:

1.Python 2to3(2to3-3) converter. Note: Under certain condition 2to3 does not correct "Except" handling with the new syntax .

2.After the conversion and changes to the code;UI testing was done.

Version Info: Python 3.6.8 (default, Nov 16 2020, 16:55:22)

3.Things which are working as expected after conversion is provided below:

1.xsconsole layout 2.All the menu and submenu name under Customize system 3.Status Display 4.Manage server Using XenCenter 5.Network and management and its submenu 6.Virtual machines and sub menu 7.Hardware and BIOS information 8.Keyboard and Timezone and its submenu keyboard language and layout. 9.Technical Support and its submenu Software Build information 10.Quit

4.Things which are broken after python3 conversion and update of PAM module are provided below based on my inhouse test:

1.Wintoplayout which displays Bannerstring ,timestring and hoststring does not display the value on screen after conversion this is due to change in arithemetic operation result error "/root/xsconsolechanged.py3/XSConsoleCurses.py", line 190, in ClippedAddStr raise Exception("addstr failed with "+Lang(e)+" for '"+inString+"' at "+str(xPos)+', '+str(inY)) Exception: addstr failed with ('addwstr() returned ERR',) for 'XenServer 8 ".

Code: XSConsoleTerm.py

2.Authentication module is broken with error message " Login Failed: ("'PamAuthenticator' object has no attribute 'start'",)" as start method was removed in the module https://github.com/FirefighterBlu3/python-pam/commit/f7c50902618322705154c6716c72dcc6c510511f. workaround if we bypass PAMconv function then we can access other option .

Code:XSConsoleAuth.py

3.Under Disk and storage repositories menu ,specify crash dump SR and few other submenu throws an error "('must use keyword argument for key function')"

4.Current storage repositories under Disk and storage repositories show message "No Storage Repositories Present" There are no Storage Repositories known to this host.

Code:Under plugins-base/XSFeatureSRInfo.py

5.Screen refresh time

For authentication issue we can think about using pamela https://pypi.org/project/pamela/.

Once Authentication issue is fixed ,we can continue testing other options to make sure it works as intended.

Clone this wiki locally