X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmanagers%2Fdriver.py;h=ab3b2165578eea3d1ee9de73ccafbe90e8bada7f;hb=dbd15819d950b69d0c6ba5527660969d0754ad29;hp=f48964f11dbec8c6788c9d8561e8675112a5a142;hpb=b6de9285a970eccb9658a0078c49f76fb11af7cd;p=sfa.git diff --git a/sfa/managers/driver.py b/sfa/managers/driver.py index f48964f1..ab3b2165 100644 --- a/sfa/managers/driver.py +++ b/sfa/managers/driver.py @@ -2,7 +2,7 @@ # an attempt to document what a driver class should provide, # and implement reasonable defaults # - +import sys class Driver: def __init__ (self, config): @@ -13,22 +13,18 @@ class Driver: ########## registry oriented ######################################## - # redefine this if you want to check again records - # when running GetCredential - # This is to reflect the 'enabled' user field in planetlab testbeds - # expected retcod boolean - def is_enabled (self, record) : - return True + # NOTE: the is_enabled method is deprecated + # it was only making things confusing, as the (PL) import mechanism would + # ignore not enabled users anyway.. # the following is used in Resolve (registry) when run in full mode # after looking up the sfa db, we wish to be able to display # testbed-specific info as well - # this at minima should fill in the 'researcher' field for slice records - # as this information is then used to compute rights - # roadmap: there is an intention to redesign the SFA database so as to clear up - # this constraint, based on the principle that SFA should not rely on the - # testbed database to perform such a core operation (i.e. getting rights right) + # based on the principle that SFA should not rely on the testbed database + # to perform such a core operation (i.e. getting rights right) + # this is no longer in use when performing other SFA operations def augment_records_with_testbed_info (self, sfa_records): + print >>sys.stderr, " \r\n \r\n DRIVER.PY augment_records_with_testbed_info sfa_records ",sfa_records return sfa_records # incoming record, as provided by the client to the Register API call @@ -60,6 +56,15 @@ class Driver: def update (self, old_sfa_record, new_sfa_record, hrn, new_key): return True + # callack for register/update + # this allows to capture changes in the relations between objects + # the ids below are the ones found in the 'pointer' field + # this can get typically called with + # 'slice' 'user' 'researcher' slice_id user_ids + # 'authority' 'user' 'pi' authority_id user_ids + def update_relation (self, subject_type, target_type, relation_name, subject_id, link_ids): + pass + ######################################## ########## aggregate oriented ########################################