('GetLeases', []),
('DeleteLeases',True),
('AddConfFile','True'),
+ ('GetSliceTags',[]),
('system.listMethods',[]),
]
'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,
'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')
@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
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()
'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',