+ def connectRegistry(self):
+ """
+ Connect to the registry
+ """
+ # connect to registry using GeniClient
+ address = self.config.GENI_REGISTRY_HOSTNAME
+ port = self.config.GENI_REGISTRY_PORT
+ url = 'http://%(address)s:%(port)s' % locals()
+ self.registry = GeniClient(url, self.key_file, self.cert_file)
+
+ def connectAggregates(self):
+ """
+ Get connection details for the trusted peer aggregates from file and
+ create a GeniClient connection to each.
+ """
+ self.aggregates = {}
+ aggregates = self.aggregate_info['aggregates']['aggregate']
+ if isinstance(aggregates, dict):
+ aggregates = [aggregates]
+ if isinstance(aggregates, list):
+ for aggregate in aggregates:
+ # create xmlrpc connection using GeniClient
+ hrn, address, port = aggregate['hrn'], aggregate['addr'], aggregate['port']
+ if not hrn or not address or not port:
+ continue
+ url = 'http://%(address)s:%(port)s' % locals()
+ self.aggregates[hrn] = GeniClient(url, self.key_file, self.cert_file)