-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
package disk | ||
|
||
type ListVolumesRequest struct { | ||
// | ||
Marker string `q:"marker,omitempty"` | ||
// | ||
Name string `q:"name,omitempty"` | ||
// | ||
Limit int32 `q:"limit,omitempty"` | ||
// | ||
SortKey string `q:"sort_key,omitempty"` | ||
// | ||
Offset int32 `q:"offset,omitempty"` | ||
// | ||
SortDir string `q:"sort_dir,omitempty"` | ||
// | ||
Status string `q:"status,omitempty"` | ||
// | ||
Metadata string `q:"metadata,omitempty"` | ||
// | ||
AvailabilityZone string `q:"availability_zone,omitempty"` | ||
// | ||
Multiattach bool `q:"multiattach,omitempty"` | ||
// | ||
ServiceType string `q:"service_type,omitempty"` | ||
// | ||
DedicatedStorageId string `q:"dedicated_storage_id,omitempty"` | ||
// | ||
DedicatedStorageName string `q:"dedicated_storage_name,omitempty"` | ||
// | ||
VolumeTypeId string `q:"volume_type_id,omitempty"` | ||
// | ||
Id string `q:"id,omitempty"` | ||
// | ||
Ids string `q:"ids,omitempty"` | ||
// | ||
EnterpriseProjectId string `q:"enterprise_project_id,omitempty"` | ||
// | ||
ServerId string `q:"server_id,omitempty"` | ||
} | ||
|
||
// GET /v2/{project_id}/cloudvolumes/detail | ||
|
||
type ListVolumesResponse struct { | ||
// | ||
Count int32 `json:"count,omitempty"` | ||
// | ||
VolumesLinks []Link `json:"volumes_links,omitempty"` | ||
// | ||
Volumes []VolumeDetail `json:"volumes,omitempty"` | ||
} | ||
|
||
type Link struct { | ||
// | ||
Href string `json:"href,omitempty"` | ||
// | ||
Rel string `json:"rel,omitempty"` | ||
} | ||
|
||
type VolumeDetail struct { | ||
// | ||
Id string `json:"id"` | ||
// | ||
Links []Link `json:"links"` | ||
// | ||
Name string `json:"name"` | ||
// | ||
Status string `json:"status"` | ||
// | ||
Attachments []Attachment `json:"attachments"` | ||
// | ||
AvailabilityZone string `json:"availability_zone"` | ||
// | ||
OsVolHostAttrhost string `json:"os-vol-host-attr:host"` | ||
// | ||
SourceVolid string `json:"source_volid,omitempty"` | ||
// | ||
SnapshotId string `json:"snapshot_id"` | ||
// | ||
Description string `json:"description"` | ||
// | ||
CreatedAt string `json:"created_at"` | ||
// | ||
OsVolTenantAttrtenantId string `json:"os-vol-tenant-attr:tenant_id"` | ||
// | ||
VolumeImageMetadata map[string]interface{} `json:"volume_image_metadata"` | ||
// | ||
VolumeType string `json:"volume_type"` | ||
// | ||
Size int32 `json:"size"` | ||
// | ||
ConsistencygroupId string `json:"consistencygroup_id,omitempty"` | ||
// | ||
Bootable string `json:"bootable"` | ||
// | ||
Metadata map[string]interface{} `json:"metadata"` | ||
// | ||
UpdatedAt string `json:"updated_at"` | ||
// | ||
Encrypted bool `json:"encrypted,omitempty"` | ||
// | ||
ReplicationStatus string `json:"replication_status"` | ||
// | ||
OsVolumeReplicationextendedStatus string `json:"os-volume-replication:extended_status"` | ||
// | ||
OsVolMigStatusAttrmigstat string `json:"os-vol-mig-status-attr:migstat"` | ||
// | ||
OsVolMigStatusAttrnameId string `json:"os-vol-mig-status-attr:name_id"` | ||
// | ||
Shareable string `json:"shareable"` | ||
// | ||
UserId string `json:"user_id"` | ||
// | ||
ServiceType string `json:"service_type"` | ||
// | ||
Multiattach bool `json:"multiattach"` | ||
// | ||
DedicatedStorageId string `json:"dedicated_storage_id,omitempty"` | ||
// | ||
DedicatedStorageName string `json:"dedicated_storage_name,omitempty"` | ||
// | ||
Tags map[string]string `json:"tags"` | ||
// | ||
Wwn string `json:"wwn,omitempty"` | ||
// | ||
EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` | ||
// | ||
SerialNumber string `json:"serial_number,omitempty"` | ||
} | ||
|
||
type Attachment struct { | ||
// | ||
AttachedAt string `json:"attached_at"` | ||
// | ||
AttachmentId string `json:"attachment_id"` | ||
// | ||
Device string `json:"device"` | ||
// | ||
HostName string `json:"host_name"` | ||
// | ||
Id string `json:"id"` | ||
// | ||
ServerId string `json:"server_id"` | ||
// | ||
VolumeId string `json:"volume_id"` | ||
} |