last plc-dependent code moved to PlDriver
[sfa.git] / sfa / managers / aggregate_manager_max.py
index b7cdffb..0300522 100644 (file)
@@ -18,6 +18,9 @@ from sfa.plc.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
@@ -145,7 +148,7 @@ class AggregateManagerMax (AggregateManager):
     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
@@ -274,12 +277,12 @@ class AggregateManagerMax (AggregateManager):
     
     ### 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
@@ -289,13 +292,13 @@ class AggregateManagerMax (AggregateManager):
         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())