from sfa.managers.aggregate_manager import AggregateManager
-from sfa.plc.plslices import PlSlices
+from sfa.planetlab.plslices import PlSlices
class AggregateManagerMax (AggregateManager):
+ def __init__ (self, config):
+ pass
+
RSPEC_TMP_FILE_PREFIX = "/tmp/max_rspec"
# execute shell command and return both exit code and text output
def prepare_slice(self, api, slice_xrn, creds, users):
reg_objects = self._get_registry_objects(slice_xrn, creds, users)
(hrn, type) = urn_to_hrn(slice_xrn)
- slices = PlSlices(api)
+ slices = PlSlices(self.driver)
peer = slices.get_peer(hrn)
sfa_peer = slices.get_sfa_peer(hrn)
slice_record=None
### GENI AM API Methods
- def SliverStatus(self, api, slice_xrn, creds, options={}):
+ def SliverStatus(self, api, slice_xrn, creds, options):
call_id = options.get('call_id')
if Callids().already_handled(call_id): return {}
return self.slice_status(api, slice_xrn, creds)
- def CreateSliver(self, api, slice_xrn, creds, rspec_string, users, options={}):
+ def CreateSliver(self, api, slice_xrn, creds, rspec_string, users, options):
call_id = options.get('call_id')
if Callids().already_handled(call_id): return ""
#TODO: create real CreateSliver response rspec
else:
return "<?xml version=\"1.0\" ?> <RSpec type=\"SFA\"> Error! </RSpec>"
- def DeleteSliver(self, api, xrn, creds, options={}):
+ def DeleteSliver(self, api, xrn, creds, options):
call_id = options.get('call_id')
if Callids().already_handled(call_id): return ""
return self.delete_slice(api, xrn, creds)
# no caching
- def ListResources(self, api, creds, options={}):
+ def ListResources(self, api, creds, options):
call_id = options.get('call_id')
if Callids().already_handled(call_id): return ""
# version_string = "rspec_%s" % (rspec_version.get_version_name())