def deploy(self):
if self.state == ResourceState.NEW:
try:
- self.discover()
- self.provision()
+ self.discover()
+ self.provision()
except:
self._state = ResourceState.FAILED
raise
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"
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
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)
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()
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)
self._state = ResourceState.FAILED
msg = "Credentials are not initialzed. XMPP Connections impossible"
self.debug(msg)
- return
+ raise AttributeError, msg
super(OMFNode, self).deploy()
cls._register_attribute(timeframe)
def __init__(self, ec, guid):
- super(PLanetLabNode, self).__init__(ec, guid)
+ super(PLanetlabNode, self).__init__(ec, guid)
self._plapi = None
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")