From: Tony Mack Date: Mon, 10 May 2010 22:40:49 +0000 (+0000) Subject: use authority instead of sa, ma when defining authority type X-Git-Tag: sfa-1.0-0~198 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a172efc1d44254684c1d17a0d8beae2debef6350;p=sfa.git use authority instead of sa, ma when defining authority type --- diff --git a/sfa/server/aggregate.py b/sfa/server/aggregate.py index 3793a83b..515b9e97 100644 --- a/sfa/server/aggregate.py +++ b/sfa/server/aggregate.py @@ -30,7 +30,7 @@ class Aggregates(Interfaces): default_dict = {'aggregates': {'aggregate': [Interfaces.default_fields]}} def __init__(self, api, conf_file = "/etc/sfa/aggregates.xml"): - Interfaces.__init__(self, api, conf_file, 'ma') + Interfaces.__init__(self, api, conf_file) # set up a connection to the local registry address = self.api.config.SFA_AGGREGATE_HOST port = self.api.config.SFA_AGGREGATE_PORT diff --git a/sfa/server/interface.py b/sfa/server/interface.py index 5099e9fe..05034795 100644 --- a/sfa/server/interface.py +++ b/sfa/server/interface.py @@ -46,10 +46,9 @@ class Interfaces(dict): # defined by the class default_dict = {} - # allowed types - types = ['sa', 'ma'] + types = ['authority'] - def __init__(self, api, conf_file, type): + def __init__(self, api, conf_file, type='authority'): if type not in self.types: raise SfaInfaildArgument('Invalid type %s: must be in %s' % (type, self.types)) dict.__init__(self, {}) diff --git a/sfa/server/registry.py b/sfa/server/registry.py index caa128d8..0b92f76e 100644 --- a/sfa/server/registry.py +++ b/sfa/server/registry.py @@ -37,7 +37,7 @@ 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') + 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()