From: Thierry Parmentelat Date: Tue, 18 Dec 2012 08:33:20 +0000 (+0100) Subject: test PLC_VSYS_DEFAULTS X-Git-Tag: tests-5.1-9~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8325e6e88cf35da62d7bc44744980dc293e673d7;p=tests.git test PLC_VSYS_DEFAULTS --- diff --git a/system/TestApiserver.py b/system/TestApiserver.py index e453739..ea85300 100644 --- a/system/TestApiserver.py +++ b/system/TestApiserver.py @@ -50,6 +50,7 @@ server_methods = [ ('GetNodes' , []), ('GetLeases', []), ('DeleteLeases',True), ('AddConfFile','True'), + ('GetSliceTags',[]), ('system.listMethods',[]), ] diff --git a/system/TestPlc.py b/system/TestPlc.py index 2e9d009..1352477 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -94,7 +94,7 @@ class TestPlc: 'sfi_list@1', 'sfi_show@1', 'sfi_slices@1', 'sfa_utest@1', SEPSFA, # we used to run plcsh_stress_test, and then ssh_node_debug and ssh_node_boot # but as the stress test might take a while, we sometimes missed the debug mode.. - 'ssh_node_debug@1', 'plcsh_stress_test@1', SEP, + 'check_vsys_defaults', 'ssh_node_debug@1', 'plcsh_stress_test@1', SEP, 'ssh_node_boot@1', 'ssh_slice', 'check_initscripts', SEP, 'ssh_slice_sfa@1', 'sfa_delete_slice@1', 'sfa_delete_user@1', SEPSFA, 'cross_check_tcp@1', 'check_system_slice', SEP, @@ -639,6 +639,7 @@ class TestPlc: 'PLC_RESERVATION_GRANULARITY', 'PLC_OMF_ENABLED', 'PLC_OMF_XMPP_SERVER', + 'PLC_VSYS_DEFAULTS', ]: fileconf.write ('e %s\n%s\n'%(var,self.plc_spec[var])) fileconf.write('w\n') @@ -1129,6 +1130,9 @@ class TestPlc: @slice_mapper def ssh_slice_off (self): pass + @slice_mapper + def check_vsys_defaults(self): pass + @node_mapper def keys_clear_known_hosts (self): pass diff --git a/system/TestSlice.py b/system/TestSlice.py index f062884..8cb3aab 100644 --- a/system/TestSlice.py +++ b/system/TestSlice.py @@ -60,6 +60,16 @@ class TestSlice: self.add_nodes() + def check_vsys_defaults (self, options, *args, **kwds): + "check vsys tags match PLC_VSYS_DEFAULTS" + auth = self.owner_auth() + slice_fields = self.slice_spec['slice_fields'] + slice_name = slice_fields['name'] + vsys_tags = self.test_plc.apiserver.GetSliceTags (auth,{'tagname':'vsys','name':slice_name}) + values=[ st['value'] for st in vsys_tags ] + expected=self.test_plc.plc_spec['expected_vsys_tags'] + return set(values) == set(expected) + # just add the nodes and handle tags def add_nodes (self): auth = self.owner_auth() diff --git a/system/config_default.py b/system/config_default.py index d7de172..5dbea75 100644 --- a/system/config_default.py +++ b/system/config_default.py @@ -484,6 +484,8 @@ def plc (options,index) : 'PLC_NET_DNS1' : 'deferred-dns-1', 'PLC_NET_DNS2' : 'deferred-dns-2', 'PLC_RESERVATION_GRANULARITY':1800, + 'PLC_VSYS_DEFAULTS':' , vif_up, vif_down, fd_tuntap, promisc, ', + 'expected_vsys_tags': [ 'vif_up', 'vif_down', 'fd_tuntap', 'promisc', ], # minimal config so the omf plugins actually trigger 'PLC_OMF_ENABLED' : 'true', 'PLC_OMF_XMPP_SERVER': 'deferred-myplc-hostname',