Yogesh | bdb8810 | 2015-09-29 23:41:02 -0400 | [diff] [blame] | 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 | |
Clinton Knight | 7f16b8c | 2016-06-08 13:46:51 -0700 | [diff] [blame] | 13 | # Shares |
Yogesh | bdb8810 | 2015-09-29 23:41:02 -0400 | [diff] [blame] | 14 | STATUS_ERROR = 'error' |
| 15 | STATUS_AVAILABLE = 'available' |
| 16 | STATUS_ERROR_DELETING = 'error_deleting' |
yogesh | f5bc653 | 2016-10-25 14:57:11 -0400 | [diff] [blame] | 17 | STATUS_MIGRATING = 'migrating' |
Lucio Seki | 3705694 | 2019-01-24 15:40:20 -0200 | [diff] [blame] | 18 | STATUS_MANAGE_ERROR = 'manage_error' |
| 19 | STATUS_MIGRATING_TO = 'migrating_to' |
| 20 | STATUS_CREATING = 'creating' |
| 21 | STATUS_DELETING = 'deleting' |
Nir Gilboa | c07415d | 2018-01-07 10:52:18 -0800 | [diff] [blame] | 22 | STATUS_SHRINKING = 'shrinking' |
danielarthurt | 247b0b6 | 2020-03-18 14:31:39 +0000 | [diff] [blame] | 23 | STATUS_SHRINKING_POSSIBLE_DATA_LOSS_ERROR = ( |
| 24 | 'shrinking_possible_data_loss_error') |
Yogesh | bdb8810 | 2015-09-29 23:41:02 -0400 | [diff] [blame] | 25 | TEMPEST_MANILA_PREFIX = 'tempest-manila' |
Clinton Knight | 7f16b8c | 2016-06-08 13:46:51 -0700 | [diff] [blame] | 26 | |
| 27 | # Replication |
Yogesh | bdb8810 | 2015-09-29 23:41:02 -0400 | [diff] [blame] | 28 | REPLICATION_STYLE_READABLE = 'readable' |
| 29 | REPLICATION_STYLE_WRITABLE = 'writable' |
| 30 | REPLICATION_STYLE_DR = 'dr' |
| 31 | REPLICATION_TYPE_CHOICES = ( |
| 32 | REPLICATION_STYLE_READABLE, |
| 33 | REPLICATION_STYLE_WRITABLE, |
| 34 | REPLICATION_STYLE_DR, |
| 35 | ) |
| 36 | REPLICATION_PROMOTION_CHOICES = ( |
| 37 | REPLICATION_STYLE_READABLE, |
| 38 | REPLICATION_STYLE_DR, |
| 39 | ) |
| 40 | REPLICATION_STATE_ACTIVE = 'active' |
| 41 | REPLICATION_STATE_IN_SYNC = 'in_sync' |
| 42 | REPLICATION_STATE_OUT_OF_SYNC = 'out_of_sync' |
silvacarloss | d354d67 | 2020-08-23 18:49:52 +0000 | [diff] [blame] | 43 | MIN_SHARE_REPLICATION_VERSION = '2.11' |
| 44 | SHARE_REPLICA_GRADUATION_VERSION = '2.56' |
kpdev | 2521fbf | 2021-08-15 21:54:41 +0200 | [diff] [blame] | 45 | SHARE_REPLICA_SHARE_NET_PARAM_VERSION = '2.72' |
Yogesh | bdb8810 | 2015-09-29 23:41:02 -0400 | [diff] [blame] | 46 | |
Clinton Knight | 7f16b8c | 2016-06-08 13:46:51 -0700 | [diff] [blame] | 47 | # Access Rules |
Yogesh | bdb8810 | 2015-09-29 23:41:02 -0400 | [diff] [blame] | 48 | RULE_STATE_ACTIVE = 'active' |
| 49 | RULE_STATE_OUT_OF_SYNC = 'out_of_sync' |
| 50 | RULE_STATE_ERROR = 'error' |
Rodrigo Barbieri | c9abf28 | 2016-08-24 22:01:31 -0300 | [diff] [blame] | 51 | |
| 52 | TASK_STATE_MIGRATION_STARTING = 'migration_starting' |
| 53 | TASK_STATE_MIGRATION_IN_PROGRESS = 'migration_in_progress' |
| 54 | TASK_STATE_MIGRATION_COMPLETING = 'migration_completing' |
| 55 | TASK_STATE_MIGRATION_SUCCESS = 'migration_success' |
| 56 | TASK_STATE_MIGRATION_ERROR = 'migration_error' |
| 57 | TASK_STATE_MIGRATION_CANCELLED = 'migration_cancelled' |
| 58 | TASK_STATE_MIGRATION_DRIVER_STARTING = 'migration_driver_starting' |
| 59 | TASK_STATE_MIGRATION_DRIVER_IN_PROGRESS = 'migration_driver_in_progress' |
| 60 | TASK_STATE_MIGRATION_DRIVER_PHASE1_DONE = 'migration_driver_phase1_done' |
| 61 | TASK_STATE_DATA_COPYING_STARTING = 'data_copying_starting' |
| 62 | TASK_STATE_DATA_COPYING_IN_PROGRESS = 'data_copying_in_progress' |
| 63 | TASK_STATE_DATA_COPYING_COMPLETING = 'data_copying_completing' |
| 64 | TASK_STATE_DATA_COPYING_COMPLETED = 'data_copying_completed' |
| 65 | TASK_STATE_DATA_COPYING_CANCELLED = 'data_copying_cancelled' |
| 66 | TASK_STATE_DATA_COPYING_ERROR = 'data_copying_error' |
Clinton Knight | 7f16b8c | 2016-06-08 13:46:51 -0700 | [diff] [blame] | 67 | |
| 68 | # Revert to snapshot |
| 69 | REVERT_TO_SNAPSHOT_MICROVERSION = '2.27' |
| 70 | REVERT_TO_SNAPSHOT_SUPPORT = 'revert_to_snapshot_support' |
| 71 | STATUS_RESTORING = 'restoring' |
| 72 | STATUS_REVERTING = 'reverting' |
| 73 | STATUS_REVERTING_ERROR = 'reverting_error' |
Andrew Kerr | b843692 | 2016-06-01 15:32:43 -0400 | [diff] [blame] | 74 | |
| 75 | # Share groups |
| 76 | MIN_SHARE_GROUP_MICROVERSION = '2.31' |
silvacarloss | 6e57568 | 2020-02-18 19:52:35 -0300 | [diff] [blame] | 77 | SHARE_GROUPS_GRADUATION_VERSION = '2.55' |
Andrew Kerr | b843692 | 2016-06-01 15:32:43 -0400 | [diff] [blame] | 78 | SHARE_GROUP_SIMPLE_KEYS = { |
| 79 | 'id', 'name', 'links', |
| 80 | } |
| 81 | SHARE_GROUP_DETAIL_REQUIRED_KEYS = { |
| 82 | 'id', 'name', 'description', 'created_at', 'status', 'share_types', |
| 83 | 'project_id', 'host', 'links', 'share_group_type_id', |
| 84 | } |
| 85 | SHARE_GROUP_SNAPSHOT_SIMPLE_KEYS = { |
| 86 | 'id', 'name', 'links', |
| 87 | } |
| 88 | SHARE_GROUP_SNAPSHOT_DETAIL_REQUIRED_KEYS = { |
| 89 | 'id', 'name', 'description', 'created_at', 'status', 'project_id', |
| 90 | 'links', 'share_group_id', 'members', |
| 91 | } |
| 92 | |
| 93 | SHARE_GROUP_TYPE_REQUIRED_KEYS = { |
| 94 | 'id', 'name', 'share_types', 'is_public', 'group_specs', |
| 95 | } |
zhongjun2 | ac9fbb9 | 2018-07-02 12:30:25 +0000 | [diff] [blame] | 96 | |
| 97 | MIN_SHARE_ACCESS_METADATA_MICROVERSION = '2.45' |
Lucio Seki | 3705694 | 2019-01-24 15:40:20 -0200 | [diff] [blame] | 98 | |
| 99 | # Share servers |
| 100 | SERVER_STATE_ACTIVE = 'active' |
debeltrami | 0d523bb | 2020-08-20 12:48:49 +0000 | [diff] [blame] | 101 | SERVER_STATE_INACTIVE = 'inactive' |
Lucio Seki | 3705694 | 2019-01-24 15:40:20 -0200 | [diff] [blame] | 102 | SERVER_STATE_CREATING = 'creating' |
| 103 | SERVER_STATE_DELETING = 'deleting' |
| 104 | SERVER_STATE_ERROR = 'error' |
| 105 | SERVER_STATE_MANAGE_ERROR = 'manage_error' |
| 106 | SERVER_STATE_MANAGE_STARTING = 'manage_starting' |
| 107 | SERVER_STATE_UNMANAGE_ERROR = 'unmanage_error' |
| 108 | SERVER_STATE_UNMANAGE_STARTING = 'unmanage_starting' |
debeltrami | 0d523bb | 2020-08-20 12:48:49 +0000 | [diff] [blame] | 109 | STATUS_SERVER_MIGRATING = 'server_migrating' |
| 110 | STATUS_SERVER_MIGRATING_TO = 'server_migrating_to' |