changing mobility-type to mobility_type
[sfa.git] / sfa / iotlab / OARrestapi.py
index 1867908..515b792 100644 (file)
@@ -307,6 +307,7 @@ class ParsingResourcesFull():
         'archi': self.AddHardwareType,
         'state': self.AddBootState,
         'id': self.AddOarNodeId,
+        'mobility_type': self.AddMobilityType,
         }
 
 
@@ -380,6 +381,21 @@ class ParsingResourcesFull():
     #     """
     #     tuplelist.append(('radio', str(value)))
 
+    def AddMobilityType(self, tuplelist, value):
+        """Adds  which kind of mobility it is, train or roomba robot.
+
+        :param tuplelist: tuple list on which to add the node's mobility status.
+            The tuplelist is the value associated with the node's id in the
+            OARGETParser's dictionary node_dictlist.
+        :param value: tells if a node is a mobile node or not. The value is
+            found in the json.
+
+        :type tuplelist: list
+        :type value: integer
+
+        """
+        tuplelist.append(('mobility_type', str(value)))
+
 
     def AddMobility(self, tuplelist, value):
         """Add if the node is a mobile node or not to the tuple list.