Documentation ¶
Index ¶
- Constants
- Variables
- func DrvCfgIsSDCInstalled() bool
- func DrvCfgQueryGUID() (string, error)
- func DrvCfgQueryRescan() (string, error)
- func DrvCfgQuerySystems() (*[]ConfiguredCluster, error)
- func GetLink(links []*types.Link, rel string) (*types.Link, error)
- func GetLinkFromSdc(sdc *types.Sdc, rel string) (*types.Link, error)
- func GetSdcLocalGUID() (string, error)
- func StringPtr(v string) *string
- func TimeSpent(functionName string, startTime time.Time)
- type BlockServiceOperationsMap
- type Client
- func (c *Client) Authenticate(configConnect *ConfigConnect) (Cluster, error)
- func (c *Client) CreateTemplate() *Client
- func (c *Client) CreateVolume(volume *types.VolumeParam, storagePoolName, protectionDomain string) (*types.VolumeResp, error)
- func (c *Client) DeleteTemplate(templateId string) (interface{}, error)
- func (c *Client) FindStoragePool(id, name, href, protectionDomain string) (*types.StoragePool, error)
- func (c *Client) FindSystem(instanceID, name, href string) (*System, error)
- func (c *Client) FindVolumeID(volumename string) (string, error)
- func (c *Client) FromModel(templateParameters template.DefaultTemplate) (interface{}, error)
- func (c *Client) FromString(templateString string) (interface{}, error)
- func (c *Client) GetInstance(systemhref string) ([]*types.System, error)
- func (c *Client) GetStoragePool(storagepoolhref string) ([]*types.StoragePool, error)
- func (c *Client) GetSystems() ([]*types.System, error)
- func (c *Client) GetTemplate(templateName string) (interface{}, error)
- func (c *Client) GetToken() string
- func (c *Client) GetVolume(volumehref, volumeid, ancestorvolumeid, volumename string, getSnapshots bool) ([]*types.Volume, error)
- func (c *Client) SetToken(token string)
- func (c *Client) UpdateTemplate(templateString, templateID string) (interface{}, error)
- type ClientPersistent
- type Cluster
- type ComponentResources
- type ConfigConnect
- type ConfiguredCluster
- type Device
- type FirmwareRepository
- type ParameterHelper
- type ProtectionDomain
- func (pd *ProtectionDomain) CreateSds(name string, ipList []string) (string, error)
- func (pd *ProtectionDomain) CreateStoragePool(name string, mediaType string) (string, error)
- func (pd *ProtectionDomain) DeleteStoragePool(name string) error
- func (pd *ProtectionDomain) FindSds(field, value string) (*types.Sds, error)
- func (pd *ProtectionDomain) FindStoragePool(id, name, href string) (*types.StoragePool, error)
- func (pd *ProtectionDomain) GetSds() ([]types.Sds, error)
- func (pd *ProtectionDomain) GetStoragePool(storagepoolhref string) ([]*types.StoragePool, error)
- type ResourceParameters
- type Sdc
- type SdcMappedVolume
- type Sds
- type StoragePool
- func (sp *StoragePool) AttachDevice(path string, sdsID string) (string, error)
- func (sp *StoragePool) CreateVolume(volume *types.VolumeParam) (*types.VolumeResp, error)
- func (sp *StoragePool) FindDevice(field, value string) (*types.Device, error)
- func (sp *StoragePool) FindVolumeID(volumename string) (string, error)
- func (sp *StoragePool) GetDevice() ([]types.Device, error)
- func (sp *StoragePool) GetStatistics() (*types.Statistics, error)
- func (sp *StoragePool) GetVolume(volumehref, volumeid, ancestorvolumeid, volumename string, getSnapshots bool) ([]*types.Volume, error)
- type System
- func (s *System) ChangeSdcName(idOfSdc, name string) (*Sdc, error)
- func (s *System) CreateProtectionDomain(name string) (string, error)
- func (s *System) CreateSnapshotConsistencyGroup(snapshotVolumesParam *types.SnapshotVolumesParam) (*types.SnapshotVolumesResp, error)
- func (s *System) DeleteProtectionDomain(name string) error
- func (s *System) FindProtectionDomain(id, name, href string) (*types.ProtectionDomain, error)
- func (s *System) FindSdc(field, value string) (*Sdc, error)
- func (s *System) GetProtectionDomain(pdhref string) ([]*types.ProtectionDomain, error)
- func (s *System) GetScsiInitiator() ([]types.ScsiInitiator, error)
- func (s *System) GetSdc() ([]types.Sdc, error)
- func (s *System) GetSdcById(id string) (*Sdc, error)
- func (s *System) GetStatistics() (*types.Statistics, error)
- func (s *System) GetUser() ([]types.User, error)
- type TemplateComponent
- type TemplateComponentGen
- type TemplateParam
- type Volume
- func (v *Volume) GetVTree() (*types.VTree, error)
- func (v *Volume) GetVolumeStatistics() (*types.VolumeStatistics, error)
- func (v *Volume) MapVolumeSdc(mapVolumeSdcParam *types.MapVolumeSdcParam) error
- func (v *Volume) RemoveVolume(removeMode string) error
- func (v *Volume) SetMappedSdcLimits(setMappedSdcLimitsParam *types.SetMappedSdcLimitsParam) error
- func (v *Volume) SetVolumeName(newName string) error
- func (v *Volume) SetVolumeSize(sizeInGB string) error
- func (v *Volume) UnmapVolumeSdc(unmapVolumeSdcParam *types.UnmapVolumeSdcParam) error
Constants ¶
const (
// IOCTLDevice is the default device to send queries to
IOCTLDevice = "/dev/scini"
)
Variables ¶
var ( // SDCDevice is the device used to communicate with the SDC SDCDevice = IOCTLDevice // SCINIMockMode is used for testing upper layer code that attempts to call these methods SCINIMockMode = false )
var ExternalTimeRecorder func(string, time.Duration)
ExternalTimeRecorder is used to track time
var FSDevDirectoryPrefix string = ""
FSDevDirectoryPrefix is for unit testing on Windows - dev is not in the same place
Functions ¶
func DrvCfgIsSDCInstalled ¶
func DrvCfgIsSDCInstalled() bool
DrvCfgIsSDCInstalled will check to see if the SDC kernel module is loaded
func DrvCfgQueryGUID ¶
DrvCfgQueryGUID will return the GUID of the locally installed SDC
func DrvCfgQueryRescan ¶
DrvCfgQueryRescan preforms a rescan
func DrvCfgQuerySystems ¶
func DrvCfgQuerySystems() (*[]ConfiguredCluster, error)
DrvCfgQuerySystems will return the configured MDM endpoints for the locally installed SDC
func GetLinkFromSdc ¶
GetLinkFromSdc returns a link created basis on relation
Types ¶
type BlockServiceOperationsMap ¶
type BlockServiceOperationsMap struct { }
BlockServiceOperationsMap defines struct for BlockServiceOperationsMap
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines struct for Client
func NewClientWithArgs ¶
func NewClientWithArgs( endpoint string, version string, insecure, useCerts bool) (client *Client, err error)
NewClientWithArgs returns a new client
func (*Client) Authenticate ¶
func (c *Client) Authenticate(configConnect *ConfigConnect) (Cluster, error)
Authenticate controls authentication to client
func (*Client) CreateTemplate ¶
func (*Client) CreateVolume ¶
func (c *Client) CreateVolume( volume *types.VolumeParam, storagePoolName, protectionDomain string) (*types.VolumeResp, error)
CreateVolume creates a volume
func (*Client) DeleteTemplate ¶
func (*Client) FindStoragePool ¶
func (c *Client) FindStoragePool( id, name, href, protectionDomain string) (*types.StoragePool, error)
FindStoragePool returns a StoragePool
func (*Client) FindSystem ¶
FindSystem returns a system based on ID or name
func (*Client) FindVolumeID ¶
FindVolumeID returns a VolumeID
func (*Client) FromModel ¶
func (c *Client) FromModel( templateParameters template.DefaultTemplate) (interface{}, error)
CreateTemplate creates a blank template
func (*Client) FromString ¶
func (*Client) GetInstance ¶
GetInstance returns an instance
func (*Client) GetStoragePool ¶
func (c *Client) GetStoragePool( storagepoolhref string) ([]*types.StoragePool, error)
GetStoragePool returns a storagepool
func (*Client) GetSystems ¶
GetSystems returns systems
func (*Client) GetTemplate ¶
func (*Client) GetVolume ¶
func (c *Client) GetVolume( volumehref, volumeid, ancestorvolumeid, volumename string, getSnapshots bool) ([]*types.Volume, error)
GetVolume returns a volume
func (*Client) UpdateTemplate ¶
type ClientPersistent ¶
type ClientPersistent struct {
// contains filtered or unexported fields
}
ClientPersistent defines struct for ClientPersistent
type ComponentResources ¶
type ComponentResources struct { Id *string `json:"id"` Guid string `json:"guid"` DisplayName string `json:"displayName"` Parameters []ResourceParameters `json:"parameters"` }
type ConfigConnect ¶
ConfigConnect defines struct for ConfigConnect
type ConfiguredCluster ¶
type ConfiguredCluster struct { // SystemID is the MDM cluster system ID SystemID string // SdcID is the ID of the SDC as known to the MDM cluster SdcID string }
ConfiguredCluster contains configuration information for one connected system
type FirmwareRepository ¶
type FirmwareRepository struct { Id string `json:"id"` Name *string `json:"name"` SourceLocation *string `json:"sourceLocation"` SourceType *string `json:"sourceType"` DiskLocation *string `json:"diskLocation"` Filename *string `json:"filename"` Md5Hash *string `json:"md5Hash"` Username *string `json:"username"` Password *string `json:"password"` DownloadStatus *string `json:"downloadStatus"` CreatedDate *string `json:"createdDate"` CreatedBy *string `json:"createdBy"` UpdatedDate *string `json:"updatedDate"` UpdatedBy *string `json:"updatedBy"` DefaultCatalog bool `json:"defaultCatalog"` Embedded bool `json:"embedded"` State *string `json:"state"` SoftwareComponents []string `json:"softwareComponents"` SoftwareBundles []string `json:"softwareBundles"` Deployments []string `json:"deployments"` BundleCount int `json:"bundleCount"` ComponentCount int `json:"componentCount"` UserBundleCount int `json:"userBundleCount"` Minimal bool `json:"minimal"` DownloadProgress int `json:"downloadProgress"` ExtractProgress int `json:"extractProgress"` FileSizeInGigabytes *string `json:"fileSizeInGigabytes"` SignedKeySourceLocation *string `json:"signedKeySourceLocation"` Signature *string `json:"signature"` Rcmapproved bool `json:"rcmapproved"` }
firmwareRepository defines struct for firmwareRepository
type ParameterHelper ¶
type ParameterHelper struct { }
type ProtectionDomain ¶
type ProtectionDomain struct { ProtectionDomain *types.ProtectionDomain // contains filtered or unexported fields }
ProtectionDomain defines a struct for ProtectionDomain
func NewProtectionDomain ¶
func NewProtectionDomain(client *Client) *ProtectionDomain
NewProtectionDomain returns a new ProtectionDomain
func NewProtectionDomainEx ¶
func NewProtectionDomainEx(client *Client, pd *types.ProtectionDomain) *ProtectionDomain
NewProtectionDomainEx returns a new ProtectionDomain
func (*ProtectionDomain) CreateSds ¶
func (pd *ProtectionDomain) CreateSds( name string, ipList []string) (string, error)
CreateSds creates a new Sds
func (*ProtectionDomain) CreateStoragePool ¶
func (pd *ProtectionDomain) CreateStoragePool(name string, mediaType string) (string, error)
CreateStoragePool creates a storage pool
func (*ProtectionDomain) DeleteStoragePool ¶
func (pd *ProtectionDomain) DeleteStoragePool(name string) error
DeleteStoragePool will delete a storage pool
func (*ProtectionDomain) FindSds ¶
func (pd *ProtectionDomain) FindSds( field, value string) (*types.Sds, error)
FindSds returns a Sds
func (*ProtectionDomain) FindStoragePool ¶
func (pd *ProtectionDomain) FindStoragePool( id, name, href string) (*types.StoragePool, error)
FindStoragePool returns a storagepool based on id or name
func (*ProtectionDomain) GetSds ¶
func (pd *ProtectionDomain) GetSds() ([]types.Sds, error)
GetSds returns a Sds
func (*ProtectionDomain) GetStoragePool ¶
func (pd *ProtectionDomain) GetStoragePool( storagepoolhref string) ([]*types.StoragePool, error)
GetStoragePool returns a storage pool
type ResourceParameters ¶
type ResourceParameters struct { Guid *string `json:"guid"` Id string `json:"id"` Value string `json:"value"` Type string `json:"type"` DisplayName string `json:"displayName"` Required bool `json:"required"` RequiredAtDeployment bool `json:"requiredAtDeployment"` HideFromTemplate bool `json:"hideFromTemplate"` Min *string `json:"min"` Max *string `json:"max"` DependencyTarget *string `json:"dependencyTarget"` DependencyValue *string `json:"dependencyValue"` Dependencies []string `json:"dependencies"` Networks *string `json:"networks"` NetworkIpAddressList *string `json:"networkIpAddressList"` NetworkConfiguration *string `json:"networkConfiguration"` RaidConfiguration *string `json:"raidConfiguration"` Options []string `json:"options"` ToolTip string `json:"toolTip"` ReadOnly bool `json:"readOnly"` Generated bool `json:"generated"` Group *string `json:"group"` InfoIcon bool `json:"infoIcon"` MaxLength int `json:"maxLength"` Step int `json:"step"` OptionsSortable bool `json:"optionsSortable"` PreservedForDeployment bool `json:"preservedForDeployment"` ScaleIODiskConfiguration *string `json:"scaleIODiskConfiguration"` ProtectionDomainSettings *string `json:"protectionDomainSettings"` FaultSetSettings *string `json:"faultSetSettings"` Attributes interface{} `json:"attributes"` VdsConfiguration *string `json:"vdsConfiguration"` NodeSelection *string `json:"nodeSelection"` }
type Sdc ¶
Sdc defines struct for Sdc
func (*Sdc) FindVolumes ¶
FindVolumes returns volumes
func (*Sdc) GetStatistics ¶
func (sdc *Sdc) GetStatistics() (*types.SdcStatistics, error)
GetStatistics returns a Sdc statistcs
type SdcMappedVolume ¶
SdcMappedVolume defines struct for SdcMappedVolume
func GetLocalVolumeMap ¶
func GetLocalVolumeMap() (mappedVolumes []*SdcMappedVolume, err error)
GetLocalVolumeMap will return all SdcMappedVolume entries
func GetLocalVolumeMapByRegex ¶
func GetLocalVolumeMapByRegex(systemIDRegex string, volumeIDRegex string) (mappedVolumes []*SdcMappedVolume, err error)
GetLocalVolumeMapByRegex will return the SdcMappedVolume entries matching supplied regex values
type StoragePool ¶
type StoragePool struct { StoragePool *types.StoragePool // contains filtered or unexported fields }
StoragePool struct defines struct for StoragePool
func NewStoragePool ¶
func NewStoragePool(client *Client) *StoragePool
NewStoragePool returns a new StoragePool
func NewStoragePoolEx ¶
func NewStoragePoolEx(client *Client, pool *types.StoragePool) *StoragePool
NewStoragePoolEx returns a new StoragePoolEx
func (*StoragePool) AttachDevice ¶
func (sp *StoragePool) AttachDevice( path string, sdsID string) (string, error)
AttachDevice attaches a device
func (*StoragePool) CreateVolume ¶
func (sp *StoragePool) CreateVolume( volume *types.VolumeParam) (*types.VolumeResp, error)
CreateVolume creates a volume
func (*StoragePool) FindDevice ¶
func (sp *StoragePool) FindDevice( field, value string) (*types.Device, error)
FindDevice returns a Device
func (*StoragePool) FindVolumeID ¶
func (sp *StoragePool) FindVolumeID(volumename string) (string, error)
FindVolumeID retruns a volume ID based on name
func (*StoragePool) GetDevice ¶
func (sp *StoragePool) GetDevice() ([]types.Device, error)
GetDevice returns a device
func (*StoragePool) GetStatistics ¶
func (sp *StoragePool) GetStatistics() (*types.Statistics, error)
GetStatistics returns statistics
type System ¶
System defines struct for System
func (*System) ChangeSdcName ¶
ChangeSdcName returns a Sdc after changing its name
func (*System) CreateProtectionDomain ¶
CreateProtectionDomain creates a ProtectionDomain
func (*System) CreateSnapshotConsistencyGroup ¶
func (s *System) CreateSnapshotConsistencyGroup( snapshotVolumesParam *types.SnapshotVolumesParam) (*types.SnapshotVolumesResp, error)
CreateSnapshotConsistencyGroup creates a snapshot consistency group
func (*System) DeleteProtectionDomain ¶
DeleteProtectionDomain will delete a protection domain
func (*System) FindProtectionDomain ¶
func (s *System) FindProtectionDomain( id, name, href string) (*types.ProtectionDomain, error)
FindProtectionDomain returns a ProtectionDomain
func (*System) GetProtectionDomain ¶
func (s *System) GetProtectionDomain( pdhref string) ([]*types.ProtectionDomain, error)
GetProtectionDomain returns a ProtectionDomain
func (*System) GetScsiInitiator ¶
func (s *System) GetScsiInitiator() ([]types.ScsiInitiator, error)
GetScsiInitiator returns a ScsiInitiator
func (*System) GetSdcById ¶
GetSdcById returns a Sdc searched by id
func (*System) GetStatistics ¶
func (s *System) GetStatistics() (*types.Statistics, error)
GetStatistics returns system statistics
type TemplateComponent ¶
type TemplateComponent struct { Id string `json:"id"` ComponentID string `json:"componentID"` Name string `json:"name"` Type string `json:"type"` SubType string `json:"subType"` Resources []ComponentResources `json:"resources"` RefId *string `json:"refId"` Cloned bool `json:"cloned"` ClonedFromId *string `json:"clonedFromId"` ManageFirmware bool `json:"manageFirmware"` Brownfield bool `json:"brownfield"` Instances int `json:"instances"` ClonedFromAsmGuid *string `json:"clonedFromAsmGuid"` Ip *string `json:"ip"` }
TemplateComponent defines struct for TemplateComponent
type TemplateComponentGen ¶
type TemplateComponentGen struct { ID string `json:"id"` ComponentID string `json:"componentID"` Name string `json:"name"` Type string `json:"type"` SubType string `json:"subType"` Resources []struct { GUID interface{} `json:"guid"` ID string `json:"id"` DisplayName string `json:"displayName"` Parameters []struct { GUID interface{} `json:"guid"` ID string `json:"id"` Value string `json:"value"` Type string `json:"type"` DisplayName string `json:"displayName"` Required bool `json:"required"` RequiredAtDeployment bool `json:"requiredAtDeployment"` HideFromTemplate bool `json:"hideFromTemplate"` Min interface{} `json:"min"` Max interface{} `json:"max"` DependencyTarget interface{} `json:"dependencyTarget"` DependencyValue interface{} `json:"dependencyValue"` Dependencies []interface{} `json:"dependencies"` Networks interface{} `json:"networks"` NetworkIPAddressList interface{} `json:"networkIpAddressList"` NetworkConfiguration interface{} `json:"networkConfiguration"` RaidConfiguration interface{} `json:"raidConfiguration"` Options []struct { ID interface{} `json:"id"` Value string `json:"value"` Name string `json:"name"` DependencyTarget interface{} `json:"dependencyTarget"` DependencyValue interface{} `json:"dependencyValue"` Dependencies []interface{} `json:"dependencies"` Attributes struct { } `json:"attributes"` } `json:"options"` ToolTip string `json:"toolTip"` ReadOnly bool `json:"readOnly"` Generated bool `json:"generated"` Group interface{} `json:"group"` InfoIcon bool `json:"infoIcon"` MaxLength int `json:"maxLength"` Step int `json:"step"` OptionsSortable bool `json:"optionsSortable"` PreservedForDeployment bool `json:"preservedForDeployment"` ScaleIODiskConfiguration interface{} `json:"scaleIODiskConfiguration"` ProtectionDomainSettings interface{} `json:"protectionDomainSettings"` FaultSetSettings interface{} `json:"faultSetSettings"` Attributes struct { } `json:"attributes"` VdsConfiguration interface{} `json:"vdsConfiguration"` NodeSelection interface{} `json:"nodeSelection"` } `json:"parameters"` } `json:"resources"` RefID interface{} `json:"refId"` Cloned bool `json:"cloned"` ClonedFromID interface{} `json:"clonedFromId"` ManageFirmware bool `json:"manageFirmware"` Brownfield bool `json:"brownfield"` Instances int `json:"instances"` ClonedFromAsmGUID interface{} `json:"clonedFromAsmGuid"` IP interface{} `json:"ip"` }
type TemplateParam ¶
type TemplateParam struct { TemplateName string `json:"templateName"` TemplateDescription string `json:"templateDescription"` TemplateType string `json:"templateType"` Draft bool `json:"draft"` Components []TemplateComponent `json:"components"` Category *string `json:"category"` AllUsersAllowed bool `json:"allUsersAllowed"` AssignedUsers *string `json:"assignedUsers"` ManageFirmware bool `json:"manageFirmware"` UseDefaultCatalog bool `json:"useDefaultCatalog"` FirmwareRepository FirmwareRepository `json:"firmwareRepository"` LicenseRepository *string `json:"licenseRepository"` Configuration *string `json:"configuration"` ServerCount *string `json:"serverCount"` StorageCount *string `json:"storageCount"` ClusterCount *string `json:"clusterCount"` ServiceCount *string `json:"serviceCount"` SwitchCount *string `json:"switchCount"` VmCount *string `json:"vmCount"` SdnasCount *string `json:"sdnasCount"` BrownfieldTemplateType string `json:"brownfieldTemplateType"` Networks *string `json:"networks"` BlockServiceOperationsMap BlockServiceOperationsMap `json:"blockServiceOperationsMap"` }
TemplateParam defines struct for Payload send to create Template
type Volume ¶
Volume defines struct for Volume
func (*Volume) GetVolumeStatistics ¶
func (v *Volume) GetVolumeStatistics() (*types.VolumeStatistics, error)
GetVolumeStatistics returns a volume's statistics
func (*Volume) MapVolumeSdc ¶
func (v *Volume) MapVolumeSdc( mapVolumeSdcParam *types.MapVolumeSdcParam) error
MapVolumeSdc maps a volume to Sdc
func (*Volume) RemoveVolume ¶
RemoveVolume removes a volume
func (*Volume) SetMappedSdcLimits ¶
func (v *Volume) SetMappedSdcLimits( setMappedSdcLimitsParam *types.SetMappedSdcLimitsParam) error
SetMappedSdcLimits sets Sdc mapped limits
func (*Volume) SetVolumeName ¶
SetVolumeName sets a volume's name
func (*Volume) SetVolumeSize ¶
SetVolumeSize sets a volume's size
func (*Volume) UnmapVolumeSdc ¶
func (v *Volume) UnmapVolumeSdc( unmapVolumeSdcParam *types.UnmapVolumeSdcParam) error
UnmapVolumeSdc unmaps a volume from Sdc