Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(c *gcorecloud.ServiceClient, clusterID string) pagination.Pager
List retrieves list of volumes for GPU virtual cluster
Types ¶
type ClusterInstanceVolume ¶
type ClusterInstanceVolume struct {
ID string `json:"id"`
ServerID string `json:"server_id"`
Name string `json:"name"`
Type string `json:"type"`
Status string `json:"status"`
Size int `json:"size"`
Bootable bool `json:"bootable"`
Metadata []DetailedMetadata `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
}
ClusterInstanceVolume represents a volume in a cluster
func ExtractVolumes ¶
func ExtractVolumes(r pagination.Page) ([]ClusterInstanceVolume, error)
ExtractVolumes extracts volumes from a ClusterInstanceVolumesList
type ClusterInstanceVolumesList ¶
type ClusterInstanceVolumesList struct {
Count int `json:"count"`
Results []ClusterInstanceVolume `json:"results"`
}
ClusterInstanceVolumesList represents a paginated list of volumes
func (ClusterInstanceVolumesList) GetBody ¶
func (r ClusterInstanceVolumesList) GetBody() interface{}
GetBody implements pagination.Page interface
type DetailedMetadata ¶
type DetailedMetadata struct {
Key string `json:"key"`
Value string `json:"value"`
ReadOnly bool `json:"read_only"`
}
DetailedMetadata represents metadata with read-only flag
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*ClusterInstanceVolumesList, error)
Extract is a function that accepts a result and extracts a volume resource.
Click to show internal directories.
Click to hide internal directories.