github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/cbr/v3/checkpoints/results.go (about) 1 package checkpoints 2 3 // Checkpoint is the structure that represents the checkpoint and corresponding backup resources detail. 4 type Checkpoint struct { 5 // The restore point ID. 6 ID string `json:"id"` 7 // The project ID. 8 ProjectId string `json:"project_id"` 9 // The creation time, the format is 'HHHH-MM-DDThh:mm:dd.000000'. 10 CreatedAt string `json:"created_at"` 11 // The status information. 12 // The valid values are as follows: 13 // + available 14 // + deleting 15 // + protecting 16 // + deleted 17 // + error-deleting 18 // + error 19 Status string `json:"status"` 20 // The vault information. 21 Vault VaultInfo `json:"vault"` 22 // The extended information. 23 ExtraInfo CheckpointExtraInfo `json:"extra_info"` 24 } 25 26 // VaultInfo is the structure that represents the backup storage information. 27 type VaultInfo struct { 28 // The vault ID. 29 ID string `json:"id"` 30 // The vault name. 31 Name string `json:"name"` 32 // The backup objects. 33 Resources []CheckpointResource `json:"resources"` 34 // The resources skipped during backup. 35 SkippedResources []SkippedResource `json:"skipped_resources"` 36 } 37 38 // CheckpointResource is the structure that represents the backup resources detail. 39 type CheckpointResource struct { 40 // Extra information of the resource. 41 ExtraInfo string `json:"extra_info"` 42 // ID of the resource to be backed up. 43 ID string `json:"id"` 44 // Name of the resource to be backed up. 45 Name string `json:"name"` 46 // Protected status. 47 // The valid values are as follows: 48 // + available 49 // + error 50 // + protecting 51 // + restoring 52 // + removing 53 ProtectStatus string `json:"protect_status"` 54 // Allocated capacity for the associated resource, in GB. 55 ResourceSize string `json:"resource_size"` 56 // The type of the resource to be backed up, which can be: 57 // + OS::Nova::Server 58 // + OS::Cinder::Volume 59 // + OS::Ironic::BareMetalServer 60 // + OS::Native::Server 61 // + OS::Sfs::Turbo 62 // + OS::Workspace::DesktopV2 63 Type string `json:"type"` 64 // Backup size. 65 BackupSize string `json:"backup_size"` 66 // Number of backups. 67 BackupCount string `json:"backup_count"` 68 } 69 70 // CheckpointResource is the structure that represents the resources list which are not backed up. 71 type SkippedResource struct { 72 // Resource ID. 73 ID string `json:"id"` 74 // Resource type. 75 Type string `json:"type"` 76 // Resource name. 77 Name string `json:"name"` 78 // Error code. 79 Code string `json:"code"` 80 // Reason for the skipping. For example, the resource is being backed up. 81 Reason string `json:"reason"` 82 } 83 84 // CheckpointExtraInfo is the structure that represents the extra information of the checkpoint. 85 type CheckpointExtraInfo struct { 86 // Backup name. 87 Name string `json:"name"` 88 // Backup description. 89 Description string `json:"description"` 90 // Number of days that backups can be retained. 91 RetentionDuration int `json:"retention_duration"` 92 }