X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=sfa%2Fmanagers%2Faggregate_manager_max.py;h=e586ffb9bd59a4eb475a6022fc3ada26ffb863cd;hb=ba2aaa438f939a4b5c697052e37b1c3218901319;hp=2a46cb5a8eafa4bd274f6b8d7c105b1abb27342f;hpb=06b330f0ee047bdb107e43e82b1d7356c876bc15;p=sfa.git diff --git a/sfa/managers/aggregate_manager_max.py b/sfa/managers/aggregate_manager_max.py index 2a46cb5a..e586ffb9 100644 --- a/sfa/managers/aggregate_manager_max.py +++ b/sfa/managers/aggregate_manager_max.py @@ -3,7 +3,8 @@ from sfa.util.rspec import RSpec import sys import pdb -from sfa.util.xrn import urn_to_hrn, get_authority +from sfa.util.xrn import urn_to_hrn, hrn_to_urn, get_authority +from sfa.util.plxrn import hrn_to_pl_slicename from sfa.util.plxrn import hrn_to_pl_slicename from sfa.util.rspec import * from sfa.util.specdict import * @@ -147,7 +148,8 @@ def create_slice_max_aggregate(api, hrn, nodes): registries = Registries(api) registry = registries[api.hrn] credential = api.getCredential() - records = registry.resolve(credential, hrn) + urn = hrn_to_urn(hrn, 'slice') + records = registry.Resolve(urn, credential) for record in records: if record.get_type() in ['slice']: slice = record.as_dict() @@ -164,7 +166,8 @@ def create_slice_max_aggregate(api, hrn, nodes): sites = api.plshell.GetSites(api.plauth, [login_base]) if not sites: authority = get_authority(hrn) - site_records = registry.resolve(credential, authority) + authority_urn = hrn_to_urn(authority, 'authority') + site_records = registry.Resolve(authority_urn, credential) site_record = {} if not site_records: raise RecordNotFound(authority) @@ -193,7 +196,8 @@ def create_slice_max_aggregate(api, hrn, nodes): researchers = record.get('researcher', []) for researcher in researchers: person_record = {} - person_records = registry.resolve(credential, researcher) + researcher_urn = hrn_to_urn(researcher, 'user') + person_records = registry.Resolve(researcher_urn, credential) for record in person_records: if record.get_type() in ['user']: person_record = record