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

[libvirt] [test-API PATCH 4/6] Add default 'uri' parameter to all tests



Tests should be able to run on various hypervisors and machines. Now
we have only two tests that have an option to do something
remotely. This commit allows tests to see 'uri' parameter that they
should connect to. However it doesn't have to be used always
(migration etc.)
---
 generator.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/generator.py b/generator.py
index 4f4478b..5a4652a 100644
--- a/generator.py
+++ b/generator.py
@@ -154,6 +154,12 @@ class FuncGen(object):
             clean_ret = -1
             try:
                 try:
+                    # having 'None' as default ensures we use the
+                    # correct URI taken from libvirt (configuration,
+                    # environment variables, etc.), but one can always
+                    # specify a different machine
+                    if 'uri' not in case_params:
+                        case_params['uri'] = None
                     if case_ref_name != 'sleep':
                         case_params['logger'] = case_logger

-- 
1.7.3.4


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