blob: 8791837950846b011edbef86e539fb44edc1c9e3 [file] [log] [blame]
Yogeshbdb88102015-09-29 23:41:02 -04001# 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
Clinton Knight7f16b8c2016-06-08 13:46:51 -070013# Shares
Yogeshbdb88102015-09-29 23:41:02 -040014STATUS_ERROR = 'error'
15STATUS_AVAILABLE = 'available'
16STATUS_ERROR_DELETING = 'error_deleting'
yogeshf5bc6532016-10-25 14:57:11 -040017STATUS_MIGRATING = 'migrating'
Lucio Seki37056942019-01-24 15:40:20 -020018STATUS_MANAGE_ERROR = 'manage_error'
19STATUS_MIGRATING_TO = 'migrating_to'
20STATUS_CREATING = 'creating'
21STATUS_DELETING = 'deleting'
Nir Gilboac07415d2018-01-07 10:52:18 -080022STATUS_SHRINKING = 'shrinking'
yogeshf5bc6532016-10-25 14:57:11 -040023
Yogeshbdb88102015-09-29 23:41:02 -040024TEMPEST_MANILA_PREFIX = 'tempest-manila'
Clinton Knight7f16b8c2016-06-08 13:46:51 -070025
26# Replication
Yogeshbdb88102015-09-29 23:41:02 -040027REPLICATION_STYLE_READABLE = 'readable'
28REPLICATION_STYLE_WRITABLE = 'writable'
29REPLICATION_STYLE_DR = 'dr'
30REPLICATION_TYPE_CHOICES = (
31 REPLICATION_STYLE_READABLE,
32 REPLICATION_STYLE_WRITABLE,
33 REPLICATION_STYLE_DR,
34)
35REPLICATION_PROMOTION_CHOICES = (
36 REPLICATION_STYLE_READABLE,
37 REPLICATION_STYLE_DR,
38)
39REPLICATION_STATE_ACTIVE = 'active'
40REPLICATION_STATE_IN_SYNC = 'in_sync'
41REPLICATION_STATE_OUT_OF_SYNC = 'out_of_sync'
42
Clinton Knight7f16b8c2016-06-08 13:46:51 -070043# Access Rules
Yogeshbdb88102015-09-29 23:41:02 -040044RULE_STATE_ACTIVE = 'active'
45RULE_STATE_OUT_OF_SYNC = 'out_of_sync'
46RULE_STATE_ERROR = 'error'
Rodrigo Barbieric9abf282016-08-24 22:01:31 -030047
48TASK_STATE_MIGRATION_STARTING = 'migration_starting'
49TASK_STATE_MIGRATION_IN_PROGRESS = 'migration_in_progress'
50TASK_STATE_MIGRATION_COMPLETING = 'migration_completing'
51TASK_STATE_MIGRATION_SUCCESS = 'migration_success'
52TASK_STATE_MIGRATION_ERROR = 'migration_error'
53TASK_STATE_MIGRATION_CANCELLED = 'migration_cancelled'
54TASK_STATE_MIGRATION_DRIVER_STARTING = 'migration_driver_starting'
55TASK_STATE_MIGRATION_DRIVER_IN_PROGRESS = 'migration_driver_in_progress'
56TASK_STATE_MIGRATION_DRIVER_PHASE1_DONE = 'migration_driver_phase1_done'
57TASK_STATE_DATA_COPYING_STARTING = 'data_copying_starting'
58TASK_STATE_DATA_COPYING_IN_PROGRESS = 'data_copying_in_progress'
59TASK_STATE_DATA_COPYING_COMPLETING = 'data_copying_completing'
60TASK_STATE_DATA_COPYING_COMPLETED = 'data_copying_completed'
61TASK_STATE_DATA_COPYING_CANCELLED = 'data_copying_cancelled'
62TASK_STATE_DATA_COPYING_ERROR = 'data_copying_error'
Clinton Knight7f16b8c2016-06-08 13:46:51 -070063
64# Revert to snapshot
65REVERT_TO_SNAPSHOT_MICROVERSION = '2.27'
66REVERT_TO_SNAPSHOT_SUPPORT = 'revert_to_snapshot_support'
67STATUS_RESTORING = 'restoring'
68STATUS_REVERTING = 'reverting'
69STATUS_REVERTING_ERROR = 'reverting_error'
Andrew Kerrb8436922016-06-01 15:32:43 -040070
71# Share groups
72MIN_SHARE_GROUP_MICROVERSION = '2.31'
73SHARE_GROUP_SIMPLE_KEYS = {
74 'id', 'name', 'links',
75}
76SHARE_GROUP_DETAIL_REQUIRED_KEYS = {
77 'id', 'name', 'description', 'created_at', 'status', 'share_types',
78 'project_id', 'host', 'links', 'share_group_type_id',
79}
80SHARE_GROUP_SNAPSHOT_SIMPLE_KEYS = {
81 'id', 'name', 'links',
82}
83SHARE_GROUP_SNAPSHOT_DETAIL_REQUIRED_KEYS = {
84 'id', 'name', 'description', 'created_at', 'status', 'project_id',
85 'links', 'share_group_id', 'members',
86}
87
88SHARE_GROUP_TYPE_REQUIRED_KEYS = {
89 'id', 'name', 'share_types', 'is_public', 'group_specs',
90}
zhongjun2ac9fbb92018-07-02 12:30:25 +000091
92MIN_SHARE_ACCESS_METADATA_MICROVERSION = '2.45'
Lucio Seki37056942019-01-24 15:40:20 -020093
94# Share servers
95SERVER_STATE_ACTIVE = 'active'
96SERVER_STATE_CREATING = 'creating'
97SERVER_STATE_DELETING = 'deleting'
98SERVER_STATE_ERROR = 'error'
99SERVER_STATE_MANAGE_ERROR = 'manage_error'
100SERVER_STATE_MANAGE_STARTING = 'manage_starting'
101SERVER_STATE_UNMANAGE_ERROR = 'unmanage_error'
102SERVER_STATE_UNMANAGE_STARTING = 'unmanage_starting'