[virt-tools-list] [RFC PATCH 03/10] tui: Hook up --connect option for setting the default URI

Cole Robinson crobinso at redhat.com
Mon Apr 18 18:06:45 UTC 2011


Kind of a hack, but works for now. Allows us to pass in libvirt test:///...
URIs which making client development way way easier.

Signed-off-by: Cole Robinson <crobinso at redhat.com>
---
 src/virt-manager-tui.py.in |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/virt-manager-tui.py.in b/src/virt-manager-tui.py.in
index c76eb9f..03cf57a 100644
--- a/src/virt-manager-tui.py.in
+++ b/src/virt-manager-tui.py.in
@@ -135,6 +135,11 @@ def main():
                             (virtinst.__version__) +
                            "\n\n" + msg)
 
+    # Hack in the default URI for this instance of the tui
+    if options.uri:
+        import virtManagerTui.libvirtworker
+        virtManagerTui.libvirtworker.default_url = options.uri
+
     # start the app
     from virtManagerTui.mainmenu import MainMenu
     MainMenu()
-- 
1.7.4




More information about the virt-tools-list mailing list