X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fclient%2Fclient_helper.py;h=6e9170603a2524cff50fbcae9e3ca9d5079c5b4c;hb=796d35d54ab31e209ddf76b4584b6508b309c6c1;hp=2117b146508d9041453abd22645270230b8b9bc2;hpb=cf802a4f0250de22a6f38f1ee97a89e86bfc1128;p=sfa.git diff --git a/sfa/client/client_helper.py b/sfa/client/client_helper.py index 2117b146..6e917060 100644 --- a/sfa/client/client_helper.py +++ b/sfa/client/client_helper.py @@ -5,7 +5,7 @@ # 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' @@ -21,7 +21,7 @@ def pg_users_arg(records): continue user = {'urn': record['reg-urn'], 'keys': record['reg-keys'], - } + 'email': record['email']} users.append(user) return users @@ -41,7 +41,7 @@ def sfa_users_arg (records, slice_record): 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