# License for the specific language governing permissions and limitations
# under the License.
-# Service type constants:
+# Neutron well-known service type constants:
CORE = "CORE"
DUMMY = "DUMMY"
LOADBALANCER = "LOADBALANCER"
METERING = "METERING"
L3_ROUTER_NAT = "L3_ROUTER_NAT"
-
# Maps extension alias to service type
EXT_TO_SERVICE_MAPPING = {
'dummy': DUMMY,
'router': L3_ROUTER_NAT
}
-# TODO(salvatore-orlando): Move these (or derive them) from conf file
-ALLOWED_SERVICES = [CORE, DUMMY, LOADBALANCER, FIREWALL, VPN, METERING,
- L3_ROUTER_NAT, LOADBALANCERV2]
-
COMMON_PREFIXES = {
CORE: "",
DUMMY: "/dummy_svc",
prov_def)
LOG.error(msg)
raise n_exc.Invalid(msg)
- if svc_type not in constants.ALLOWED_SERVICES:
+ ALLOWED_SERVICES = constants.EXT_TO_SERVICE_MAPPING.values()
+ if svc_type not in ALLOWED_SERVICES:
msg = (_("Service type '%(svc_type)s' is not allowed, "
"allowed types: %(allowed)s") %
{'svc_type': svc_type,
- 'allowed': constants.ALLOWED_SERVICES})
+ 'allowed': ALLOWED_SERVICES})
LOG.error(msg)
raise n_exc.Invalid(msg)
driver = get_provider_driver_class(driver)