X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmanagers%2Faggregate_manager_eucalyptus.py;h=1021392e79caa2f35517c591025ee46ec76e2720;hb=1bf1b1edc33aa7a573561f0f43115df8b218ce88;hp=3f2d512ca5dd9570c8b515950bab20913e870216;hpb=734212b055ab97f61129ca590121f1513a3ecd31;p=sfa.git diff --git a/sfa/managers/aggregate_manager_eucalyptus.py b/sfa/managers/aggregate_manager_eucalyptus.py index 3f2d512c..1021392e 100644 --- a/sfa/managers/aggregate_manager_eucalyptus.py +++ b/sfa/managers/aggregate_manager_eucalyptus.py @@ -23,13 +23,16 @@ from sfa.util.callids import Callids #from sfa.util.sfalogging import logger from sfa.util.version import version_core from sfa.trust.credential import Credential -from sfa.server.sfaapi import SfaApi -from sfa.plc.aggregate import Aggregate -from sfa.plc.slices import Slice, Slices +from sfa.plc.plaggregate import PlAggregate +# No Slice symbol in there +#from sfa.plc.plslices import Slice, Slices +from sfa.plc.plslices import PlSlices from sfa.rspecs.version_manager import VersionManager from sfa.rspecs.rspec import RSpec # not sure what this used to be nor where it is now defined #from sfa.rspecs.sfa_rspec import sfa_rspec_version +# most likely this should now be +#from sfa.rspecs.version_manager import VersionManager ## # Meta data of an instance. @@ -444,7 +447,8 @@ class AggregateManagerEucalyptus: port=eucaPort, path=srvPath) - def ListResources(api, creds, options, call_id): + def ListResources(api, creds, options={}): + call_id = options.get('call_id') if Callids().already_handled(call_id): return "" # get slice's hrn from options xrn = options.get('geni_slice_urn', '') @@ -540,14 +544,15 @@ class AggregateManagerEucalyptus: """ Hook called via 'sfi.py create' """ - def CreateSliver(api, slice_xrn, creds, xml, users, call_id): + def CreateSliver(api, slice_xrn, creds, xml, users, options={}): + call_id = options.get('call_id') if Callids().already_handled(call_id): return "" logger = logging.getLogger('EucaAggregate') logger.debug("In CreateSliver") - aggregate = Aggregate(api) - slices = Slices(api) + aggregate = PlAggregate(self.driver) + slices = PlSlices(api) (hrn, type) = urn_to_hrn(slice_xrn) peer = slices.get_peer(hrn) sfa_peer = slices.get_sfa_peer(hrn) @@ -677,7 +682,7 @@ class AggregateManagerEucalyptus: f.write("%s %s %s\n" % (instId, ipaddr, hrn)) f.close() - def GetVersion(api): + def GetVersion(api, options={}): version_manager = VersionManager() ad_rspec_versions = [] @@ -687,13 +692,13 @@ class AggregateManagerEucalyptus: ad_rspec_versions.append(rspec_version.to_dict()) if rspec_version.content_type in ['*', 'request']: request_rspec_versions.append(rspec_version.to_dict()) - default_rspec_version = version_manager.get_version("sfa 1").to_dict() xrn=Xrn(api.hrn) version_more = {'interface':'aggregate', + 'sfa': 1, + 'geni_api': api.config.SFA_AGGREGATE_API_VERSION, 'testbed':'myplc', 'hrn':xrn.get_hrn(), - 'request_rspec_versions': request_rspec_versions, - 'ad_rspec_versions': ad_rspec_versions, - 'default_ad_rspec': default_rspec_version + 'geni_request_rspec_versions': request_rspec_versions, + 'geni_ad_rspec_versions': ad_rspec_versions, } return version_core(version_more)