yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/apis/compute/disk_const.go (about)

     1  // Copyright 2019 Yunion
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain 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,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package compute
    16  
    17  const (
    18  	DISK_INIT                = "init"
    19  	DISK_REBUILD             = "rebuild"
    20  	DISK_ALLOC_FAILED        = "alloc_failed"
    21  	DISK_STARTALLOC          = "start_alloc"
    22  	DISK_BACKUP_STARTALLOC   = "backup_start_alloc"
    23  	DISK_BACKUP_ALLOC_FAILED = "backup_alloc_failed"
    24  	DISK_ALLOCATING          = "allocating"
    25  	DISK_READY               = "ready"
    26  	DISK_RESET               = "reset"
    27  	DISK_RESET_FAILED        = "reset_failed"
    28  	DISK_DEALLOC             = "deallocating"
    29  	DISK_DEALLOC_FAILED      = "dealloc_failed"
    30  	DISK_UNKNOWN             = "unknown"
    31  	DISK_DETACHING           = "detaching"
    32  	DISK_ATTACHING           = "attaching"
    33  	DISK_CLONING             = "cloning" // 硬盘克隆
    34  
    35  	DISK_START_SAVE = "start_save"
    36  	DISK_SAVING     = "saving"
    37  
    38  	DISK_START_RESIZE  = "start_resize"
    39  	DISK_RESIZING      = "resizing"
    40  	DISK_RESIZE_FAILED = "resize_failed"
    41  
    42  	DISK_START_MIGRATE = "start_migrate"
    43  	DISK_POST_MIGRATE  = "post_migrate"
    44  	DISK_MIGRATING     = "migrating"
    45  
    46  	DISK_CLONE      = "clone"
    47  	DISK_CLONE_FAIL = "clone_failed"
    48  
    49  	DISK_START_SNAPSHOT       = "start_snapshot"
    50  	DISK_SNAPSHOTING          = "snapshoting"
    51  	DISK_APPLY_SNAPSHOT_FAIL  = "apply_snapshot_failed"
    52  	DISK_CALCEL_SNAPSHOT_FAIL = "cancel_snapshot_failed"
    53  
    54  	DISK_TYPE_SYS    = "sys"
    55  	DISK_TYPE_SWAP   = "swap"
    56  	DISK_TYPE_DATA   = "data"
    57  	DISK_TYPE_VOLUME = "volume"
    58  
    59  	DISK_BACKING_IMAGE = "image"
    60  
    61  	DISK_SIZE_AUTOEXTEND = -1
    62  
    63  	DISK_NOT_EXIST = "not_exist"
    64  	DISK_EXIST     = "exist"
    65  )
    66  
    67  const DISK_META_EXISTING_PATH = "disk_existing_path"
    68  
    69  const (
    70  	DISK_DRIVER_VIRTIO = "virtio"
    71  	DISK_DRIVER_SCSI   = "scsi"
    72  	DISK_DRIVER_PVSCSI = "pvscsi"
    73  	DISK_DRIVER_IDE    = "ide"
    74  	DISK_DRIVER_SATA   = "sata"
    75  )