client

package
v0.56.4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: GPL-3.0 Imports: 10 Imported by: 1

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 added in v0.12.0

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 added in v0.12.0

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

APIVersion returns FxFlex Gateway API version.

func (*Client) Instances added in v0.12.0

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

Instances returns all instances.

func (Client) LoggedIn added in v0.12.0

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 added in v0.12.0

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

SelectedStatistics returns selected statistics.

type DeviceStatistic added in v0.12.0

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 added in v0.12.0

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 added in v0.12.0

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

Instances represents '/api/instances' response.

type MockScaleIOAPIServer added in v0.12.0

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

MockScaleIOAPIServer represents VxFlex OS Gateway.

func (MockScaleIOAPIServer) ServeHTTP added in v0.12.0

type ProtectionDomainStatistics added in v0.12.0

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 added in v0.12.0

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 added in v0.12.0

type Sdc struct {
	ID                 string
	SdcIp              string
	MdmConnectionState string
}

Sdc represents ScaleIO Data Client.

type SdcStatistics added in v0.12.0

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 added in v0.12.0

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 added in v0.12.0

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 added in v0.12.0

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

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

type SelectedStatisticsQuery added in v0.12.0

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

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

type StoragePool added in v0.12.0

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

StoragePool represents ScaleIO Storage Pool.

type StoragePoolStatistics added in v0.12.0

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 added in v0.12.0

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 added in v0.12.0

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 added in v0.12.0

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