fix merge problem
[sfa.git] / sfa / managers / driver.py
index ed4ee0b..7d4b5b2 100644 (file)
@@ -11,9 +11,16 @@ class Driver:
     # when running GetCredential
     # This is to reflect the 'enabled' user field in planetlab testbeds
     # expected retcod boolean
-    def is_enabled_entity (self, record) : 
+    def is_enabled (self, record) : 
         return True
-    
+
+    # 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
+    def augment_records_with_testbed_info (self, sfa_records):
+        return sfa_records
+
     # incoming record, as provided by the client to the Register API call
     # expected retcod 'pointer'
     # 'pointer' is typically an int db id, that makes sense in the testbed environment
@@ -23,21 +30,21 @@ class Driver:
         return -1
 
     # incoming record is the existing sfa_record
-    # error message logged if result is False
+    # expected retcod boolean, error message logged if result is False
     def remove (self, sfa_record): 
         return True
 
     # incoming are the sfa_record:
     # (*) old_sfa_record is what we have in the db for that hrn
     # (*) new_sfa_record is what was passed in the Update call
-    # error message logged if result is False
+    # expected retcod boolean, error message logged if result is False
     # NOTE 1. about keys
     # this is confusing because a user may have several ssh keys in 
     # the planetlab database, but we need to pick one to generate its cert
     # so as much as in principle we should be able to use new_sfa_record['keys']
-    # the manager code actually picks one, and it's safer to pass it along
-    # rather than depending on the driver code to do the same
-    # xxx 
+    # the manager code actually picks one (the first one), and it seems safer
+    # to pass it along rather than depending on the driver code to do the same
+    #
     # NOTE 2. about keys
     # when changing the ssh key through this method the gid gets changed too
     # should anything be passed back to the caller in this case ?