Functions must be capitalized now. NT.
[sfa.git] / sfa / managers / registry_manager_slab.py
index 903f49c..ed9c2c6 100644 (file)
@@ -6,7 +6,7 @@ from sfa.util.faults import RecordNotFound, AccountNotEnabled, PermissionError,
     UnknownSfaType, ExistingRecord
 from sfa.util.prefixTree import prefixTree
 from sfa.util.record import SfaRecord
-from sfa.senslab.table_slab import SfaTable
+from sfa.util.table import SfaTable
 from sfa.util.xrn import Xrn, get_leaf, get_authority, hrn_to_urn, urn_to_hrn
 from sfa.util.version import version_core
 
@@ -29,7 +29,7 @@ def GetVersion(api):
                          'urn':xrn.get_urn(),
                          'peers':peers})
 
-def get_credential(api, xrn, type, is_self=False):
+def GetCredential(api, xrn, type, is_self=False):
     # convert xrn to hrn     
     if type:
         hrn = urn_to_hrn(xrn)[0]
@@ -53,7 +53,8 @@ def get_credential(api, xrn, type, is_self=False):
 
     # verify_cancreate_credential requires that the member lists
     # (researchers, pis, etc) be filled in
-    api.driver.fill_record_info(record, api.aggregates)
+    #api.driver.fill_record_info(record, api.aggregates)
+    api.driver.fill_record_info(record)
     record['enabled'] = True
     print>> sys.stderr , " \r\n    ++    REGISTRY get_credential hrn %s record['enabled'] %s is_self %s" %(hrn, record['enabled'], is_self)    
     if record['type']=='user':
@@ -103,7 +104,7 @@ def get_credential(api, xrn, type, is_self=False):
     return new_cred.save_to_string(save_parents=True)
 
 
-def resolve(api, xrns, type=None, full=True):
+def Resolve(api, xrns, type=None, full=True):
 
     # load all known registry names into a prefix tree and attempt to find
     # the longest matching prefix
@@ -169,7 +170,7 @@ def resolve(api, xrns, type=None, full=True):
     
     # convert local record objects to dicts
     records.extend([dict(record) for record in local_records])
-    print >>sys.stderr, "\r\n \t\t records extends %s" %(records)      
+    #print >>sys.stderr, "\r\n \t\t records extends %s" %(records)      
     if not records:
         raise RecordNotFound(str(hrns))
 
@@ -178,7 +179,7 @@ def resolve(api, xrns, type=None, full=True):
 
     return records
 
-def list(api, xrn, origin_hrn=None):
+def List(api, xrn, origin_hrn=None):
     hrn, type = urn_to_hrn(xrn)
     # load all know registry names into a prefix tree and attempt to find
     # the longest matching prefix
@@ -214,7 +215,7 @@ def list(api, xrn, origin_hrn=None):
     return records
 
 
-def register(api, record):
+def Register(api, record):
 
  
     #hrn, type = record['hrn'], record['type']
@@ -349,7 +350,7 @@ def register(api, record):
 
     return record.get_gid_object().save_to_string(save_parents=True)
 
-def update(api, record_dict):
+def Update(api, record_dict):
     new_record = SfaRecord(dict = record_dict)
     type = new_record['type']
     hrn = new_record['hrn']
@@ -436,7 +437,7 @@ def update(api, record_dict):
     return 1 
 
 # expecting an Xrn instance
-def remove(api, xrn, origin_hrn=None):
+def Remove(api, xrn, origin_hrn=None):
 
     table = SfaTable()
     filter = {'hrn': xrn.get_hrn()}
@@ -484,8 +485,3 @@ def remove(api, xrn, origin_hrn=None):
 
     return 1
 
-def remove_peer_object(api, record, origin_hrn=None):
-    pass
-
-def register_peer_object(api, record, origin_hrn=None):
-    pass