add local aggregate information to the 'interfaces' class variable
authorTony Mack <tmack@cs.princeton.edu>
Wed, 19 Aug 2009 01:20:13 +0000 (01:20 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Wed, 19 Aug 2009 01:20:13 +0000 (01:20 +0000)
sfa/server/aggregate.py
sfa/server/registry.py

index 45eff40..58267ee 100644 (file)
@@ -107,6 +107,8 @@ class Aggregates(dict):
         address = self.api.config.SFA_AGGREGATE_HOST
         port = self.api.config.SFA_AGGREGATE_PORT
         url = 'http://%(address)s:%(port)s' % locals()
+        local_aggregate = {'hrn': self.api.hrn, 'addr': ext_ip, 'port': port}
+        self.interfaces.append(local_aggregate) 
         self[self.api.hrn] = GeniClient(url, self.api.key_file, self.api.cert_file)
 
 
index 18caa9c..7e8e3b2 100644 (file)
@@ -116,5 +116,7 @@ class Registries(dict):
         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}
+        self.interfaces.append(local_registry)
         self[self.api.hrn] = GeniClient(url, self.api.key_file, self.api.cert_file)