| 1 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 2 |
# not use this file except in compliance with the License. You may obtain |
| 3 |
# a copy of the License at |
| 4 |
# |
| 5 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 6 |
# |
| 7 |
# Unless required by applicable law or agreed to in writing, software |
| 8 |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 9 |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 10 |
# License for the specific language governing permissions and limitations |
| 11 |
# under the License. |
| 12 |
|
| 13 |
# Database field sizes |
| 14 |
NAME_FIELD_SIZE = 255 |
| 15 |
LONG_DESCRIPTION_FIELD_SIZE = 1024 |
| 16 |
DESCRIPTION_FIELD_SIZE = 255 |
| 17 |
PROJECT_ID_FIELD_SIZE = 255 |
| 18 |
DEVICE_ID_FIELD_SIZE = 255 |
| 19 |
DEVICE_OWNER_FIELD_SIZE = 255 |
| 20 |
UUID_FIELD_SIZE = 36 |
| 21 |
STATUS_FIELD_SIZE = 16 |
| 22 |
IP_ADDR_FIELD_SIZE = 64 # large enough to hold a v4 or v6 address |
| 23 |
MAC_ADDR_FIELD_SIZE = 32 |
| 24 |
RESOURCE_TYPE_FIELD_SIZE = 255 |
| 25 |
FQDN_FIELD_SIZE = 255 |
| 26 |
AZ_HINTS_DB_LEN = 255 |
| 27 |
ETHERTYPE_FIELD_SIZE = 40 |
| 28 |
|
| 29 |
# Alembic branches |
| 30 |
EXPAND_BRANCH = 'expand' |
| 31 |
CONTRACT_BRANCH = 'contract' |
| 32 |
|
| 33 |
# Maximum value integer can take in MySQL. |
| 34 |
# In SQLite integer can be stored in 1, 2, 3, 4, 6, or 8 bytes, |
| 35 |
# but here it will be limited by this value for consistency. |
| 36 |
DB_INTEGER_MAX_VALUE = 2 ** 31 - 1 |