X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fiotlab%2FOARrestapi.py;h=515b792668d53fb00b7eec3f2b7a0d96dbedf5c3;hb=abe140800765684e54f1cb39aec52d5c7ebf3d0b;hp=186790806091adaafe64841f3362ebe59c04fc8c;hpb=6c7a0ade7e59f90e3a32fb72779362188ba54ca2;p=sfa.git diff --git a/sfa/iotlab/OARrestapi.py b/sfa/iotlab/OARrestapi.py index 18679080..515b7926 100644 --- a/sfa/iotlab/OARrestapi.py +++ b/sfa/iotlab/OARrestapi.py @@ -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.