client

package
v0.0.0-...-6ade924 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bwc

type Bwc struct {
	NumOccured      int64
	NumSeconds      int64
	TotalWeightInKb int64
}

Bwc Bwc.

type CapacityStatistics

type CapacityStatistics struct {
	CapacityAvailableForVolumeAllocationInKb int64
	MaxCapacityInKb                          int64
	CapacityLimitInKb                        int64
	ProtectedCapacityInKb                    int64
	DegradedFailedCapacityInKb               int64
	DegradedHealthyCapacityInKb              int64
	SpareCapacityInKb                        int64
	FailedCapacityInKb                       int64
	UnreachableUnusedCapacityInKb            int64
	InMaintenanceCapacityInKb                int64
	ThinCapacityAllocatedInKb                int64
	ThinCapacityInUseInKb                    int64
	ThickCapacityInUseInKb                   int64
	SnapCapacityInUseOccupiedInKb            int64
	CapacityInUseInKb                        int64
}

CapacityStatistics is System/StoragePool capacity statistics.

type Client

type Client struct {
	Request web.Request
	// contains filtered or unexported fields
}

Client represents ScaleIO client.

func New

func New(client web.Client, request web.Request) (*Client, error)

New creates new ScaleIO client.

func (*Client) APIVersion

func (c *Client) APIVersion() (Version, error)

APIVersion returns FxFlex Gateway API version.

func (*Client) Instances

func (c *Client) Instances() (Instances, error)

Instances returns all instances.

func (Client) LoggedIn

func (c Client) LoggedIn() bool

LoggedIn reports whether the client is logged in.

func (*Client) Login

func (c *Client) Login() error

Login connects to FxFlex Gateway to get the token that is used for later authentication for other requests.

func (*Client) Logout

func (c *Client) Logout() error

Logout sends logout request and unsets token.

func (*Client) SelectedStatistics

func (c *Client) SelectedStatistics(query SelectedStatisticsQuery) (SelectedStatistics, error)

SelectedStatistics returns selected statistics.

type DeviceStatistic

type DeviceStatistic struct {
}

Those commented out structure fields are not deleted on purpose. We need them to see what other metrics can be collected.

type FaultSetStatistics

type FaultSetStatistics struct {
}

Those commented out structure fields are not deleted on purpose. We need them to see what other metrics can be collected.

type Instances

type Instances struct {
	StoragePoolList []StoragePool
	SdcList         []Sdc
}

Instances represents '/api/instances' response.

type MockScaleIOAPIServer

type MockScaleIOAPIServer struct {
	User       string
	Password   string
	Token      string
	Version    string
	Instances  Instances
	Statistics SelectedStatistics
}

MockScaleIOAPIServer represents VxFlex OS Gateway.

func (MockScaleIOAPIServer) ServeHTTP

type ProtectionDomainStatistics

type ProtectionDomainStatistics struct {
}

Those commented out structure fields are not deleted on purpose. We need them to see what other metrics can be collected.

type RFCacheDeviceStatistics

type RFCacheDeviceStatistics struct {
}

Those commented out structure fields are not deleted on purpose. We need them to see what other metrics can be collected.

type Sdc

type Sdc struct {
	ID                 string
	SdcIp              string
	MdmConnectionState string
}

Sdc represents ScaleIO Data Client.

type SdcStatistics

type SdcStatistics struct {
	NumOfMappedVolumes int64
	UserDataReadBwc    Bwc
	UserDataWriteBwc   Bwc
}

Those commented out structure fields are not deleted on purpose. We need them to see what other metrics can be collected.

type SdsStatistics

type SdsStatistics struct {
}

Those commented out structure fields are not deleted on purpose. We need them to see what other metrics can be collected.

type SelectedObject

type SelectedObject struct {
	Type string `json:"type"` // object type (System, ProtectionDomain, Sds, StoragePool, Device, Volume, VTree, Sdc, FaultSet, RfcacheDevice).

	// the following parameters are not relevant to the System type and can be omitted:
	IDs    []string `json:"ids,omitempty"`    // list of objects ids
	AllIDs allIds   `json:"allIds,omitempty"` // all available objects

	Properties []string `json:"properties"` // list of properties to fetch
}

SelectedObject represents '/api/instances/querySelectedStatistics' query object.

type SelectedStatistics

type SelectedStatistics struct {
	System      SystemStatistics
	Sdc         map[string]SdcStatistics
	StoragePool map[string]StoragePoolStatistics
}

SelectedStatistics represents '/api/instances/querySelectedStatistics' response.

type SelectedStatisticsQuery

type SelectedStatisticsQuery struct {
	List []SelectedObject `json:"selectedStatisticsList"`
}

SelectedStatisticsQuery represents '/api/instances/querySelectedStatistics' query.

type StoragePool

type StoragePool struct {
	ID                             string
	Name                           string
	SparePercentage                int64
	CapacityAlertCriticalThreshold int64
	CapacityAlertHighThreshold     int64
}

StoragePool represents ScaleIO Storage Pool.

type StoragePoolStatistics

type StoragePoolStatistics struct {
	CapacityStatistics

	NumOfDevices   int64
	NumOfVolumes   int64
	NumOfVtrees    int64
	NumOfSnapshots int64
}

Those commented out structure fields are not deleted on purpose. We need them to see what other metrics can be collected.

type SystemStatistics

type SystemStatistics struct {
	CapacityStatistics

	NumOfDevices            int64
	NumOfFaultSets          int64
	NumOfProtectionDomains  int64
	NumOfRfcacheDevices     int64
	NumOfSdc                int64
	NumOfSds                int64
	NumOfSnapshots          int64
	NumOfStoragePools       int64
	NumOfVolumes            int64
	NumOfVtrees             int64
	NumOfThickBaseVolumes   int64
	NumOfThinBaseVolumes    int64
	NumOfMappedToAllVolumes int64
	NumOfUnmappedVolumes    int64

	RebalanceReadBwc             Bwc
	RebalanceWriteBwc            Bwc
	PendingRebalanceCapacityInKb int64

	PendingNormRebuildCapacityInKb int64
	PendingBckRebuildCapacityInKb  int64
	PendingFwdRebuildCapacityInKb  int64
	NormRebuildReadBwc             Bwc // TODO: ???
	NormRebuildWriteBwc            Bwc // TODO: ???
	BckRebuildReadBwc              Bwc // failed node/disk is back alive
	BckRebuildWriteBwc             Bwc // failed node/disk is back alive
	FwdRebuildReadBwc              Bwc // node/disk fails
	FwdRebuildWriteBwc             Bwc // node/disk fails

	PrimaryReadBwc    Bwc // Backend (SDSs + Devices) Primary - Mater MDM
	PrimaryWriteBwc   Bwc // Backend (SDSs + Devices) Primary - Mater MDM
	SecondaryReadBwc  Bwc // Backend (SDSs + Devices, 2nd) Secondary - Slave MDM
	SecondaryWriteBwc Bwc // Backend (SDSs + Devices, 2nd) Secondary - Slave MDM
	UserDataReadBwc   Bwc // Frontend (Volumes + SDCs)
	UserDataWriteBwc  Bwc // Frontend (Volumes + SDCs)
	TotalReadBwc      Bwc // *ReadBwc
	TotalWriteBwc     Bwc // *WriteBwc

}

Those commented out structure fields are not deleted on purpose. We need them to see what other metrics can be collected.

type VTreeStatistics

type VTreeStatistics struct {
}

Those commented out structure fields are not deleted on purpose. We need them to see what other metrics can be collected.

type Version

type Version struct {
	Major int64
	Minor int64
}

Version represents API version.

type VolumeStatistics

type VolumeStatistics struct {
}

Those commented out structure fields are not deleted on purpose. We need them to see what other metrics can be collected.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL