# it seems terribly wrong that the client should decide to use PG- or PL- related code
# esp. in a context where we're trying to have more and more kinds of testbeds involved
#
-# also, the 'users' filed that CreateSliver is expecting (the key point here is to get this right)
+# also, the 'users' field that CreateSliver is expecting (the key point here is to get this right)
# is specified to have at least a urn and a list of keys, both of these being supported natively
# in the sfa db
# So long story short, it seems to me that we should have a common code that fills in 'urn' and 'keys'
for record in records:
if record['type'] != 'user':
continue
- user = {'urn': record['geni_urn'],
- 'keys': record['keys'],
+ user = {'urn': record['reg-urn'],
+ 'keys': record['reg-keys'],
'email': record['email']}
users.append(user)
return users
extra_fields = list ( set(pl_fields).union(set(nitos_fields)))
# try to fill all these in
for field in extra_fields:
- if record.has_key(field): user[field]=record[field]
+ if field in record: user[field]=record[field]
users.append(user)
return users