| 1 |
# All Rights Reserved. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 |
# not use this file except in compliance with the License. You may obtain |
| 5 |
# a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 |
# License for the specific language governing permissions and limitations |
| 13 |
# under the License. |
| 14 |
|
| 15 |
|
| 16 |
# Valid trunk statuses |
| 17 |
|
| 18 |
# The trunk is happy, yay! |
| 19 |
# A trunk remains in ACTIVE state when updates like name or admin_status_up |
| 20 |
# occur. It goes back to ACTIVE state from other states (e.g. BUILD) when |
| 21 |
# logical and physical resource provisioning has completed successfully. The |
| 22 |
# attribute ADMIN_STATE_UP is not to be confused with STATUS: the former |
| 23 |
# indicates whether a trunk can be managed. If a trunk has admin_state_up |
| 24 |
# equal to false, the trunk plugin will reject any user request to manage |
| 25 |
# the trunk resources (i.e. adding/removing sub-ports). ACTIVE_STATUS |
| 26 |
# reflects the provisioning state of logical and physical resources associated |
| 27 |
# with the trunk. |
| 28 |
TRUNK_ACTIVE_STATUS = 'ACTIVE' |
| 29 |
|
| 30 |
# A trunk is in DOWN state any time the logical and physical resources |
| 31 |
# associated to a trunk are not in sync. This can happen in the following |
| 32 |
# cases: |
| 33 |
# a) A user has asked to create a trunk, or add(remove) subports to a |
| 34 |
# trunk in ACTIVE state. In this case, the plugin has created/updated the |
| 35 |
# logical resource, and the request has been passed along to a backend. The |
| 36 |
# physical resources associated to the trunk are in the process of being |
| 37 |
# (de)commissioned. While this happens, the logical and physical state are |
| 38 |
# mismatching, albeit temporarily during subport operations, or until a user |
| 39 |
# spawns a VM after a trunk creation. |
| 40 |
# b) A system event, such as instance deletion, has led to the deprovisioning |
| 41 |
# of the entire set of physical resources associated to the trunk. In this |
| 42 |
# case, the logical resource exists but it has no physical resources |
| 43 |
# associated with it, and the logical and physical state of the trunk are |
| 44 |
# not matching. |
| 45 |
TRUNK_DOWN_STATUS = 'DOWN' |
| 46 |
|
| 47 |
# A driver/backend has acknowledged the server request: once the server |
| 48 |
# notifies the driver/backend, a trunk is in BUILD state while the |
| 49 |
# backend provisions the trunk resources. |
| 50 |
TRUNK_BUILD_STATUS = 'BUILD' |
| 51 |
|
| 52 |
# Should any temporary system failure occur during the provisioning process, |
| 53 |
# a trunk is in DEGRADED state. This means that the trunk was only |
| 54 |
# partially provisioned, and only a subset of the subports were added |
| 55 |
# successfully to the trunk. The operation of removing/adding the faulty |
| 56 |
# subports may be attempted as a recovery measure. |
| 57 |
TRUNK_DEGRADED_STATUS = 'DEGRADED' |
| 58 |
|
| 59 |
# Due to unforeseen circumstances, the user request has led to a conflict, and |
| 60 |
# the trunk cannot be provisioned correctly for a subset of subports. For |
| 61 |
# instance, a subport belonging to a network might not be compatible with |
| 62 |
# the current trunk configuration, or the binding process leads to a persistent |
| 63 |
# failure. Removing the 'offending' resource may be attempted as a recovery |
| 64 |
# measure, but readding it to the trunk should lead to the same error |
| 65 |
# condition. A trunk in ERROR status should be brought back to a sane status |
| 66 |
# (i.e. any state except ERROR state) before attempting to add more subports, |
| 67 |
# therefore requests of adding more subports must be rejected to avoid |
| 68 |
# cascading errors. |
| 69 |
TRUNK_ERROR_STATUS = 'ERROR' |
| 70 |
|
| 71 |
|
| 72 |
# String literals for identifying trunk resources |
| 73 |
# also see SUBPORTS, TRUNK and TRUNK_PLUGIN in neutron_lib.callbacks.resources |
| 74 |
TRUNK_PARENT_PORT = 'parent_port' |
| 75 |
TRUNK_SUBPORT_OWNER = 'trunk:subport' |
| 76 |
|
| 77 |
|
| 78 |
# String literals for segmentation types |
| 79 |
SEGMENTATION_TYPE_VLAN = 'vlan' |
| 80 |
SEGMENTATION_TYPE_INHERIT = 'inherit' |