bbaa2fbb8e
On installing only neutron-linuxbridge-agent package, the dhcp cannot start successfully because of the imports from ovs plugin. This change removes the explicit include of the ovs plugin from ovs_lib.py. INVALID_OFPORT has been moved to ovs_lib.py while VXLAN_UDP_PORT has moved to plugins/common/constants.py. The imports for these 2 constants in files which uses it has been corrected to new location. Closes-Bug: #1271449 Change-Id: I6559cb43d1b10b4f926c453a103b12017b59f259
85 lines
2.0 KiB
Python
85 lines
2.0 KiB
Python
# Copyright 2012 OpenStack Foundation.
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
# service type constants:
|
|
CORE = "CORE"
|
|
DUMMY = "DUMMY"
|
|
LOADBALANCER = "LOADBALANCER"
|
|
FIREWALL = "FIREWALL"
|
|
VPN = "VPN"
|
|
METERING = "METERING"
|
|
L3_ROUTER_NAT = "L3_ROUTER_NAT"
|
|
|
|
|
|
#maps extension alias to service type
|
|
EXT_TO_SERVICE_MAPPING = {
|
|
'dummy': DUMMY,
|
|
'lbaas': LOADBALANCER,
|
|
'fwaas': FIREWALL,
|
|
'vpnaas': VPN,
|
|
'metering': METERING,
|
|
'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]
|
|
|
|
COMMON_PREFIXES = {
|
|
CORE: "",
|
|
DUMMY: "/dummy_svc",
|
|
LOADBALANCER: "/lb",
|
|
FIREWALL: "/fw",
|
|
VPN: "/vpn",
|
|
METERING: "/metering",
|
|
L3_ROUTER_NAT: "",
|
|
}
|
|
|
|
# Service operation status constants
|
|
ACTIVE = "ACTIVE"
|
|
DOWN = "DOWN"
|
|
CREATED = "CREATED"
|
|
PENDING_CREATE = "PENDING_CREATE"
|
|
PENDING_UPDATE = "PENDING_UPDATE"
|
|
PENDING_DELETE = "PENDING_DELETE"
|
|
INACTIVE = "INACTIVE"
|
|
ERROR = "ERROR"
|
|
|
|
ACTIVE_PENDING_STATUSES = (
|
|
ACTIVE,
|
|
PENDING_CREATE,
|
|
PENDING_UPDATE
|
|
)
|
|
|
|
# FWaaS firewall rule action
|
|
FWAAS_ALLOW = "allow"
|
|
FWAAS_DENY = "deny"
|
|
|
|
# L3 Protocol name constants
|
|
TCP = "tcp"
|
|
UDP = "udp"
|
|
ICMP = "icmp"
|
|
|
|
# Network Type constants
|
|
TYPE_FLAT = 'flat'
|
|
TYPE_GRE = 'gre'
|
|
TYPE_LOCAL = 'local'
|
|
TYPE_VXLAN = 'vxlan'
|
|
TYPE_VLAN = 'vlan'
|
|
TYPE_NONE = 'none'
|
|
|
|
# Values for network_type
|
|
VXLAN_UDP_PORT = 4789
|