upgrade documentation
authorJulien Tribino <julien.tribino@inria.fr>
Wed, 12 Jun 2013 08:47:29 +0000 (10:47 +0200)
committerJulien Tribino <julien.tribino@inria.fr>
Wed, 12 Jun 2013 08:47:29 +0000 (10:47 +0200)
src/nepi/execution/ec.py
src/nepi/execution/resource.py
src/nepi/execution/scheduler.py
src/nepi/resources/ns3/ns3wrapper_server.py
src/nepi/resources/omf/channel.py
src/nepi/resources/omf/node.py
src/nepi/util/sfa_api.py

index ba573c4..c4917c0 100644 (file)
@@ -54,10 +54,9 @@ class ExperimentController(object):
         :type root_dir: str
 
     .. note::
-
-       This class is the only one used by the User. Indeed, the user "talks"
-       only with the Experiment Controller and this latter forward to 
-       the different Resources Manager the order provided by the user.
+        This class is the only one used by the User. Indeed, the user "talks"
+        only with the Experiment Controller and this latter forward to 
+        the different Resources Manager the order provided by the user.
 
     """
 
@@ -165,7 +164,8 @@ class ExperimentController(object):
     def resources(self):
         """ Returns the list of all the Resource Manager Id
 
-        :rtype:  set
+        :rtype: set
+
         """
         return self._resources.keys()
 
@@ -175,8 +175,8 @@ class ExperimentController(object):
 
         :param rtype: Type of the RM
         :type rtype: str
-        :return : Id of the RM
-        :rtype:  int
+        :return: Id of the RM
+        :rtype: int
         """
         # Get next available guid
         guid = self._guid_generator.next(guid)
@@ -194,7 +194,7 @@ class ExperimentController(object):
 
         :param guid: Guid of the RM
         :type guid: int
-        :return : List of attributes
+        :return: List of attributes
         :rtype: list
         """
         rm = self.get_resource(guid)
@@ -209,7 +209,6 @@ class ExperimentController(object):
 
             :param guid2: Second guid to connect
             :type guid: ResourceManager
-
         """
         rm1 = self.get_resource(guid1)
         rm2 = self.get_resource(guid2)
index 078b07d..9f1cfa4 100644 (file)
@@ -405,11 +405,11 @@ class ResourceManager(Logger):
         conditions.append((group, state, time))
 
     def get_connected(self, rtype):
-        """ Return the list of RM with the type 'rtype' 
+        """ Return the list of RM with the type 'rtype'
 
         :param rtype: Type of the RM we look for
         :type rtype: str
-        :return : list of guid
+        :return: list of guid
         """
         connected = []
         for guid in self.connections:
@@ -473,8 +473,8 @@ class ResourceManager(Logger):
 
     def set_with_conditions(self, name, value, group, state, time):
         """ Set value 'value' on attribute with name 'name' when 'time' 
-            has elapsed since all elements in 'group' have reached state
-           'state'
+        has elapsed since all elements in 'group' have reached state
+        'state'
 
         :param name: Name of the attribute to set
         :type name: str
@@ -486,7 +486,6 @@ class ResourceManager(Logger):
         :type state: str
         :param time: Time to wait after 'state' is reached on all RMs in group. (e.g. '2s')
         :type time: str
-
         """
 
         reschedule = False
index 1b35362..8d70fbb 100644 (file)
@@ -42,9 +42,11 @@ class HeapScheduler(object):
 
     .. note::
 
-    This class is thread safe.
-    All calls to C Extensions are made atomic by the GIL in the CPython implementation.
-    heapq.heappush, heapq.heappop, and list access are therefore thread-safe """
+        This class is thread safe.
+        All calls to C Extensions are made atomic by the GIL in the CPython implementation.
+        heapq.heappush, heapq.heappop, and list access are therefore thread-safe.
+
+    """
 
     def __init__(self):
         super(HeapScheduler, self).__init__()
index 982d82e..2773948 100644 (file)
@@ -16,7 +16,7 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-"""
+
 
 class Server(object):
     def __init__(self, root_dir = ".", log_level = "ERROR", 
@@ -361,4 +361,4 @@ class Forwarder(object):
             self._ctrl_sock.close()
         except:
             pass
-"""
+
index 1eaef05..02974a8 100644 (file)
@@ -11,7 +11,7 @@
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
-c
+
     You should have received a copy of the GNU General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
index 156ba86..95f630b 100644 (file)
@@ -150,7 +150,7 @@ class OMFNode(ResourceManager):
         """
         pass
 
-     def start(self):
+    def start(self):
         """Start the RM. It means nothing special for an interface for now
            It becomes STARTED as soon as this method starts.
 
index 7356be5..f3df754 100644 (file)
@@ -22,7 +22,7 @@
 import logging
 import hashlib
 
-from parser import sfa_sfav1
+from sfa_sfav1 import SFAResourcesParser
 import subprocess
 import warnings
 
@@ -262,8 +262,8 @@ class SFAApiFactory(object):
     def get_api(slice_id = None, sfi_auth = None, sfi_user = None,
             sfi_registry = None, sfi_sm = None, timeout = None, private_key = None):
 
-        key = cls.make_key(aggregate = 'ple', slice_id, sfi_auth, sfi_user, sfi_registry, sfi_sm,
-            timeout, private_key)
+        key = cls.make_key(slice_id, sfi_auth, sfi_user, sfi_registry,
+                           sfi_sm, timeout, private_key, aggregate = 'ple')
         api = cls._apis.get(key)
         cls.lock.acquire()
         api._fetch_resources_info(resources = False)