Instentiate api with 'interface' type. NT.
[sfa.git] / sfa / managers / registry_manager_slab.py
index 970dbe8..af470c3 100644 (file)
@@ -16,7 +16,7 @@ from sfa.trust.gid import create_uuid
 from sfa.util.version import version_core
 from sfa.senslab.api import *
 
-myapi=SfaAPI()
+myapi=SfaAPI(interface='registry')
 # The GENI GetVersion call
 def GetVersion(api):
     
@@ -197,7 +197,13 @@ def list(api, xrn, origin_hrn=None):
     records = []    
     if registry_hrn != myapi.hrn:
         credential = myapi.getCredential()
-        record_list = registries[registry_hrn].List(xrn, credential)
+       print>>sys.stderr, "Registries : ", registries
+        #record_list = registries[registry_hrn].List(xrn, credential)
+       
+       interface=registries[registries_hrn]
+       server=api.get_server(interface,credential)
+       records= server.List(xrn,credential)
+       
         records = [SfaRecord(dict=record).as_dict() for record in record_list]
     
     # if we still have not found the record yet, try the local registry
@@ -230,7 +236,7 @@ def register(api, record):
         raise ExistingRecord(hrn)
        
     record = SfaRecord(dict = record)
-<<<<<<< HEAD
+
     print>>sys.stderr, " \r\n \r\n ----------- REGISTRY_MANAGER_SLAN.PY  register  SfaRecordrecord %s" %(record)
     #record['authority'] = get_authority(record['hrn'])
     record['authority'] = get_authority(hrn)