[virt-tools-list] [PATCH] Add oVirt nodeadmin code to repo

Cole Robinson crobinso at redhat.com
Thu Aug 19 15:44:00 UTC 2010


On 08/18/2010 02:14 PM, Darryl L. Pierce wrote:
> On Wed, Aug 18, 2010 at 01:32:29PM -0400, Cole Robinson wrote:
>> On 08/18/2010 11:21 AM, Darryl L. Pierce wrote:
>>> On Mon, Aug 16, 2010 at 11:08:17AM -0400, Darryl L. Pierce wrote:
>>>> diff -r a6184d2d4052 -r 23f2fc0a3cb2 src/virtManagerTui/__init__.py
>>>
>>> Any chance someone could give feedback or else push this into HG?
>>
>> For the sake of everyone else on the list, could we get a description of what
>> all this code is, how it can be invoked, what functional state it's in, etc.?
> 
> Sure.
> 
> The code in this patch is taken from the oVirt Node project. I was
> tasked a year ago with providing a large portion of Virt Manager's
> functionality but in a text-based version. I used Python to write the
> code (so I could borrow logic from Virt Manager) and Newt to write the
> user interface portion [1].
> 
> To run this code, the user need only invoke the nodeadmin module and
> follow the menus to administer domains, storage pools and volumes, and
> networks.
> 
> There is some drift between this code and the current Virt Manager
> functionality, which will get fixed after the code's upstream and
> refactored.
> 
> Cole and I have talked a few times about factoring out the business
> logic in the GUI Virt Manager into code that can be shared between both
> it and the TUI version.
> 

Sweet, I just played with it briefly. Quite cool! I've pushed this now,
with a bit more of a commit message:

http://hg.fedorahosted.org/hg/virt-manager/rev/25507d46ecbb

If others want to try it out, code can be invoked with:

cd src/virtManagerTui
python nodeadmin.py

Additional requirements beyond plain virt-manager are a system installed
IPy and newt-python (or whatever package provides the 'snack' module)

Some short term things to address:

- Add a virt-manager-tui startup wrapper similar to src/virt-manager.py,
which sets up logging and does basic option parsing. At the very least
we need a --connect parameter for specifying a non-default libvirt URI,
even if things blow up in spectacular ways for anything except
qemu:///system. We should probably share the default connection logic
between virt-manager.py and virt-manager-tui.py

- Code is hardcoded to log to /var/log/ovirt-node.log, we should switch
that to ~/.virt-manager.

Also, consider editing tests/pylint-virt-manager.sh to run against the
TUI code. You'll probably need to edit that file to ignore some false
positives, but pylint catches a lot of bugs.

Thanks,
Cole




More information about the virt-tools-list mailing list