Documentation
¶
Index ¶
- Constants
- Variables
- func CreationTimeFromString(creationTime string) (*timestamp.Timestamp, error)
- func GetAddress(addr string) string
- func GetAddressAndProtocol(addr string, protocol string) (string, string)
- func Login(ctx context.Context, config *Config) (*client.APIClient, error)
- type Collector
- type Config
- type Host
- type HostGroup
- type Initiator
- type PoolType
- type PortType
- type ResponseStatus
- type SnapshotObject
- type SystemInfo
- type SystemsData
- type VolumeObject
Constants ¶
View Source
const ( DefaultSpecFile = "generated-mc-openapi.yaml" // Default OpenAPI specification file DefaultProtocol = "https" // Default MC API Protocol )
View Source
const ( APICallMetric = "exosx_api_appliance_api_call" APICallHelp = "How many API calls have been executed" APICallDurationMetric = "exosx_api_appliance_api_call_duration" APICallDurationHelp = "The total duration of API calls" )
View Source
const ( InvalidSessionKey = 2 LUNOverlapErrorCode = -3177 SnapshotNotFoundErrorCode = -10050 BadInputParam = -10058 InvalidArgumentErrorCode = -10058 HostMapDoesNotExistsErrorCode = -10074 VolumeNotFoundErrorCode = -10075 UserNotRecognized = -10027 VolumeHasSnapshot = -10183 SnapshotAlreadyExists = -10186 InitiatorNicknameOrIdentifierNotFound = -10386 UnmapFailedErrorCode = -10509 )
Exos X Storage API Error Codes
Variables ¶
View Source
var RetryableErrorCodes = []int{
2193,
2194,
2195,
3046,
3047,
3060,
3108,
3115,
3122,
1019,
1043,
1046,
1048,
1069,
}
Functions ¶
func CreationTimeFromString ¶
func GetAddress ¶
GetAddress: Return ip address, handles the case where addr contains protocol
func GetAddressAndProtocol ¶
GetAddressAndProtocol: Return ip address and protocol, handling concatenated string
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func NewCollector ¶
func NewCollector() *Collector
func (*Collector) Collect ¶
func (collector *Collector) Collect(ch chan<- prometheus.Metric)
func (*Collector) Describe ¶
func (collector *Collector) Describe(ch chan<- *prometheus.Desc)
func (*Collector) TrackAPICall ¶
type Config ¶
type Config struct { Verbosity string `json:"verbosity"` ConfigurationFile string `json:"configuration"` SpecificationFile string `json:"specification"` MCIpAddress string `json:"mc-ip"` MCProtocol string `json:"mc-protocol"` // User can specify http, https MCUsername string `json:"mc-username"` MCPassword string `json:"mc-password"` MCDescription string `json:"mc-description"` }
func InitConfig ¶
Init: initialize the configuration data using command line args, ENV, or a file
type PortType ¶
type PortType struct { Label string Type string TargetId string IPAddress string Present string Compliance string }
PortType: Storage system port attributes
type ResponseStatus ¶
type ResponseStatus struct { ResponseType string ResponseTypeNumeric int Response string ReturnCode int Time time.Time }
ResponseStatus: Final representation of the "status" object in every API response
type SnapshotObject ¶
type SnapshotObject struct { ObjectName string // snapshot CreationDateTime string // creation-date-time, created using ptypes.TimestampProto CreationDateTimeNumeric int64 // creation-date-time-numeric CreationTime *timestamp.Timestamp // Creation timestamp MasterVolumeName string // master-volume-name,omitempty Name string // name StoragePoolName string // Disk group used to create the snapshot TotalSize string // The total size (total-size) formatted using the session settings for base, precision, and units TotalSizeNumeric int64 // The total size (total-size-numeric) formatted using the session settings for base, precision, and units( In numeric form ) VolumeParent string // The name of volume used to create the snapshot }
SnapshotObject: Schema data for each snapshot object returned from 'show snapshots'
type SystemInfo ¶
type SystemInfo struct { IPAddress string Protocol string URL string Controller string Platform string SerialNumber string Status string MCCodeVersion string MCBaseVersion string Pools []PoolType Ports []PortType //HostGroups *client.HostGroupObject HostGroups map[string]*HostGroup InitiatorMap map[string]*Host }
System: Information stored for a single storage array controller
type SystemsData ¶
type SystemsData struct {
Systems []*SystemInfo
}
SystemsData: Information stored for multiple storage array controllers
type VolumeObject ¶
type VolumeObject struct { ObjectName string // volume Blocks int64 // The size in blocks, blocks BlockSize int64 // Block Size Health string SizeNumeric int64 // size-numeric StoragePoolName string // The disk group used to create this volume. StorageType string TierAffinity string // The tier affinity used to create this volume. TotalSize string VolumeName string // User-defined name for the volume, volume-name VolumeType string Wwn string // World Wide Name }
VolumeObject: Schema data for each volume object returned from 'show volumes'
Click to show internal directories.
Click to hide internal directories.