[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]