Adding linux ns3 server unit test
[nepi.git] / src / nepi / resources / planetlab / openvswitch / ovs.py
index a201329..f4b50c6 100644 (file)
@@ -43,13 +43,13 @@ class OVSWitch(LinuxApplication):
 
         """
         bridge_name = Attribute("bridge_name", "Name of the switch/bridge",
-                flags = Flags.ExecReadOnly)    
+                flags = Flags.Design)  
         virtual_ip_pref = Attribute("virtual_ip_pref", "Virtual IP/PREFIX of the switch",
-                flags = Flags.ExecReadOnly)       
+                flags = Flags.Design)  
         controller_ip = Attribute("controller_ip", "IP of the controller",
-                flags = Flags.ExecReadOnly)
+                flags = Flags.Design)  
         controller_port = Attribute("controller_port", "Port of the controller",
-                flags = Flags.ExecReadOnly)
+                flags = Flags.Design)  
 
         cls._register_attribute(bridge_name)
         cls._register_attribute(virtual_ip_pref)
@@ -187,7 +187,7 @@ class OVSWitch(LinuxApplication):
         (out, err), proc = self.node.check_output(self.ovs_checks, 'start_srv_exitcode')
 
         if out != "0\n":
-            self.debug("Servers have not started")
+            self.error("Servers have not started")
             raise RuntimeError, msg    
                                
         cmd = "ps -A | grep ovsdb-server"
@@ -204,7 +204,7 @@ class OVSWitch(LinuxApplication):
         (out, err), proc = self.node.check_output(self.ovs_checks, 'status_srv_exitcode')
         
         if out != "0\n":
-            self.debug("Servers are not running")
+            self.error("Servers are not running")
             raise RuntimeError, msg
         
         self.info("Servers started")  
@@ -293,7 +293,7 @@ class OVSWitch(LinuxApplication):
         from nepi.resources.planetlab.openvswitch.ovsport import OVSPort
         rm = self.get_connected(OVSPort.get_rtype())
 
-        if rm[0].state < ResourceState.FINISHED:
+        if rm[0].state < ResourceState.STOPPED:
             self.ec.schedule(reschedule_delay, self.release)
             return