creating tag sfa-0.9-11
[sfa.git] / sfa / server / registry.py
index 5658f37..0b92f76 100644 (file)
@@ -37,19 +37,12 @@ class Registries(Interfaces):
     default_dict = {'registries': {'registry': [Interfaces.default_fields]}}
 
     def __init__(self, api, conf_file = "/etc/sfa/registries.xml"):
-        Interfaces.__init__(self, api, conf_file, 'sa') 
-
-    def get_connections(self, interfaces):
-        """
-        read connection details for the trusted peer registries from file return 
-        a dictionary of connections keyed on interface hrn. 
-        """
-        connections = Interfaces.get_connections(self, interfaces)
-
-        # set up a connection to the local registry
+        Interfaces.__init__(self, api, conf_file) 
         address = self.api.config.SFA_REGISTRY_HOST
         port = self.api.config.SFA_REGISTRY_PORT
         url = 'http://%(address)s:%(port)s' % locals()
         local_registry = {'hrn': self.api.hrn, 'addr': address, 'port': port}
-        connections[self.api.hrn] = xmlrpcprotocol.get_server(url, self.api.key_file, self.api.cert_file)            
-        return connections 
+        self.interfaces[self.api.hrn] = local_registry
+       
+        # get connections
+        self.update(self.get_connections())