rehome consumed neutron.common.constants

This patch rehomes those constants found in neutron.common.constants.py
that are used outside of neutron and are thus candidates for rehoming.
The remaining public attributes from neutron.common.constants will
be made private upon consumption of this rehome patch.

Change-Id: I360545b6ee4291547e0c5c8e668ad03d3efa4725
This commit is contained in:
Boden R 2017-06-02 10:53:17 -06:00
parent 5bbc1b3912
commit eb7a55bdca
4 changed files with 30 additions and 0 deletions

View File

@ -21,3 +21,12 @@ LB_EXTENSION_DRIVER = 'linuxbridge'
MACVTAP_EXTENSION_DRIVER = 'macvtap'
# Extension driver type for SR-IOV mech driver
SRIOV_EXTENSION_DRIVER = 'sriov'
# Agent states as detected by server, used to reply on agent's state report
# agent has just been registered
AGENT_NEW = 'new'
# agent is alive
AGENT_ALIVE = 'alive'
# agent has just returned to alive after being dead
AGENT_REVIVED = 'revived'

View File

@ -74,6 +74,9 @@ ROUTER_INTERFACE_OWNERS_SNAT = (DEVICE_OWNER_ROUTER_INTF,
DEVICE_OWNER_HA_REPLICATED_INT,
DEVICE_OWNER_DVR_INTERFACE,
DEVICE_OWNER_ROUTER_SNAT)
DEVICE_ID_RESERVED_DHCP_PORT = 'reserved_dhcp_port'
FLOATINGIP_KEY = '_floatingips'
INTERFACE_KEY = '_interfaces'
HA_INTERFACE_KEY = '_ha_interface'
@ -310,6 +313,13 @@ DNS_DOMAIN_DEFAULT = 'openstacklocal.'
DNS_LABEL_MAX_LEN = 63
DNS_LABEL_REGEX = "^[a-z0-9-]{1,%d}$" % DNS_LABEL_MAX_LEN
VALID_DSCP_MARKS = [0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34,
36, 38, 40, 46, 48, 56]
INGRESS_DIRECTION = 'ingress'
EGRESS_DIRECTION = 'egress'
VALID_DIRECTIONS = (INGRESS_DIRECTION, EGRESS_DIRECTION)
class Sentinel(object):
"""A constant object that does not change even when copied."""

View File

@ -27,3 +27,8 @@ FQDN_FIELD_SIZE = 255
# Alembic branches
EXPAND_BRANCH = 'expand'
CONTRACT_BRANCH = 'contract'
# Maximum value integer can take in MySQL and PostgreSQL
# In SQLite integer can be stored in 1, 2, 3, 4, 6, or 8 bytes,
# but here it will be limited by this value for consistency.
DB_INTEGER_MAX_VALUE = 2 ** 31 - 1

View File

@ -0,0 +1,6 @@
---
features:
- Constants from ``neutron.common.constants`` are now available in
neutron-lib. Note that consumers using ``ROUTER_STATUS_ACTIVE`` or
``ROUTER_STATUS_ERROR`` should now just use ``ACTIVE`` and ``ERROR``
from ``neutron_lib.constants``.