change PlanetLab to planetlab for the PlanetLab node
authorJulien Tribino <julien.tribino@inria.fr>
Fri, 14 Jun 2013 08:58:44 +0000 (10:58 +0200)
committerJulien Tribino <julien.tribino@inria.fr>
Fri, 14 Jun 2013 08:58:44 +0000 (10:58 +0200)
src/nepi/resources/linux/node.py
src/nepi/resources/omf/application.py
src/nepi/resources/omf/channel.py
src/nepi/resources/omf/interface.py
src/nepi/resources/omf/node.py
src/nepi/resources/planetlab/node.py
test/resources/omf/vlc.py

index 50dd226..de194e5 100644 (file)
@@ -184,8 +184,8 @@ class LinuxNode(ResourceManager):
     def deploy(self):
         if self.state == ResourceState.NEW:
             try:
-               self.discover()
-               self.provision()
+                self.discover()
+                self.provision()
             except:
                 self._state = ResourceState.FAILED
                 raise
index 22c8dca..6da1160 100644 (file)
@@ -144,7 +144,7 @@ class OMFApplication(ResourceManager):
                 self._state = ResourceState.FAILED
                 msg = "Credentials are not initialzed. XMPP Connections impossible"
                 self.error(msg)
-                return
+                raise
         else :
             self._state = ResourceState.FAILED
             msg = "Application's information are not initialized"
@@ -163,7 +163,7 @@ class OMFApplication(ResourceManager):
             self._state = ResourceState.FAILED
             msg = "Credentials were not initialzed. XMPP Connections impossible"
             self.error(msg)
-            return
+            raise
         super(OMFApplication, self).stop()
         self._state = ResourceState.FINISHED
         
index 02974a8..fa8df03 100644 (file)
@@ -153,7 +153,7 @@ class OMFChannel(ResourceManager):
                 self._state = ResourceState.FAILED
                 msg = "Credentials are not initialzed. XMPP Connections impossible"
                 self.debug(msg)
-                return
+                raise
         else :
             msg = "Channel's value is not initialized"
             self.error(msg)
@@ -170,7 +170,7 @@ class OMFChannel(ResourceManager):
 
     def stop(self):
         """Stop the RM. It means nothing special for a channel for now
-           It becomes STOPPED as soon as this method stops
+           It becomes STOPPED as soon as this method is called
 
         """
         super(OMFChannel, self).stop()
index e9877a1..0e1dad9 100644 (file)
@@ -133,7 +133,7 @@ class OMFWifiInterface(ResourceManager):
                         self._state = ResourceState.FAILED
                         msg = "Credentials are not initialzed. XMPP Connections impossible"
                         self.debug(msg)
-                        return
+                        raise
                 else :
                     msg = "The channel is connected with an undefined node"
                     self.error(msg)
index 95f630b..4658cb5 100644 (file)
@@ -134,7 +134,7 @@ class OMFNode(ResourceManager):
                 self._state = ResourceState.FAILED
                 msg = "Credentials are not initialzed. XMPP Connections impossible"
                 self.debug(msg)
-                return
+                raise AttributeError, msg
 
         super(OMFNode, self).deploy()
 
index cbfd1d5..45cd3a3 100644 (file)
@@ -162,7 +162,7 @@ class PlanetlabNode(LinuxNode):
         cls._register_attribute(timeframe)
 
     def __init__(self, ec, guid):
-        super(PLanetLabNode, self).__init__(ec, guid)
+        super(PLanetlabNode, self).__init__(ec, guid)
 
         self._plapi = None
     
index aae3084..6a44879 100755 (executable)
@@ -124,6 +124,11 @@ class OMFVLCTestCase(unittest.TestCase):
         self.ec.set(self.app2, 'xmppPassword', "1234")
 
         self.app3 = self.ec.register_resource("OMFApplication")
+        self.ec.set(self.app3, 'appid', 'Kill#2')
+        self.ec.set(self.app3, 'path', "/usr/bin/killall")
+        self.ec.set(self.app3, 'args', "vlc")
+        self.ec.set(self.app3, 'env', " ")
+
         self.app4 = self.ec.register_resource("OMFApplication")
 
         self.app5 = self.ec.register_resource("OMFApplication")