本文整理汇总了Python中neutron.db.api.register_models函数的典型用法代码示例。如果您正苦于以下问题:Python register_models函数的具体用法?Python register_models怎么用?Python register_models使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了register_models函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
def setUp(self):
self.context = context.Context('fake', 'fake', is_admin=False)
super(QuarkIPAddressFunctionalTest, self).setUp()
cfg.CONF.set_override('connection', 'sqlite://', 'database')
neutron_db_api.configure_db()
neutron_db_api.register_models(models.BASEV2)
示例2: setUp
def setUp(self):
super(TestDBAPI, self).setUp()
configure_mappers()
cfg.CONF.set_override('connection', 'sqlite://', 'database')
neutron_db_api.configure_db()
neutron_db_api.register_models(models.BASEV2)
示例3: __init__
def __init__(self):
"""Initialization for the loadbalancer service plugin."""
qdbapi.register_models()
self.service_type_manager = st_db.ServiceTypeManager.get_instance()
self._load_drivers()
#self._crdclient = crdclient.Client(username=cfg.CONF.ml2_fslsdn.crd_user_name,
# password=cfg.CONF.ml2_fslsdn.crd_password,
# tenant_name=cfg.CONF.ml2_fslsdn.crd_tenant_name,
# auth_url=cfg.CONF.ml2_fslsdn.crd_auth_url)
self._crdclient = CrdClient()
示例4: __init__
def __init__(self):
qdbapi.register_models()
super(L3VRouterPlugin, self).__init__()
self.initialize()
self.router_scheduler = importutils.import_object(
cfg.CONF.router_scheduler_driver)
# TODO(yamahata):XXX
# for backlogging of non-scheduled routers
self._setup_backlog_handling()
self._setup_device_handling()
示例5: __init__
def __init__(self):
"""Do the initialization for the firewall service plugin here."""
qdbapi.register_models()
self.endpoints = [FirewallCallbacks(self)]
self.conn = rpc_compat.create_connection(new=True)
self.conn.create_consumer(
topics.FIREWALL_PLUGIN, self.endpoints, fanout=False)
self.conn.consume_in_threads()
self.agent_rpc = FirewallAgentApi(
topics.L3_AGENT,
cfg.CONF.host
)
示例6: setUp
def setUp(self):
super(TestNVPDriver, self).setUp()
if not hasattr(self, 'driver'):
self.driver = quark.drivers.nvp_driver.NVPDriver()
cfg.CONF.set_override('connection', 'sqlite://', 'database')
cfg.CONF.set_override('max_rules_per_group', 3, 'NVP')
cfg.CONF.set_override('max_rules_per_port', 1, 'NVP')
self.driver.max_ports_per_switch = 0
db_api.configure_db()
db_api.register_models(models.BASEV2)
self.lswitch_uuid = "12345678-1234-1234-1234-123456781234"
self.context.tenant_id = "tid"
self.lport_uuid = "12345678-0000-0000-0000-123456781234"
self.net_id = "12345678-1234-1234-1234-123412341234"
self.port_id = "12345678-0000-0000-0000-123412341234"
self.profile_id = "12345678-0000-0000-0000-000000000000"
self.d_pkg = "quark.drivers.nvp_driver.NVPDriver"
self.max_spanning = 3
self.driver.limits.update({'max_rules_per_group': 3,
'max_rules_per_port': 2})
示例7: __init__
def __init__(self):
"""Initialization for the loadbalancer service plugin."""
qdbapi.register_models()
self._load_drivers()
示例8: __init__
def __init__(self):
"""Do the initialization for the vpn service plugin here."""
qdbapi.register_models()
示例9: _initialize_db
def _initialize_db(self):
db.configure_db()
db.register_models(models_v2.model_base.BASEV2)
示例10: __init__
def __init__(self):
super(ApicL3ServicePlugin, self).__init__()
qdbapi.register_models(base=model_base.BASEV2)
self.manager = apic_manager.APICManager()
示例11: __init__
def __init__(self):
qdbapi.register_models(base=model_base.BASEV2)
self.setup_rpc()
self.router_scheduler = importutils.import_object(
cfg.CONF.router_scheduler_driver)
示例12: __init__
def __init__(self):
"""Initialization for the loadbalancer service plugin."""
qdbapi.register_models()
self.service_type_manager = st_db.ServiceTypeManager.get_instance()
self._load_drivers()
示例13: __init__
def __init__(self):
neutron_db_api.configure_db()
neutron_db_api.register_models(base=models.BASEV2)
示例14: __init__
def __init__(self):
LOG.info("Starting quark plugin")
neutron_db_api.configure_db()
neutron_db_api.register_models(base=models.BASEV2)
示例15: __init__
def __init__(self):
dbapi.register_models()
self.meter_rpc = metering_rpc_agent_api.MeteringAgentNotifyAPI()