Documentation
¶
Overview ¶
Package schedulerstats returns information about shared file systems capacity and utilisation. Example:
listOpts := schedulerstats.ListOpts{
}
allPages, err := schedulerstats.List(client, listOpts).AllPages()
if err != nil {
panic(err)
}
allStats, err := schedulerstats.ExtractPools(allPages)
if err != nil {
panic(err)
}
for _, stat := range allStats {
fmt.Printf("%+v\n", stat)
}
Index ¶
- func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func ListDetail(client *gophercloud.ServiceClient, opts ListDetailOptsBuilder) pagination.Pager
- type Capabilities
- type ListDetailOpts
- type ListDetailOptsBuilder
- type ListOpts
- type ListOptsBuilder
- type Pool
- type PoolPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List makes a request against the API to list pool information.
func ListDetail ¶
func ListDetail(client *gophercloud.ServiceClient, opts ListDetailOptsBuilder) pagination.Pager
ListDetail makes a request against the API to list detailed pool information.
Types ¶
type Capabilities ¶
type Capabilities struct {
// The quality of service (QoS) support.
Qos bool `json:"qos"`
// The date and time stamp when the API request was issued.
Timestamp string `json:"timestamp"`
ShareBackendName string `json:"share_backend_name"`
DriverHandlesShareServers bool `json:"driver_handles_share_servers"`
// The driver version of the back end.
DriverVersion string `json:"driver_version"`
// The amount of free capacity for the back end, in GiBs. A valid value is a string, such as unknown, or an integer.
FreeCapacityGB float64 `json:"-"`
// The storage protocol for the back end. For example, NFS_CIFS, glusterfs, HDFS, etc.
StorageProtocol string `json:"storage_protocol"`
// The total capacity for the back end, in GiBs. A valid value is a string, such as unknown, or an integer.
TotalCapacityGB float64 `json:"-"`
// The specification that filters back ends by whether they do or do not support share snapshots.
SnapshotSupport bool `json:"snapshot_support"`
// The back end replication domain.
ReplicationDomain string `json:"replication_domain"`
// The name of the vendor for the back end.
VendorName string `json:"vendor_name"`
// on the storage driver in use.
ReservedPercentage int64 `json:"reserved_percentage"`
AllocatedCapacityGB float64 `json:"-"`
}
Capabilities represents the information of an individual Pool.
func (*Capabilities) UnmarshalJSON ¶
func (r *Capabilities) UnmarshalJSON(b []byte) error
type ListDetailOpts ¶
type ListDetailOpts struct {
// The pool name for the back end.
ProjectID string `json:"project_id,omitempty"`
// The pool name for the back end.
PoolName string `json:"pool_name"`
// The host name for the back end.
HostName string `json:"host_name"`
// The name of the back end.
BackendName string `json:"backend_name"`
// The capabilities for the storage back end.
Capabilities string `json:"capabilities"`
ShareType string `json:"share_type,omitempty"`
}
ListOpts controls the view of data returned (e.g globally or per project).
func (ListDetailOpts) ToPoolsListQuery ¶
func (opts ListDetailOpts) ToPoolsListQuery() (string, error)
ToPoolsListQuery formats a ListDetailOpts into a query string.
type ListDetailOptsBuilder ¶
ListDetailOptsBuilder allows extensions to add additional parameters to the ListDetail request.
type ListOpts ¶
type ListOpts struct {
// The pool name for the back end.
ProjectID string `json:"project_id,omitempty"`
// The pool name for the back end.
PoolName string `json:"pool_name"`
// The host name for the back end.
HostName string `json:"host_name"`
// The name of the back end.
BackendName string `json:"backend_name"`
// The capabilities for the storage back end.
Capabilities string `json:"capabilities"`
ShareType string `json:"share_type,omitempty"`
}
ListOpts controls the view of data returned (e.g globally or per project).
func (ListOpts) ToPoolsListQuery ¶
ToPoolsListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type Pool ¶
type Pool struct {
// The name of the back end.
Name string `json:"name"`
// The name of the back end.
Backend string `json:"backend"`
// The pool name for the back end.
Pool string `json:"pool"`
// The host name for the back end.
Host string `json:"host"`
// The back end capabilities which include qos, total_capacity_gb, etc.
Capabilities Capabilities `json:"capabilities,omitempty"`
}
Pool represents an individual Pool retrieved from the schedulerstats API.
func ExtractPools ¶
func ExtractPools(p pagination.Page) ([]Pool, error)
ExtractPools takes a List result and extracts the collection of Pools returned by the API.
type PoolPage ¶
type PoolPage struct {
pagination.SinglePageBase
}
PoolPage is a single page of all List results.