Example #1
0
    def _load_drivers(self):
        """Loads plugin-drivers specified in configuration."""
        self.drivers, self.default_provider = service_base.load_drivers(
            constants.LOADBALANCER, self)

        # we're at the point when extensions are not loaded yet
        # so prevent policy from being loaded
        ctx = context.get_admin_context()
        # stop service in case provider was removed, but resources were not
        self._check_orphan_pool_associations(ctx, self.drivers.keys())
Example #2
0
    def generate_firewall_config(self,context, config):
	LOG.debug(_('Generating Firewall Configuration %s'), str(config))
	ctx = crd_context.get_admin_context()
	data = self.create_config(ctx, config['body'])
	LOG.debug(_('Generated Firewall Configuration %s'), str(data))
	return {'config':data}
Example #3
0
 def context(self):
     if 'crdservice.context' not in self.environ:
         self.environ['crdservice.context'] = context.get_admin_context()
     return self.environ['crdservice.context']
Example #4
0
    def generate_slb_config(self,ctx_con, config):
	LOG.debug(_('Generating Loadbalancer Configuration %s'), str(config))
        ctx = context.get_admin_context()
	data = self.create_config(ctx, config['body'])
	return {'config':data}
Example #5
0
 def periodic_tasks(self, raise_on_error=False):
     """Tasks to be run at a periodic interval."""
     ctxt = context.get_admin_context()
     self.manager.periodic_tasks(ctxt, raise_on_error=raise_on_error)