github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/csbs/v1/backup/results.go (about) 1 package backup 2 3 import ( 4 "github.com/opentelekomcloud/gophertelekomcloud/openstack/common/tags" 5 ) 6 7 const ProviderID = "fc4d5750-22e7-4798-8a46-f48f62c4c1da" 8 9 type Backup struct { 10 // Backup record ID 11 CheckpointId string `json:"checkpoint_id"` 12 // Creation time, for example, 2017-04-18T01:21:52.701973 13 CreatedAt string `json:"created_at"` 14 // Extension information 15 ExtendInfo ExtendInfo `json:"extend_info"` 16 // Backup ID 17 Id string `json:"id"` 18 // Backup name 19 Name string `json:"name"` 20 // ID of the object to be backed up 21 ResourceId string `json:"resource_id"` 22 // Backup status. Possible values are waiting_protect, protecting, available, waiting_restore, restoring, error, waiting_delete, deleting, and deleted. 23 // Enum:[ waiting_protect, protecting, available, waiting_restore, restoring, error, waiting_delete, deleting,deleted] 24 Status string `json:"status"` 25 // Modification time, for example, 2017-04-18T01:21:52.701973 26 UpdatedAt string `json:"updated_at"` 27 // VM metadata 28 VMMetadata VMMetadata `json:"backup_data"` 29 // Backup description 30 Description string `json:"description"` 31 // List of backup tags 32 // Keys in the tag list must be unique. 33 Tags []tags.ResourceTag `json:"tags"` 34 // Type of the backup object 35 ResourceType string `json:"resource_type"` 36 } 37 38 type ImagesData struct { 39 ImageId string `json:"image_id"` 40 } 41 42 type ExtendInfo struct { 43 // Whether automatic trigger is enabled 44 AutoTrigger bool `json:"auto_trigger"` 45 // Average rate. The unit is kb/s 46 AverageSpeed float32 `json:"average_speed"` 47 // The destination region of a backup replication. The default value is empty. 48 CopyFrom string `json:"copy_from"` 49 // Backup replication status. The default value is na. 50 // Possible values are na, waiting_copy, copying, success, and fail. 51 CopyStatus string `json:"copy_status"` 52 // Error code 53 FailCode FailCode `json:"fail_code"` 54 // Type of the failed operation 55 // Enum: [backup, restore, delete] 56 FailOp string `json:"fail_op"` 57 // Description of the failure cause 58 FailReason string `json:"fail_reason"` 59 // Backup type. For example, backup 60 ImageType string `json:"image_type"` 61 // Whether the backup is an enhanced backup 62 Incremental bool `json:"incremental"` 63 // Backup progress. The value is an integer ranging from 0 to 100. 64 Progress int `json:"progress"` 65 // AZ to which the backup resource belongs 66 ResourceAz string `json:"resource_az"` 67 // Backup object name 68 ResourceName string `json:"resource_name"` 69 // Type of the backup object. For example, OS::Nova::Server 70 ResourceType string `json:"resource_type"` 71 // Backup capacity. The unit is MB. 72 Size int `json:"size"` 73 // Space saving rate 74 SpaceSavingRatio float32 `json:"space_saving_ratio"` 75 // Volume backup list 76 VolumeBackups []VolumeBackup `json:"volume_backups"` 77 // Backup completion time, for example, 2017-04-18T01:21:52.701973 78 FinishedAt string `json:"finished_at"` 79 // Image data. This parameter has a value if an image has been created for the VM. 80 OsImagesData []ImagesData `json:"os_images_data"` 81 // Job ID 82 TaskId string `json:"taskid"` 83 // Virtualization type 84 // The value is fixed at QEMU. 85 HypervisorType string `json:"hypervisor_type"` 86 // Restoration mode. Possible values are na, snapshot, and backup. 87 // backup: Data is restored from backups of the EVS disks of the server. 88 // na: Restoration is not supported. 89 SupportedRestoreMode string `json:"supported_restore_mode"` 90 // Whether to allow lazyloading for fast restoration 91 Supportlld bool `json:"support_lld"` 92 } 93 94 type VMMetadata struct { 95 // Name of the AZ where the server is located. If this parameter is left blank, such information about the server has not been obtained. 96 RegionName string `json:"__openstack_region_name"` 97 // Server type 98 // The value is fixed at server (ECSs). 99 CloudServiceType string `json:"cloudservicetype"` 100 // System disk size corresponding to the server specifications 101 Disk int `json:"disk"` 102 // Image type 103 // The value can be: 104 // gold: public image 105 // private: private image 106 // market: market image 107 ImageType string `json:"imagetype"` 108 // Memory size of the server, in MB 109 Ram int `json:"ram"` 110 // CPU cores corresponding to the server 111 Vcpus int `json:"vcpus"` 112 // Elastic IP address of the server. If this parameter is left blank, such information about the server has not been obtained. 113 Eip string `json:"eip"` 114 // Internal IP address of the server. If this parameter is left blank, such information about the server has not been obtained. 115 PrivateIp string `json:"private_ip"` 116 } 117 118 type FailCode struct { 119 Code string `json:"Code"` 120 Description string `json:"Description"` 121 } 122 123 type VolumeBackup struct { 124 // Average rate, in MB/s 125 AverageSpeed int `json:"average_speed"` 126 // Whether the disk is bootable 127 // The value can be true or false. 128 Bootable bool `json:"bootable"` 129 // Cinder backup ID 130 Id string `json:"id"` 131 // Backup set type: backup 132 // Enum:[ backup] 133 ImageType string `json:"image_type"` 134 // Whether incremental backup is used 135 Incremental bool `json:"incremental"` 136 // ID of the snapshot from which the backup is generated 137 SnapshotID string `json:"snapshot_id"` 138 // EVS disk backup name 139 Name string `json:"name"` 140 // Accumulated size (MB) of backups 141 Size int `json:"size"` 142 // Source disk ID 143 SourceVolumeId string `json:"source_volume_id"` 144 // Source volume size in GB 145 SourceVolumeSize int `json:"source_volume_size"` 146 // Space saving rate 147 SpaceSavingRatio int `json:"space_saving_ratio"` 148 // Status 149 Status string `json:"status"` 150 // Source volume name 151 SourceVolumeName string `json:"source_volume_name"` 152 }