# create a dict user_id -> [ (nitos)keys ]
keys_by_user_id = dict ( [ ( user['user_id'], user['keys']) for user in users ] )
# Get all nitos nodes
- nodes = shell.getNodes()
+ nodes = shell.getNodes({}, [])
# create hash by node_id
nodes_by_id = dict ( [ (node['node_id'], node) for node in nodes ] )
# Get all nitos slices
- slices = shell.getSlices()
+ slices = shell.getSlices({}, [])
# create hash by slice_id
slices_by_id = dict ( [ (slice['slice_id'], slice) for slice in slices ] )
for node in nodes:
site_auth = get_authority(site_hrn)
site_name = site['name']
- node_hrn = hostname_to_hrn(site_auth, site_name, node['name'])
+ node_hrn = hostname_to_hrn(site_auth, site_name, node['hostname'])
# xxx this sounds suspicious
if len(node_hrn) > 64: node_hrn = node_hrn[:64]
node_record = self.locate_by_type_hrn ( 'node', node_hrn )
else:
# xxx update the record ...
pass
+
node_record.stale=False
pass
# record current users affiliated with the slice
slice_record.reg_researchers = \
- [ self.locate_by_type_pointer ('user',int(user_id)) for user_id in slice['user_id'] ]
+ [ self.locate_by_type_pointer ('user',int(user_id)) for user_id in slice['user_ids'] ]
dbsession.commit()
slice_record.stale=False