X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmanagers%2Fdriver.py;fp=sfa%2Fmanagers%2Fdriver.py;h=ae2b6248985d34fb1d6b693b6106814efc4eeaeb;hb=e6ac86e7b51322c1f6ec3bc1f952252d28ebfe41;hp=903a03594136d0e3b8bf6d3d561083dbd87fdb7a;hpb=322d0825e387e033846cb73af863136479c93e93;p=sfa.git diff --git a/sfa/managers/driver.py b/sfa/managers/driver.py index 903a0359..ae2b6248 100644 --- a/sfa/managers/driver.py +++ b/sfa/managers/driver.py @@ -5,7 +5,13 @@ class Driver: - def __init__ (self): pass + def __init__ (self, config): + # this is the hrn attached to the running server + self.hrn = config.SFA_INTERFACE_HRN + + ######################################## + ########## registry oriented + ######################################## # redefine this if you want to check again records # when running GetCredential @@ -53,3 +59,30 @@ class Driver: # should anything be passed back to the caller in this case ? def update (self, old_sfa_record, new_sfa_record, hrn, new_key): return True + + ######################################## + ########## aggregate oriented + ######################################## + + # a name for identifying the kind of testbed + def testbed_name (self): return "undefined" + + # a dictionary that gets appended to the generic answer to GetVersion + # 'geni_request_rspec_versions' and 'geni_ad_rspec_versions' are mandatory + def aggregate_version (self): return {} + + # the answer to SliverStatus on a given slice + def sliver_status (self, slice_urn, slice_hrn): return {} + + # the answer to CreateSliver on a given slice + # expected to return a valid rspec + # identical to ListResources after the slice was modified + def create_sliver (self, slice_urn, slice_hrn, creds, rspec_string, users, options): + return "dummy Driver.create_sliver needs to be redefined" + + # the answer to RenewSliver + # expected to return a boolean to indicate success + def renew_sliver (self, slice_urn, slice_hrn, creds, expiration_time, options): + return False + +