class IotlabMobility(Element):
""" Class to give information of a node's mobility, and what kind of
mobility it is (train, roomba robot ...) """
- fields = ['mobile', 'type']
+ fields = ['mobile', 'mobility-type']
node_elem.add_instance('hardware_types', node, fields)
# set mobility
- if attribute is 'mobile':
- node.elem.add_instance('mobile', node['mobile'],
+ if attribute is 'mobility':
+ node_elem.add_instance('mobility', node['mobility'],
IotlabMobility.fields)
-
# set location
if attribute is 'location':
node_elem.add_instance('location', node['location'],
# add granularity of the reservation system
#TODO put the granularity in network instead SA 18/07/12
- if attribute is 'granularity' :
+ if attribute is 'granularity':
granularity = node['granularity']
if granularity:
node_elem.add_instance('granularity',
now='false')
#set position
+ logger.debug("Iotlabv1Node position node_elem %s" % (node_elem))
if attribute is 'position':
node_elem.add_instance('position', node['position'],
IotlabPosition.fields)
+ logger.debug("Iotlabv1Node position node[position] %s "
+ % (node['position']))
## add services
#PGv2Services.add_services(node_elem, node.get('services', []))
# add slivers