X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Fomf%2Finterface.py;h=b4c1df7b38d80d2f1674eb78e2aa08ee89733026;hb=09ac796bac9aa2c41c5ad830f404fe128fffb22d;hp=1a253ac0f786a07941d06bce093dccfedf93a1f2;hpb=332038a4a4e7e8c74db87dea003e4c02418175d6;p=nepi.git diff --git a/src/nepi/resources/omf/interface.py b/src/nepi/resources/omf/interface.py index 1a253ac0..b4c1df7b 100644 --- a/src/nepi/resources/omf/interface.py +++ b/src/nepi/resources/omf/interface.py @@ -19,7 +19,7 @@ # Julien Tribino from nepi.execution.resource import ResourceManager, clsinit_copy, \ - ResourceState, reschedule_delay, failtrap + ResourceState, reschedule_delay from nepi.execution.attribute import Attribute, Flags from nepi.resources.omf.node import OMFNode @@ -164,8 +164,7 @@ class OMFWifiInterface(OMFResource): return True - @failtrap - def deploy(self): + def do_deploy(self): """ Deploy the RM. It means : Get the xmpp client and send messages using OMF 5.4 protocol to configure the interface. It becomes DEPLOYED after sending messages to configure the interface @@ -201,21 +200,16 @@ class OMFWifiInterface(OMFResource): if self.configure_iface(): self.configure_ip() - super(OMFWifiInterface, self).deploy() + super(OMFWifiInterface, self).do_deploy() - def release(self): + def do_release(self): """ Clean the RM at the end of the experiment and release the API """ - try: - if self._omf_api : - OMFAPIFactory.release_api(self.get('xmppSlice'), - self.get('xmppHost'), self.get('xmppPort'), - self.get('xmppPassword'), exp_id = self.exp_id) - except: - import traceback - err = traceback.format_exc() - self.error(err) - - super(OMFWifiInterface, self).release() + if self._omf_api: + OMFAPIFactory.release_api(self.get('xmppSlice'), + self.get('xmppHost'), self.get('xmppPort'), + self.get('xmppPassword'), exp_id = self.exp_id) + + super(OMFWifiInterface, self).do_release()