'archi': self.AddHardwareType,
'state': self.AddBootState,
'id': self.AddOarNodeId,
+ 'mobility_type': self.AddMobilityType,
}
:type value: integer
"""
- tuplelist.append(('mobility-type', str(value)))
+ tuplelist.append(('mobility_type', str(value)))
def AddMobility(self, tuplelist, value):
login=login)
logger.debug("IotlabAggregate api \tget_slice_and_slivers \
- sfa_slice %s \r\n slices %s self.driver.hrn %s"
- % (sfa_slice, slices, self.driver.hrn))
+ slice_hrn %s \r\n slices %s self.driver.hrn %s"
+ % (slice_hrn, slices, self.driver.hrn))
if slices == []:
return (sfa_slice, slivers)
logger.log_exc("IOTLABAGGREGATE \t \
get_slice_and_slivers No nodes in the slice \
- KeyError ")
+ node_ids_list = []
continue
for node in node_ids_list:
"""
- ldap_username= None
+ ldap_username = None
rspec = None
version_manager = VersionManager()
version = version_manager.get_version(version)
#if not options.get('list_leases') or options.get('list_leases')
#and options['list_leases'] != 'leases':
nodes = self.get_nodes(slices, slivers)
+ if slice_xrn and slices is None:
+ nodes = []
logger.debug("\r\n")
logger.debug("IotlabAggregate \t lease_option %s \
get rspec ******* nodes %s"
class IotlabMobility(Element):
""" Class to give information of a node's mobility, and what kind of
mobility it is (train, roomba robot ...) """
- fields = ['mobile', 'mobility-type']
+ fields = ['mobile', 'mobility_type']
if len(network_elems) > 0:
network_elem = network_elems[0]
- iotlab_network_dict = {}
- iotlab_network_dict['login'] = ldap_username
+ iotlab_network_dict = {}
+ iotlab_network_dict['login'] = ldap_username
- iotlab_network_dict['ssh'] = \
- ['ssh ' + ldap_username + '@'+site+'.iotlab.info'
- for site in sites_set]
- network_elem.set('ssh',
- unicode(iotlab_network_dict['ssh']))
- network_elem.set('login', unicode(iotlab_network_dict['login']))
+ iotlab_network_dict['ssh'] = \
+ ['ssh ' + ldap_username + '@'+site+'.iotlab.info'
+ for site in sites_set]
+ network_elem.set('ssh',
+ unicode(iotlab_network_dict['ssh']))
+ network_elem.set('login', unicode(iotlab_network_dict['login']))
@staticmethod
def add_nodes(xml, nodes, rspec_content_type=None):
else:
network_elem = xml
- logger.debug("iotlabv1Node \t add_nodes nodes %s \r\n " % (nodes[0]))
node_elems = []
#Then add nodes items to the network item in the xml
for node in nodes:
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