- # 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']]
-
- try:
- if node['posx'] and node['posy']:
- location = Location({'longitude':node['posx'], \
- 'latitude': node['posy']})
- rspec_node['location'] = location
- except KeyError:
- pass
- #rspec_node['interfaces'] = []
- #if_count=0
- #for if_id in node['interface_ids']:
- #interface = Interface(interfaces[if_id])
- #interface['ipv4'] = interface['ip']
- #interface['component_id'] = PlXrn(auth=self.driver.hrn,
- #interface='node%s:eth%s' % (node['node_id'], if_count)).get_urn()
- # interfaces in the manifest need a client id
- #if slice:
- #interface['client_id'] = "%s:%s" % (node['node_id'], if_id)
- #rspec_node['interfaces'].append(interface)
- #if_count+=1
-
- #tags = [PLTag(node_tags[tag_id]) for tag_id in node['node_tag_ids']]
- # Granularity
- granularity = Granularity({'grain': grain})
- rspec_node['granularity'] = granularity
- rspec_node['tags'] = []
- if node['hostname'] in slivers:
- # add sliver info
- sliver = slivers[node['hostname']]
- rspec_node['sliver_id'] = sliver['sliver_id']
- rspec_node['client_id'] = node['hostname']
- rspec_node['slivers'] = [sliver]
-
- # slivers always provide the ssh service
- #login = Login({'authentication': 'ssh-keys', 'hostname': node['hostname'], 'port':'22', 'username': sliver['name']})
- #service = Services({'login': login})
- #rspec_node['services'] = [service]
- rspec_nodes.append(rspec_node)
-