Ejemplo n.º 1
0
 def __init__(self):
     """Initialization for the loadbalancer service plugin."""
     self.db = ldbv2.LoadBalancerPluginDbv2()
     self.service_type_manager = st_db.ServiceTypeManager.get_instance()
     add_provider_configuration(
         self.service_type_manager, constants.LOADBALANCERV2)
     self._load_drivers()
     self.db.subscribe()
Ejemplo n.º 2
0
 def __init__(self, driver):
     super(LoadBalancerManager, self).__init__(driver)
     self.db = ldbv2.LoadBalancerPluginDbv2()
Ejemplo n.º 3
0
# -*- coding: utf-8 -*-

import sys
from oslo_config import cfg
from oslo_db import options as db_options
from neutron_lib import context as ncontext
from neutron_lbaas.db.loadbalancer import loadbalancer_dbv2 as ldbv2

# import pdb; pdb.set_trace()
# connection = mysql+pymysql://root:[email protected]/neutron?charset=utf8
db_options.set_defaults(cfg.CONF)
cfg.CONF(sys.argv[1:])

context = ncontext.get_admin_context()
db = ldbv2.LoadBalancerPluginDbv2()
provider_name = db.get_provider_names_used_in_loadbalancers(context)
print provider_name
Ejemplo n.º 4
0
 def __init__(self, driver):
     self.driver = driver
     self.db = ldbv2.LoadBalancerPluginDbv2()
Ejemplo n.º 5
0
 def __init__(self):
     """Initialization for the loadbalancer service plugin."""
     self.db = ldbv2.LoadBalancerPluginDbv2()
     self.service_type_manager = st_db.ServiceTypeManager.get_instance()
     self._load_drivers()