From: Tony Mack Date: Wed, 18 Jan 2012 02:09:52 +0000 (-0500) Subject: not necessary X-Git-Tag: sfa-2.0-10~6 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=71707fc178478a7836e91b518753783f5fdfe19c;p=sfa.git not necessary --- diff --git a/sfa/managers/aggregate_manager_openstack.py b/sfa/managers/aggregate_manager_openstack.py deleted file mode 100644 index 3ed0bbaa..00000000 --- a/sfa/managers/aggregate_manager_openstack.py +++ /dev/null @@ -1,117 +0,0 @@ -from sfa.util.version import version_core -from sfa.util.xrn import Xrn -from sfa.util.callids import Callids -from sfa.managers import aggregate_manager - -class AggregateManager(aggregate_manager.AggregateManager): - - def __init__ (self, config): pass - - # essentially a union of the core version, the generic version (this code) and - # whatever the driver needs to expose - def GetVersion(self, api, options): - - xrn=Xrn(api.hrn) - version = version_core() - version_generic = { - 'interface':'aggregate', - 'sfa': 2, - 'geni_api': 2, - 'geni_api_versions': {'2': 'http://%s:%s' % (api.config.SFA_AGGREGATE_HOST, api.config.SFA_AGGREGATE_PORT)}, - 'hrn':xrn.get_hrn(), - 'urn':xrn.get_urn(), - } - version.update(version_generic) - testbed_version = self.driver.aggregate_version() - version.update(testbed_version) - return version - - def ListSlices(self, api, creds, options): - call_id = options.get('call_id') - if Callids().already_handled(call_id): return [] - return self.driver.list_slices (creds, options) - - def ListResources(self, api, creds, options): - call_id = options.get('call_id') - if Callids().already_handled(call_id): return "" - - # get slice's hrn from options - slice_xrn = options.get('geni_slice_urn', None) - # pass None if no slice is specified - if not slice_xrn: - slice_hrn, slice_urn = None, None - else: - xrn = Xrn(slice_xrn) - slice_urn=xrn.get_urn() - slice_hrn=xrn.get_hrn() - - return self.driver.list_resources (slice_urn, slice_hrn, creds, options) - - def SliverStatus (self, api, xrn, creds, options): - call_id = options.get('call_id') - if Callids().already_handled(call_id): return {} - - xrn = Xrn(xrn) - slice_urn=xrn.get_urn() - slice_hrn=xrn.get_hrn() - return self.driver.sliver_status (slice_urn, slice_hrn) - - def CreateSliver(self, api, xrn, creds, rspec_string, users, options): - """ - Create the sliver[s] (slice) at this aggregate. - Verify HRN and initialize the slice record in PLC if necessary. - """ - call_id = options.get('call_id') - if Callids().already_handled(call_id): return "" - - xrn = Xrn(xrn) - slice_urn=xrn.get_urn() - slice_hrn=xrn.get_hrn() - - return self.driver.create_sliver (slice_urn, slice_hrn, creds, rspec_string, users, options) - - def DeleteSliver(self, api, xrn, creds, options): - call_id = options.get('call_id') - if Callids().already_handled(call_id): return True - - xrn = Xrn(xrn) - slice_urn=xrn.get_urn() - slice_hrn=xrn.get_hrn() - return self.driver.delete_sliver (slice_urn, slice_hrn, creds, options) - - def RenewSliver(self, api, xrn, creds, expiration_time, options): - call_id = options.get('call_id') - if Callids().already_handled(call_id): return True - - xrn = Xrn(xrn) - slice_urn=xrn.get_urn() - slice_hrn=xrn.get_hrn() - return self.driver.renew_sliver (slice_urn, slice_hrn, creds, expiration_time, options) - - ### these methods could use an options extension for at least call_id - def start_slice(self, api, xrn, creds): - xrn = Xrn(xrn) - slice_urn=xrn.get_urn() - slice_hrn=xrn.get_hrn() - return self.driver.start_slice (slice_urn, slice_hrn, creds) - - def stop_slice(self, api, xrn, creds): - xrn = Xrn(xrn) - slice_urn=xrn.get_urn() - slice_hrn=xrn.get_hrn() - return self.driver.stop_slice (slice_urn, slice_hrn, creds) - - def reset_slice(self, api, xrn): - xrn = Xrn(xrn) - slice_urn=xrn.get_urn() - slice_hrn=xrn.get_hrn() - return self.driver.reset_slice (slice_urn, slice_hrn) - - def GetTicket(self, api, xrn, creds, rspec, users, options): - - xrn = Xrn(xrn) - slice_urn=xrn.get_urn() - slice_hrn=xrn.get_hrn() - - return self.driver.get_ticket (slice_urn, slice_hrn, creds, rspec, options) -