On 03/25/2012 01:42 AM, Martin Kletzander wrote:
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
This will create a default option named "uri" on the
framework side like logger for all of testcases.
If we want all of testcases to test a remote server that
results in adding uri for each of them in test.conf
that's not so good.
Do you think if it is better to write the default uri in
env.cfg, then parser it for all of testcases.