change the name of the exp-id in the OMF API for the EC one
authorJulien Tribino <julien.tribino@inria.fr>
Thu, 3 Oct 2013 16:50:13 +0000 (18:50 +0200)
committerJulien Tribino <julien.tribino@inria.fr>
Thu, 3 Oct 2013 16:50:13 +0000 (18:50 +0200)
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/omf/omf_api.py

index 2f7628d..a65c775 100644 (file)
@@ -88,8 +88,6 @@ class OMFApplication(OMFResource):
 
     @property
     def exp_id(self):
-        if self.ec.exp_id.startswith('exp-'):
-            return None
         return self.ec.exp_id
 
     @property
index 20c60b5..e02593e 100644 (file)
@@ -72,8 +72,6 @@ class OMFChannel(OMFResource):
 
     @property
     def exp_id(self):
-        if self.ec.exp_id.startswith('exp-'):
-            return None
         return self.ec.exp_id
 
     def valid_connection(self, guid):
index 0aea5bb..08d39ec 100644 (file)
@@ -106,8 +106,6 @@ class OMFWifiInterface(OMFResource):
 
     @property
     def exp_id(self):
-        if self.ec.exp_id.startswith('exp-'):
-            return None
         return self.ec.exp_id
 
     @property
index 68b4df3..840cfe1 100644 (file)
@@ -73,8 +73,6 @@ class OMFNode(OMFResource):
 
     @property
     def exp_id(self):
-        if self.ec.exp_id.startswith('exp-'):
-            return None
         return self.ec.exp_id
 
     def valid_connection(self, guid):
index baa585f..5def17b 100644 (file)
@@ -29,8 +29,6 @@ from nepi.util.logger import Logger
 from nepi.resources.omf.omf_client import OMFClient
 from nepi.resources.omf.messages_5_4 import MessageHandler
 
-from nepi.util.timefuncs import tsformat 
-
 class OMFAPI(Logger):
     """
     .. class:: Class Args :
@@ -70,10 +68,7 @@ class OMFAPI(Logger):
 
         """
         super(OMFAPI, self).__init__("OMFAPI")
-        date = tsformat()
-        tz = -time.altzone if time.daylight != 0 else -time.timezone
-        date += "%+06.2f" % (tz / 3600) # timezone difference is in seconds
-        self._exp_id = exp_id or date
+        self._exp_id = exp_id 
         self._user = "%s-%s" % (slice, self._exp_id)
         self._slice = slice
         self._host = host