instantiate with the correct # of parameters
authorTony Mack <tmack@cs.princeton.edu>
Tue, 6 Apr 2010 17:58:58 +0000 (17:58 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Tue, 6 Apr 2010 17:58:58 +0000 (17:58 +0000)
sfa/server/aggregate.py
sfa/server/interface.py
sfa/server/registry.py

index eb4652e..fd899e8 100644 (file)
@@ -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):
         """
index bea5149..6ba74fb 100644 (file)
@@ -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']
index fe845a3..5658f37 100644 (file)
@@ -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):
         """