another cosmetic
[tests.git] / system / TestSlice.py
index 25912cc..8082749 100644 (file)
@@ -30,8 +30,11 @@ class CompleterTaskSshSlice (CompleterTask):
         if self.dry_run: return True
         if self.expected:       return retcod==0
         else:                   return retcod!=0
-    def failure_message (self): 
-        return "Could not ssh into slice %s @ %s"%(self.slicename,self.hostname)
+    def failure_message (self):
+        if self.expected:
+            return "Could not ssh into sliver %s@%s"%(self.slicename,self.hostname)
+        else:
+            return "Could still ssh into sliver%s@%s (that was expected to be down)"%(self.slicename,self.hostname)
 
 class TestSlice:
 
@@ -76,10 +79,16 @@ class TestSlice:
             isname=self.slice_spec['initscriptname']
             utils.header("Adding initscript name %s in %s"%(isname,slice_name))
             self.test_plc.apiserver.AddSliceTag(self.test_plc.auth_root(), slice_name,'initscript',isname)
-        if self.slice_spec.has_key ('vref'):
-            vref_value=self.slice_spec['vref']
-            self.test_plc.apiserver.AddSliceTag(self.test_plc.auth_root(), slice_name,'vref',vref_value)
-
+        if 'omf-friendly' in self.slice_spec:
+            utils.header("Making slice %s OMF-friendly"%slice_name)
+            self.test_plc.apiserver.AddSliceTag(self.test_plc.auth_root(), slice_name,'vref','omf')
+            self.test_plc.apiserver.AddSliceTag(self.test_plc.auth_root(), slice_name,'omf_control','yes')
+# setting vref directly like this was useful for multi-arch tests long ago - see wifilab
+# however this should rather use other tags by now, so we drop this for now
+#        if self.slice_spec.has_key ('vref'):
+#            vref_value=self.slice_spec['vref']
+#            self.test_plc.apiserver.AddSliceTag(self.test_plc.auth_root(), slice_name,'vref',vref_value)
+        # epilogue
         self.add_nodes()
 
     def check_vsys_defaults (self, options, *args, **kwds):
@@ -136,7 +145,7 @@ class TestSlice:
 
     # trying to reach the slice through ssh - expected to answer
     def ssh_slice (self, options, *args, **kwds):
-        "tries to ssh-enter the slice with the user key, to ensure slice creation"
+        "tries to ssh-enter the slice with the user key, to check for slice creation"
         return self.do_ssh_slice(options, expected=True, *args, **kwds)
 
     # when we expect the slice is not reachable