git://git.onelab.eu
/
nepi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6a8c7da
)
change PlanetLab to planetlab for the PlanetLab node
author
Julien Tribino
<julien.tribino@inria.fr>
Fri, 14 Jun 2013 08:58:44 +0000
(10:58 +0200)
committer
Julien Tribino
<julien.tribino@inria.fr>
Fri, 14 Jun 2013 08:58:44 +0000
(10:58 +0200)
src/nepi/resources/linux/node.py
patch
|
blob
|
history
src/nepi/resources/omf/application.py
patch
|
blob
|
history
src/nepi/resources/omf/channel.py
patch
|
blob
|
history
src/nepi/resources/omf/interface.py
patch
|
blob
|
history
src/nepi/resources/omf/node.py
patch
|
blob
|
history
src/nepi/resources/planetlab/node.py
patch
|
blob
|
history
test/resources/omf/vlc.py
patch
|
blob
|
history
diff --git
a/src/nepi/resources/linux/node.py
b/src/nepi/resources/linux/node.py
index
50dd226
..
de194e5
100644
(file)
--- a/
src/nepi/resources/linux/node.py
+++ b/
src/nepi/resources/linux/node.py
@@
-184,8
+184,8
@@
class LinuxNode(ResourceManager):
def deploy(self):
if self.state == ResourceState.NEW:
try:
def deploy(self):
if self.state == ResourceState.NEW:
try:
- self.discover()
- self.provision()
+
self.discover()
+
self.provision()
except:
self._state = ResourceState.FAILED
raise
except:
self._state = ResourceState.FAILED
raise
diff --git
a/src/nepi/resources/omf/application.py
b/src/nepi/resources/omf/application.py
index
22c8dca
..
6da1160
100644
(file)
--- a/
src/nepi/resources/omf/application.py
+++ b/
src/nepi/resources/omf/application.py
@@
-144,7
+144,7
@@
class OMFApplication(ResourceManager):
self._state = ResourceState.FAILED
msg = "Credentials are not initialzed. XMPP Connections impossible"
self.error(msg)
self._state = ResourceState.FAILED
msg = "Credentials are not initialzed. XMPP Connections impossible"
self.error(msg)
- r
eturn
+ r
aise
else :
self._state = ResourceState.FAILED
msg = "Application's information are not initialized"
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)
self._state = ResourceState.FAILED
msg = "Credentials were not initialzed. XMPP Connections impossible"
self.error(msg)
- r
eturn
+ r
aise
super(OMFApplication, self).stop()
self._state = ResourceState.FINISHED
super(OMFApplication, self).stop()
self._state = ResourceState.FINISHED
diff --git
a/src/nepi/resources/omf/channel.py
b/src/nepi/resources/omf/channel.py
index
02974a8
..
fa8df03
100644
(file)
--- a/
src/nepi/resources/omf/channel.py
+++ b/
src/nepi/resources/omf/channel.py
@@
-153,7
+153,7
@@
class OMFChannel(ResourceManager):
self._state = ResourceState.FAILED
msg = "Credentials are not initialzed. XMPP Connections impossible"
self.debug(msg)
self._state = ResourceState.FAILED
msg = "Credentials are not initialzed. XMPP Connections impossible"
self.debug(msg)
- r
eturn
+ r
aise
else :
msg = "Channel's value is not initialized"
self.error(msg)
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
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()
"""
super(OMFChannel, self).stop()
diff --git
a/src/nepi/resources/omf/interface.py
b/src/nepi/resources/omf/interface.py
index
e9877a1
..
0e1dad9
100644
(file)
--- a/
src/nepi/resources/omf/interface.py
+++ b/
src/nepi/resources/omf/interface.py
@@
-133,7
+133,7
@@
class OMFWifiInterface(ResourceManager):
self._state = ResourceState.FAILED
msg = "Credentials are not initialzed. XMPP Connections impossible"
self.debug(msg)
self._state = ResourceState.FAILED
msg = "Credentials are not initialzed. XMPP Connections impossible"
self.debug(msg)
- r
eturn
+ r
aise
else :
msg = "The channel is connected with an undefined node"
self.error(msg)
else :
msg = "The channel is connected with an undefined node"
self.error(msg)
diff --git
a/src/nepi/resources/omf/node.py
b/src/nepi/resources/omf/node.py
index
95f630b
..
4658cb5
100644
(file)
--- a/
src/nepi/resources/omf/node.py
+++ b/
src/nepi/resources/omf/node.py
@@
-134,7
+134,7
@@
class OMFNode(ResourceManager):
self._state = ResourceState.FAILED
msg = "Credentials are not initialzed. XMPP Connections impossible"
self.debug(msg)
self._state = ResourceState.FAILED
msg = "Credentials are not initialzed. XMPP Connections impossible"
self.debug(msg)
- r
eturn
+ r
aise AttributeError, msg
super(OMFNode, self).deploy()
super(OMFNode, self).deploy()
diff --git
a/src/nepi/resources/planetlab/node.py
b/src/nepi/resources/planetlab/node.py
index
cbfd1d5
..
45cd3a3
100644
(file)
--- a/
src/nepi/resources/planetlab/node.py
+++ b/
src/nepi/resources/planetlab/node.py
@@
-162,7
+162,7
@@
class PlanetlabNode(LinuxNode):
cls._register_attribute(timeframe)
def __init__(self, ec, guid):
cls._register_attribute(timeframe)
def __init__(self, ec, guid):
- super(PLanet
L
abNode, self).__init__(ec, guid)
+ super(PLanet
l
abNode, self).__init__(ec, guid)
self._plapi = None
self._plapi = None
diff --git
a/test/resources/omf/vlc.py
b/test/resources/omf/vlc.py
index
aae3084
..
6a44879
100755
(executable)
--- a/
test/resources/omf/vlc.py
+++ b/
test/resources/omf/vlc.py
@@
-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.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")
self.app4 = self.ec.register_resource("OMFApplication")
self.app5 = self.ec.register_resource("OMFApplication")