driver.remove
[sfa.git] / sfa / managers / driver.py
1
2 # an attempt to document what a driver class should provide, 
3 # and implement reasonable defaults
4 #
5
6 class Driver:
7     
8     def __init__ (self): pass
9
10     # redefine this if you want to check again records 
11     # when running GetCredential
12     # This is to reflect the 'enabled' user field in planetlab testbeds
13     # expected retcod boolean
14     def is_enabled_entity (self, record, aggregates) : return True
15     
16     # incoming record, as provided by the client to the Register API call
17     # expected retcod 'pointer'
18     # 'pointer' is typically an int db id, that makes sense in the testbed environment
19     # -1 if this feature is not relevant 
20     # here type will be 'authority'
21     def register (self, hrn, sfa_record, pub_key) : return -1
22
23     # incoming record is the existing sfa_record
24     # no retcod expected for now
25     def remove (self, sfa_record): return None