From 4ceca163f5e50dbfcaaed2e5401a14b0bb755696 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 2 Jun 2015 17:38:22 +0200 Subject: [PATCH] deprecated -y option of run_log/TestMain we only test geni-v3 rspecs --- system/TestAuthSfa.py | 4 +--- system/TestMain.py | 8 +++----- system/TestSliceSfa.py | 15 +++++++-------- system/config_default.py | 41 ++++++++++++++++++---------------------- 4 files changed, 29 insertions(+), 39 deletions(-) diff --git a/system/TestAuthSfa.py b/system/TestAuthSfa.py index 4d83052..981d4e6 100644 --- a/system/TestAuthSfa.py +++ b/system/TestAuthSfa.py @@ -47,10 +47,8 @@ class TestAuthSfa: # self.piuser = self.auth_sfa_spec['piuser'] # self.regularuser = self.auth_sfa_spec['regularuser'] - def rspec_style (self): return self.auth_sfa_spec['rspec_style'] - def sfi_path (self): - return "/root/sfi/{}".format(self.rspec_style()) + return "/root/sfi" # the hrn for the root authority def root_hrn (self): diff --git a/system/TestMain.py b/system/TestMain.py index 19a934d..5a2ec32 100755 --- a/system/TestMain.py +++ b/system/TestMain.py @@ -92,8 +92,6 @@ class Step: class TestMain: default_config = [ 'default' ] -# default_rspec_styles = [ 'pl', 'pg' ] - default_rspec_styles = [ 'pg' ] default_build_url = "git://git.onelab.eu/tests" @@ -195,7 +193,7 @@ run with -l to see a list of available steps type=int, help="run steps only on plc numbered , starting at 1") parser.add_argument("-y", "--rspec-style", action="append", dest="rspec_styles", default=[], - help="pl is for planetlab rspecs, pg is for protogeni") + help="OBSOLETE - for compat only") parser.add_argument("-k", "--keep-going", action="store", dest="keep_going", default=False, help="proceeds even if some steps are failing") parser.add_argument("-D", "--dbname", action="store", dest="dbname", default=None, @@ -245,8 +243,8 @@ run with -l to see a list of available steps setattr(self.options, optname, flatten([arg.split() for arg in getattr(self.options, optname)])) - if not self.options.rspec_styles: - self.options.rspec_styles = TestMain.default_rspec_styles + if self.options.rspec_styles: + print("WARNING: -y option is obsolete") # handle defaults and option persistence for recname, filename, default, need_reverse in ( diff --git a/system/TestSliceSfa.py b/system/TestSliceSfa.py index 61ae978..d230e5b 100644 --- a/system/TestSliceSfa.py +++ b/system/TestSliceSfa.py @@ -30,16 +30,15 @@ class TestSliceSfa: return self.test_auth_sfa.sfi_path() # send back up to the TestAuthSfa - def sfi_path (self): return self.test_auth_sfa.sfi_path() - def rspec_style (self): return self.test_auth_sfa.rspec_style() - def sfi_pi(self, *args, **kwds): return self.test_auth_sfa.sfi_pi(*args, **kwds) - def sfi_user(self, *args, **kwds): return self.test_auth_sfa.sfi_user(*args, **kwds) + def sfi_path (self): + return self.test_auth_sfa.sfi_path() + def sfi_pi(self, *args, **kwds): + return self.test_auth_sfa.sfi_pi(*args, **kwds) + def sfi_user(self, *args, **kwds): + return self.test_auth_sfa.sfi_user(*args, **kwds) def discover_option(self): - if self.rspec_style() == 'pg': - return "-r GENI" - else: - return "-r sfa" + return "-r GENI" # those are step names exposed as methods of TestPlc, hence the _sfa diff --git a/system/config_default.py b/system/config_default.py index fc789c7..c68191c 100644 --- a/system/config_default.py +++ b/system/config_default.py @@ -11,9 +11,7 @@ # values like 'hostname', 'ip' and the like are rewritten later with a TestPool object -# so that sfa users get different mails whether they are based on pl or pg pldomain = "onelab.eu" -pgdomain = "emulab.eu" ### for the sfa dual setup def login_base (index): @@ -22,14 +20,15 @@ def login_base (index): # index=3=>'sitea' 4=>'siteb' else: return 'site{}'.format(chr(index+94)) -def sfa_login_base (index, rspec_style): - return "sfa{}".format(rspec_style) +# only one rspec style +def sfa_login_base (index): + return "sfa" def sfa_root (index): # use plt (planetlab test) instead of pl # otherwise a triangular test ends up with 'plc' # plta, pltb, ... - return 'plt{}'.format(chr(index+96)) + return '{}'.format(chr(index+96)) def nodes(options, index): return [{'name' : 'node{}'.format(index), @@ -558,15 +557,14 @@ def sfa (options, index) : 'SFA_AGGREGATE_ENABLED' : 'true', }, # details of the slices to create - 'auth_sfa_specs' : [ test_auth_sfa_spec(options, index,rspec_style) - for rspec_style in options.rspec_styles ] + 'auth_sfa_specs' : [ test_auth_sfa_spec(options, index) ] } -# rspec_style is 'pl' for sfav1 or 'pg' for pgv2 -def test_auth_sfa_spec (options, index, rspec_style): - domain = pldomain if rspec_style == 'pl' else pgdomain +# rspec_style used to be 'pl' for sfav1 or 'pg' for pgv2 - OBSOLETE +def test_auth_sfa_spec (options, index): + domain = pldomain # the auth/site part per se - login_base = sfa_login_base(index,rspec_style) + login_base = sfa_login_base(index) hrn_prefix = '{}.{}'.format(sfa_root(index),login_base) def full_hrn(x): return "{}.{}".format(hrn_prefix,x) def full_mail(x): return "{}@test.{}".format(x,domain) @@ -587,7 +585,7 @@ def test_auth_sfa_spec (options, index, rspec_style): 'email': full_mail (user_alias), 'key_name': 'key_sfauser', 'register_options': [ '--extra',"first_name=Fake", - '--extra',"last_name=SFA-style-{}".format(rspec_style), + '--extra',"last_name=SFA", ], 'update_options': [ '--extra',"enabled=true", ], @@ -596,10 +594,9 @@ def test_auth_sfa_spec (options, index, rspec_style): slice_spec = { 'name': 'sl', 'register_options': [ '--researchers', full_hrn (user_alias), - # xxx - '--extra', "description=SFA-testing-{}".format(rspec_style), - '--extra', "url=http://slice{}.test.onelab.eu/".format(index), - '--extra', "max_nodes=2", + '--extra', "description=SFA-testing", + '--extra', "url=http://slice{}.test.onelab.eu/".format(index), + '--extra', "max_nodes=2", ], 'key_name': 'key_sfauser', 'nodenames': all_nodenames(options, index), @@ -607,13 +604,12 @@ def test_auth_sfa_spec (options, index, rspec_style): # we're already in a dedicated site/authority so no need to encumber with odd names - return { #'hrn_prefix': hrn_prefix, + return { 'login_base' : login_base, - 'domain':domain, - 'rspec_style':rspec_style, - 'pi_spec': pi_spec, - 'user_spec': user_spec, - 'slice_spec': slice_spec, + 'domain' : domain, + 'pi_spec' : pi_spec, + 'user_spec' : user_spec, + 'slice_spec' : slice_spec, } @@ -630,7 +626,6 @@ def sample_test_plc_spec (): options = Void() options.size = 1 - options.rspec_styles = ['pg'] return config([], options)[0] -- 2.43.0