From: Tony Mack Date: Tue, 6 Apr 2010 17:58:58 +0000 (+0000) Subject: instantiate with the correct # of parameters X-Git-Tag: sfa-0.9-11~18 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=5f78ea7c4804aa5baca5c77afa8c7e52ca2fb072 instantiate with the correct # of parameters --- diff --git a/sfa/server/aggregate.py b/sfa/server/aggregate.py index eb4652e3..fd899e86 100644 --- a/sfa/server/aggregate.py +++ b/sfa/server/aggregate.py @@ -30,7 +30,7 @@ class Aggregates(dict): default_dict = {'registries': {'registry': [default_fields]}} def __init__(self, api, file = "/etc/sfa/aggregates.xml"): - Interfaces.__init__(self, conf_file, 'sa') + Interfaces.__init__(self, api, conf_file, 'sa') def connectAggregates(self, interfaces): """ diff --git a/sfa/server/interface.py b/sfa/server/interface.py index bea51494..6ba74fbc 100644 --- a/sfa/server/interface.py +++ b/sfa/server/interface.py @@ -151,7 +151,7 @@ class Interfaces(dict): interfaces = [interfaces] for interface in interfaces: # make sure the required fields are present and not null - for key in required_fields + for key in required_fields: if not interface.get(key): continue hrn, address, port = interface['hrn'], interface['addr'], interface['port'] diff --git a/sfa/server/registry.py b/sfa/server/registry.py index fe845a36..5658f37d 100644 --- a/sfa/server/registry.py +++ b/sfa/server/registry.py @@ -34,10 +34,10 @@ class Registry(SfaServer): class Registries(Interfaces): - default_dict = {'registries': {'registry': [default_fields]}} + default_dict = {'registries': {'registry': [Interfaces.default_fields]}} def __init__(self, api, conf_file = "/etc/sfa/registries.xml"): - Interfaces.__init__(self, conf_file, 'sa') + Interfaces.__init__(self, api, conf_file, 'sa') def get_connections(self, interfaces): """