- rspec_node = Node()
- # xxx how to retrieve site['login_base']
- #site_id=node['site_id']
- #site=sites_dict[site_id]
- rspec_node['component_id'] = hostname_to_urn(self.driver.root_auth, node['site'], node['hostname'])
- rspec_node['component_name'] = node['hostname']
- rspec_node['component_manager_id'] = hrn_to_urn(self.driver.root_auth, 'authority+sa')
- #rspec_node['component_manager_id'] = Xrn(self.driver.root_auth, 'authority+sa').get_urn()
- rspec_node['authority_id'] = hrn_to_urn(PlXrn.site_hrn(self.driver.root_auth, node['site']), 'authority+sa')
- # do not include boot state (<available> element) in the manifest rspec
-
- #if not slice:
- # rspec_node['boot_state'] = node['boot_state']
- # if node['hostname'] in reserved_nodes:
- # rspec_node['boot_state'] = "Reserved"
- rspec_node['boot_state'] = node['boot_state']
- if node['hostname'] in reserved_nodes:
- rspec_node['boot_state'] = "Reserved"
- rspec_node['exclusive'] = 'True'
- rspec_node['hardware_types'] = [HardwareType({'name': 'slab-node'})]
-
- # only doing this because protogeni rspec needs
- # to advertise available initscripts
- #rspec_node['pl_initscripts'] = None
- # add site/interface info to nodes.
- # assumes that sites, interfaces and tags have already been prepared.
- #site = sites_dict[node['site_id']]
-
- if node['posx'] and node['posy']:
- location = Location({'longitude':node['posx'], 'latitude': node['posy']})
+ #rspec_node = Node()
+ logger.debug("SLABAGGREGATE api get_rspec node %s "\
+ %(node))
+ if slice_nodes_list == [] or node['hostname'] in slice_nodes_list:
+
+ rspec_node = SlabNode()
+ # xxx how to retrieve site['login_base']
+ #site_id=node['site_id']
+ #site=sites_dict[site_id]
+ rspec_node['mobile'] = node['mobile']
+ rspec_node['archi'] = node['archi']
+ rspec_node['radio'] = node['radio']
+
+ slab_xrn = slab_xrn_object(self.driver.root_auth, node['hostname'])
+ rspec_node['component_id'] = slab_xrn.urn
+ rspec_node['component_name'] = node['hostname']
+ rspec_node['component_manager_id'] = \
+ hrn_to_urn(self.driver.root_auth, 'authority+sa')
+
+ # Senslab's nodes are federated : there is only one authority
+ # for all Senslab sites, registered in SFA.
+ # Removing the part including the site in authority_id SA 27/07/12
+ rspec_node['authority_id'] = rspec_node['component_manager_id']
+
+ # do not include boot state (<available> element) in the manifest rspec
+
+
+ rspec_node['boot_state'] = node['boot_state']
+ if node['hostname'] in reserved_nodes:
+ rspec_node['boot_state'] = "Reserved"
+ rspec_node['exclusive'] = 'True'
+ rspec_node['hardware_types'] = [HardwareType({'name': 'slab-node'})]
+
+ # only doing this because protogeni rspec needs
+ # to advertise available initscripts
+ #rspec_node['pl_initscripts'] = None
+ # add site/interface info to nodes.
+ # assumes that sites, interfaces and tags have already been prepared.
+ #site = sites_dict[node['site_id']]
+ location = Location({'country':'France'})