Merge "COMMON_PREFIXES cleanup - patch 1/5"
This commit is contained in:
commit
76cb37a29f
@ -35,14 +35,10 @@ EXT_TO_SERVICE_MAPPING = {
|
||||
}
|
||||
|
||||
COMMON_PREFIXES = {
|
||||
CORE: "",
|
||||
DUMMY: "/dummy_svc",
|
||||
LOADBALANCER: "/lb",
|
||||
LOADBALANCERV2: "/lbaas",
|
||||
FIREWALL: "/fw",
|
||||
VPN: "/vpn",
|
||||
METERING: "/metering",
|
||||
L3_ROUTER_NAT: "",
|
||||
}
|
||||
|
||||
# Service operation status constants
|
||||
|
@ -22,6 +22,7 @@ from neutron.db.metering import metering_rpc
|
||||
class MeteringPlugin(metering_db.MeteringDbMixin):
|
||||
"""Implementation of the Neutron Metering Service Plugin."""
|
||||
supported_extension_aliases = ["metering"]
|
||||
path_prefix = "/metering"
|
||||
|
||||
def __init__(self):
|
||||
super(MeteringPlugin, self).__init__()
|
||||
|
@ -114,7 +114,7 @@ class MeteringPluginDbTestCase(
|
||||
fmt = 'json'
|
||||
|
||||
resource_prefix_map = dict(
|
||||
(k.replace('_', '-'), constants.COMMON_PREFIXES[constants.METERING])
|
||||
(k.replace('_', '-'), "/metering")
|
||||
for k in metering.RESOURCE_ATTRIBUTE_MAP.keys()
|
||||
)
|
||||
|
||||
|
@ -88,6 +88,7 @@ class DummyServicePlugin(service_base.ServicePluginBase):
|
||||
"""
|
||||
|
||||
supported_extension_aliases = ['dummy', servicetype.EXT_ALIAS]
|
||||
path_prefix = "/dummy_svc"
|
||||
agent_notifiers = {'dummy': 'dummy_agent_notifier'}
|
||||
|
||||
def __init__(self):
|
||||
|
@ -62,7 +62,7 @@ class TestMeteringPlugin(test_db_base_plugin_v2.NeutronDbPluginV2TestCase,
|
||||
test_metering_db.MeteringPluginDbTestCaseMixin):
|
||||
|
||||
resource_prefix_map = dict(
|
||||
(k.replace('_', '-'), constants.COMMON_PREFIXES[constants.METERING])
|
||||
(k.replace('_', '-'), "/metering")
|
||||
for k in ext_metering.RESOURCE_ATTRIBUTE_MAP.keys()
|
||||
)
|
||||
|
||||
@ -281,7 +281,7 @@ class TestMeteringPluginL3AgentScheduler(
|
||||
test_metering_db.MeteringPluginDbTestCaseMixin):
|
||||
|
||||
resource_prefix_map = dict(
|
||||
(k.replace('_', '-'), constants.COMMON_PREFIXES[constants.METERING])
|
||||
(k.replace('_', '-'), "/metering")
|
||||
for k in ext_metering.RESOURCE_ATTRIBUTE_MAP.keys()
|
||||
)
|
||||
|
||||
@ -404,7 +404,7 @@ class TestMeteringPluginRpcFromL3Agent(
|
||||
test_metering_db.MeteringPluginDbTestCaseMixin):
|
||||
|
||||
resource_prefix_map = dict(
|
||||
(k.replace('_', '-'), constants.COMMON_PREFIXES[constants.METERING])
|
||||
(k.replace('_', '-'), "/metering")
|
||||
for k in ext_metering.RESOURCE_ATTRIBUTE_MAP
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user