X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fserver%2Fregistry.py;h=0b92f76e18cc02debd23b0840652b27c96cbfd7e;hb=f3d825457ff4881b8c9658967f8ed159a01dfcaa;hp=5658f37d99a7d9cdfd64ebde25d8cfd907d0e953;hpb=b55a7407c2efd19af26c8165a56435ad5fc50389;p=sfa.git diff --git a/sfa/server/registry.py b/sfa/server/registry.py index 5658f37d..0b92f76e 100644 --- a/sfa/server/registry.py +++ b/sfa/server/registry.py @@ -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())