Versions in this module Expand all Collapse all v0 v0.4.0 May 15, 2019 Changes in this version + type EthernetPort struct + Health *Health + Id string + IsLinkUp bool + Name string + func (r *EthernetPort) Refresh() error + func (r *EthernetPort) Repr() *idRepresent + type EthernetPortOperatorGen interface + FillEthernetPorts func(respEntries []*instanceResp) ([]*EthernetPort, error) + FilterEthernetPorts func(filter *filter) ([]*EthernetPort, error) + GetEthernetPortById func(id string) (*EthernetPort, error) + GetEthernetPortByName func(name string) (*EthernetPort, error) + GetEthernetPorts func() ([]*EthernetPort, error) + NewEthernetPortById func(id string) *EthernetPort + NewEthernetPortByName func(name string) *EthernetPort + type IpProtocolVersionEnum int + const IpProtocolVersionIPv4 + const IpProtocolVersionIPv6 + type IscsiNode struct + Alias string + EthernetPort EthernetPort + Id string + Name string + func (r *IscsiNode) Refresh() error + func (r *IscsiNode) Repr() *idRepresent + type IscsiNodeOperatorGen interface + FillIscsiNodes func(respEntries []*instanceResp) ([]*IscsiNode, error) + FilterIscsiNodes func(filter *filter) ([]*IscsiNode, error) + GetIscsiNodeById func(id string) (*IscsiNode, error) + GetIscsiNodeByName func(name string) (*IscsiNode, error) + GetIscsiNodes func() ([]*IscsiNode, error) + NewIscsiNodeById func(id string) *IscsiNode + NewIscsiNodeByName func(name string) *IscsiNode + type IscsiPortal struct + EthernetPort *EthernetPort + Gateway string + Id string + IpAddress string + IpProtocolVersion IpProtocolVersionEnum + IscsiNode *IscsiNode + Netmask string + V6PrefixLength uint32 + VlanId uint16 + func (r *IscsiPortal) Refresh() error + func (r *IscsiPortal) Repr() *idRepresent + type IscsiPortalOperatorGen interface + FillIscsiPortals func(respEntries []*instanceResp) ([]*IscsiPortal, error) + FilterIscsiPortals func(filter *filter) ([]*IscsiPortal, error) + GetIscsiPortalById func(id string) (*IscsiPortal, error) + GetIscsiPortals func() ([]*IscsiPortal, error) + NewIscsiPortalById func(id string) *IscsiPortal type Unity + func (u *Unity) FillEthernetPorts(respEntries []*instanceResp) ([]*EthernetPort, error) + func (u *Unity) FillIscsiNodes(respEntries []*instanceResp) ([]*IscsiNode, error) + func (u *Unity) FillIscsiPortals(respEntries []*instanceResp) ([]*IscsiPortal, error) + func (u *Unity) FilterEthernetPorts(filter *filter) ([]*EthernetPort, error) + func (u *Unity) FilterIscsiNodes(filter *filter) ([]*IscsiNode, error) + func (u *Unity) FilterIscsiPortals(filter *filter) ([]*IscsiPortal, error) + func (u *Unity) GetEthernetPortById(id string) (*EthernetPort, error) + func (u *Unity) GetEthernetPortByName(name string) (*EthernetPort, error) + func (u *Unity) GetEthernetPorts() ([]*EthernetPort, error) + func (u *Unity) GetIscsiNodeById(id string) (*IscsiNode, error) + func (u *Unity) GetIscsiNodeByName(name string) (*IscsiNode, error) + func (u *Unity) GetIscsiNodes() ([]*IscsiNode, error) + func (u *Unity) GetIscsiPortalById(id string) (*IscsiPortal, error) + func (u *Unity) GetIscsiPortals() ([]*IscsiPortal, error) + func (u *Unity) NewEthernetPortById(id string) *EthernetPort + func (u *Unity) NewEthernetPortByName(name string) *EthernetPort + func (u *Unity) NewIscsiNodeById(id string) *IscsiNode + func (u *Unity) NewIscsiNodeByName(name string) *IscsiNode + func (u *Unity) NewIscsiPortalById(id string) *IscsiPortal v0.3.0 May 13, 2019 Changes in this version + type Snap struct + CreationTime string + CreatorType SnapCreatorTypeEnum + Description string + ExpirationTime string + HostAccess []*SnapHostAccess + Id string + IsModifiable bool + IsModified bool + IsReadOnly bool + IsSystemSnap bool + Lun *Lun + Name string + Size uint64 + State SnapStateEnum + StorageResource *StorageResource + func (r *Snap) Delete() error + func (r *Snap) Refresh() error + func (r *Snap) Repr() *idRepresent + func (s *Snap) AttachToHost(host *Host, access SnapAccessLevelEnum) error + func (s *Snap) Copy(copyName string) (*Snap, error) + func (s *Snap) Create(sr *StorageResource) error + func (s *Snap) DetachFromHost() error + type SnapAccessLevelEnum int + const SnapAccessLevelMixed + const SnapAccessLevelReadOnly + const SnapAccessLevelReadOnlyPartial + const SnapAccessLevelReadWrite + const SnapAccessLevelReadWritePartial + type SnapCreatorTypeEnum int + const SnapCreatorTypeAppSync + const SnapCreatorTypeExternal_NDMP + const SnapCreatorTypeExternal_Replication_Manager + const SnapCreatorTypeExternal_Restore + const SnapCreatorTypeExternal_VSS + const SnapCreatorTypeNone + const SnapCreatorTypeReplication + const SnapCreatorTypeScheduled + const SnapCreatorTypeSnap_CLI + const SnapCreatorTypeUser_Custom + const SnapCreatorTypeUser_Default + type SnapHostAccess struct + AccessMask SnapAccessLevelEnum + Host *Host + type SnapOperatorGen interface + FillSnaps func(respEntries []*instanceResp) ([]*Snap, error) + FilterSnaps func(filter *filter) ([]*Snap, error) + GetSnapById func(id string) (*Snap, error) + GetSnapByName func(name string) (*Snap, error) + GetSnaps func() ([]*Snap, error) + NewSnapById func(id string) *Snap + NewSnapByName func(name string) *Snap + type SnapStateEnum int + const SnapStateDestroying + const SnapStateFaulted + const SnapStateInitializing + const SnapStateInvalid + const SnapStateOffline + const SnapStateReady type Unity + func (u *Unity) CreateOnType(typeName string, body map[string]interface{}, resp interface{}) error + func (u *Unity) FillSnaps(respEntries []*instanceResp) ([]*Snap, error) + func (u *Unity) FilterSnaps(filter *filter) ([]*Snap, error) + func (u *Unity) GetSnapById(id string) (*Snap, error) + func (u *Unity) GetSnapByName(name string) (*Snap, error) + func (u *Unity) GetSnaps() ([]*Snap, error) + func (u *Unity) NewSnapById(id string) *Snap + func (u *Unity) NewSnapByName(name string) *Snap type UnityConnector + CreateOnType func(typeName string, body map[string]interface{}, resp interface{}) error v0.2.0 Apr 29, 2019 Changes in this version + var ErrUnableParseRespToError = errors.New("unable parse response body to unity error") + func GetUnityErrorStatusCode(err error) int + func IsUnityError(err error) bool + func IsUnityLunNameExistError(err error) bool + func IsUnityResourceNotFoundError(err error) bool + func NewFilter(f string) *filter + func NewFilterOn(typeName string) filterOn + func NewFilterf(format string, args ...interface{}) *filter + func NewRestClientOptions(insecure, traceHttp bool) *restClientOptions + func ParseUnityError(reader io.Reader) (error, error) + type BlockHostAccessEnum int + const BlockHostAccessMixed + const BlockHostAccessOff + const BlockHostAccessOn + type FSSupportedProtocolEnum int + const FSSupportedProtocolCIFS + const FSSupportedProtocolMultiprotocol + const FSSupportedProtocolNFS + type Filesystem struct + Description string + Health *Health + Id string + Name string + StorageResource *StorageResource + func (fs *Filesystem) ExportNfsShare(name string, opts ...Option) (*NfsShare, error) + func (r *Filesystem) Delete() error + func (r *Filesystem) Refresh() error + func (r *Filesystem) Repr() *idRepresent + type FilesystemOperatorGen interface + FillFilesystems func(respEntries []*instanceResp) ([]*Filesystem, error) + FilterFilesystems func(filter *filter) ([]*Filesystem, error) + GetFilesystemById func(id string) (*Filesystem, error) + GetFilesystemByName func(name string) (*Filesystem, error) + GetFilesystems func() ([]*Filesystem, error) + NewFilesystemById func(id string) *Filesystem + NewFilesystemByName func(name string) *Filesystem type Host + Id string + func (h *Host) Detach(lun *Lun) error + func (r *Host) Refresh() error + func (r *Host) Repr() *idRepresent type HostLUN + Id string + Lun *Lun + func (r *HostLUN) Refresh() error + func (r *HostLUN) Repr() *idRepresent type HostLUNAccessEnum + const HostLUNAccessProductionOff + const HostLUNAccessProductionOn + type HostLUNOperator interface + FilterHostLunByHostAndLun func(hostId, lunId string) (*HostLUN, error) + type HostLUNOperatorGen interface + FillHostLUNs func(respEntries []*instanceResp) ([]*HostLUN, error) + FilterHostLUNs func(filter *filter) ([]*HostLUN, error) + GetHostLUNById func(id string) (*HostLUN, error) + GetHostLUNs func() ([]*HostLUN, error) + NewHostLUNById func(id string) *HostLUN + type HostLunTypeEnum int + const HostLunTypeLUN + const HostLunTypeLUN_Snap + const HostLunTypeUnknown + type HostOperatorGen interface + FillHosts func(respEntries []*instanceResp) ([]*Host, error) + FilterHosts func(filter *filter) ([]*Host, error) + GetHostById func(id string) (*Host, error) + GetHostByName func(name string) (*Host, error) + GetHosts func() ([]*Host, error) + NewHostById func(id string) *Host + NewHostByName func(name string) *Host + type Lun struct + Description string + Health *Health + HostAccess []*BlockHostAccess + Id string + IsThinEnabled bool + MetadataSize uint64 + MetadataSizeAllocated uint64 + Name string + Pool *Pool + SizeAllocated uint64 + SizeTotal uint64 + SizeUsed uint64 + SnapCount uint32 + SnapWwn string + SnapsSize uint64 + SnapsSizeAllocated uint64 + StorageResource *StorageResource + Wwn string + func (r *Lun) Delete() error + func (r *Lun) Refresh() error + func (r *Lun) Repr() *idRepresent + type LunOperatorGen interface + FillLuns func(respEntries []*instanceResp) ([]*Lun, error) + FilterLuns func(filter *filter) ([]*Lun, error) + GetLunById func(id string) (*Lun, error) + GetLunByName func(name string) (*Lun, error) + GetLuns func() ([]*Lun, error) + NewLunById func(id string) *Lun + NewLunByName func(name string) *Lun + type NFSShareDefaultAccessEnum int + const NFSShareDefaultAccessNoAccess + const NFSShareDefaultAccessReadOnly + const NFSShareDefaultAccessReadWrite + const NFSShareDefaultAccessRoRoot + const NFSShareDefaultAccessRoot + type NasServer struct + Health *Health + Id string + Name string + func (r *NasServer) Refresh() error + func (r *NasServer) Repr() *idRepresent + type NasServerOperatorGen interface + FillNasServers func(respEntries []*instanceResp) ([]*NasServer, error) + FilterNasServers func(filter *filter) ([]*NasServer, error) + GetNasServerById func(id string) (*NasServer, error) + GetNasServerByName func(name string) (*NasServer, error) + GetNasServers func() ([]*NasServer, error) + NewNasServerById func(id string) *NasServer + NewNasServerByName func(name string) *NasServer + type NfsShare struct + Description string + ExportPaths []string + Filesystem *Filesystem + Id string + Name string + func (r *NfsShare) Delete() error + func (r *NfsShare) Refresh() error + func (r *NfsShare) Repr() *idRepresent + type NfsShareOperatorGen interface + FillNfsShares func(respEntries []*instanceResp) ([]*NfsShare, error) + FilterNfsShares func(filter *filter) ([]*NfsShare, error) + GetNfsShareById func(id string) (*NfsShare, error) + GetNfsShareByName func(name string) (*NfsShare, error) + GetNfsShares func() ([]*NfsShare, error) + NewNfsShareById func(id string) *NfsShare + NewNfsShareByName func(name string) *NfsShare + type Option func(*Options) + func DefaultAccessOpt(da NFSShareDefaultAccessEnum) Option + func HostAccessOpt(host *Host, accessMask HostLUNAccessEnum) Option + func NameOpt(name string) Option + func SizeGBOpt(sizeGB uint64) Option + func SupportedProtocolsOpt(protocol FSSupportedProtocolEnum) Option + type Options map[string]interface + func (o *Options) PopDefaultAccess() interface{} + func (o *Options) PopHostAccess() interface{} + func (o *Options) PopName() interface{} + func (o *Options) PopSize() interface{} + func (o *Options) PopSupportedProtocols() interface{} + func (o *Options) PushDefaultAccess(da NFSShareDefaultAccessEnum) + func (o *Options) PushHostAccess(host *Host, accessMask HostLUNAccessEnum) + func (o *Options) PushName(name string) + func (o *Options) PushSize(sizeBytes uint64) + func (o *Options) PushSupportedProtocols(protocol FSSupportedProtocolEnum) + func (o *Options) WarnNotUsedOptions() + func NewOptions(opts ...Option) *Options type Pool + Health *Health + Id string + func (p *Pool) CreateFilesystem(nasServer *NasServer, name string, sizeGB uint64, opts ...Option) (*Filesystem, error) + func (p *Pool) CreateLun(name string, sizeGB uint64, opts ...Option) (*Lun, error) + func (p *Pool) CreateNfsShare(nasServer *NasServer, name string, sizeGB uint64, opts ...Option) (*NfsShare, error) + func (r *Pool) Refresh() error + func (r *Pool) Repr() *idRepresent + type PoolOperatorGen interface + FillPools func(respEntries []*instanceResp) ([]*Pool, error) + FilterPools func(filter *filter) ([]*Pool, error) + GetPoolById func(id string) (*Pool, error) + GetPoolByName func(name string) (*Pool, error) + GetPools func() ([]*Pool, error) + NewPoolById func(id string) *Pool + NewPoolByName func(name string) *Pool + type Resource struct + Unity UnityConnector type StorageResource + Description string + Filesystem *Filesystem + Health *Health + Id string + Name string + func (r *StorageResource) Refresh() error + func (r *StorageResource) Repr() *idRepresent + type StorageResourceOperatorGen interface + FillStorageResources func(respEntries []*instanceResp) ([]*StorageResource, error) + FilterStorageResources func(filter *filter) ([]*StorageResource, error) + GetStorageResourceById func(id string) (*StorageResource, error) + GetStorageResourceByName func(name string) (*StorageResource, error) + GetStorageResources func() ([]*StorageResource, error) + NewStorageResourceById func(id string) *StorageResource + NewStorageResourceByName func(name string) *StorageResource type Unity + func (u *Unity) DeleteInstance(resType, id string) error + func (u *Unity) FillFilesystems(respEntries []*instanceResp) ([]*Filesystem, error) + func (u *Unity) FillHostLUNs(respEntries []*instanceResp) ([]*HostLUN, error) + func (u *Unity) FillHosts(respEntries []*instanceResp) ([]*Host, error) + func (u *Unity) FillLuns(respEntries []*instanceResp) ([]*Lun, error) + func (u *Unity) FillNasServers(respEntries []*instanceResp) ([]*NasServer, error) + func (u *Unity) FillNfsShares(respEntries []*instanceResp) ([]*NfsShare, error) + func (u *Unity) FillPools(respEntries []*instanceResp) ([]*Pool, error) + func (u *Unity) FillStorageResources(respEntries []*instanceResp) ([]*StorageResource, error) + func (u *Unity) FilterFilesystems(filter *filter) ([]*Filesystem, error) + func (u *Unity) FilterHostLUNs(filter *filter) ([]*HostLUN, error) + func (u *Unity) FilterHostLunByHostAndLun(hostId, lunId string) (*HostLUN, error) + func (u *Unity) FilterHosts(filter *filter) ([]*Host, error) + func (u *Unity) FilterLuns(filter *filter) ([]*Lun, error) + func (u *Unity) FilterNasServers(filter *filter) ([]*NasServer, error) + func (u *Unity) FilterNfsShares(filter *filter) ([]*NfsShare, error) + func (u *Unity) FilterPools(filter *filter) ([]*Pool, error) + func (u *Unity) FilterStorageResources(filter *filter) ([]*StorageResource, error) + func (u *Unity) GetCollection(resType, fields string, filter *filter) ([]*instanceResp, error) + func (u *Unity) GetFilesystemById(id string) (*Filesystem, error) + func (u *Unity) GetFilesystemByName(name string) (*Filesystem, error) + func (u *Unity) GetFilesystems() ([]*Filesystem, error) + func (u *Unity) GetHostById(id string) (*Host, error) + func (u *Unity) GetHostByName(name string) (*Host, error) + func (u *Unity) GetHostLUNById(id string) (*HostLUN, error) + func (u *Unity) GetHostLUNs() ([]*HostLUN, error) + func (u *Unity) GetInstanceById(resType, id, fields string, instance interface{}) error + func (u *Unity) GetInstanceByName(resType, name, fields string, instance interface{}) error + func (u *Unity) GetLunById(id string) (*Lun, error) + func (u *Unity) GetLunByName(name string) (*Lun, error) + func (u *Unity) GetLuns() ([]*Lun, error) + func (u *Unity) GetNasServerById(id string) (*NasServer, error) + func (u *Unity) GetNasServerByName(name string) (*NasServer, error) + func (u *Unity) GetNasServers() ([]*NasServer, error) + func (u *Unity) GetNfsShareById(id string) (*NfsShare, error) + func (u *Unity) GetNfsShareByName(name string) (*NfsShare, error) + func (u *Unity) GetNfsShares() ([]*NfsShare, error) + func (u *Unity) GetPoolById(id string) (*Pool, error) + func (u *Unity) GetPoolByName(name string) (*Pool, error) + func (u *Unity) GetStorageResourceById(id string) (*StorageResource, error) + func (u *Unity) GetStorageResourceByName(name string) (*StorageResource, error) + func (u *Unity) GetStorageResources() ([]*StorageResource, error) + func (u *Unity) NewFilesystemById(id string) *Filesystem + func (u *Unity) NewFilesystemByName(name string) *Filesystem + func (u *Unity) NewHostById(id string) *Host + func (u *Unity) NewHostByName(name string) *Host + func (u *Unity) NewHostLUNById(id string) *HostLUN + func (u *Unity) NewLunById(id string) *Lun + func (u *Unity) NewLunByName(name string) *Lun + func (u *Unity) NewNasServerById(id string) *NasServer + func (u *Unity) NewNasServerByName(name string) *NasServer + func (u *Unity) NewNfsShareById(id string) *NfsShare + func (u *Unity) NewNfsShareByName(name string) *NfsShare + func (u *Unity) NewPoolById(id string) *Pool + func (u *Unity) NewPoolByName(name string) *Pool + func (u *Unity) NewStorageResourceById(id string) *StorageResource + func (u *Unity) NewStorageResourceByName(name string) *StorageResource + func (u *Unity) PostOnInstance(typeName, resId, action string, body map[string]interface{}) error + func (u *Unity) PostOnType(typeName, action string, body map[string]interface{}) (string, error) + type UnityConnector interface + DeleteInstance func(resType, id string) error + GetCollection func(resType, fields string, filter *filter) ([]*instanceResp, error) + GetInstanceById func(resType, id, fields string, instance interface{}) error + GetInstanceByName func(resType, name, fields string, instance interface{}) error + PostOnInstance func(typeName, resId, action string, body map[string]interface{}) error + PostOnType func(typeName, action string, body map[string]interface{}) (string, error) v0.1.0 Jul 6, 2018 Changes in this version + const HeaderKeyContentType + const HeaderValueContentTypeBinaryOctetStream + const HeaderValueContentTypeJSON + const UnityLunNameExistErrorCode + const UnityResourceNotFoundErrorCode + type BlockHostAccess struct + AccessMask HostLUNAccessEnum + Host *Host + type Health struct + DescriptionIds []string + Descriptions []string + Value int + type Host struct + Description string + Health *Health + ID string + Name string + OsType string + Unity *Unity + func (h *Host) Attach(lun *LUN) (uint16, error) + type HostLUN struct + Hlu uint16 + Host *Host + ID string + IsDefaultSnap bool + IsReadOnly bool + LUN *LUN + Type HostLUNTypeEnum + type HostLUNAccessEnum int + const HostLUNAccessBoth + const HostLUNAccessMixed + const HostLUNAccessNoAccess + const HostLUNAccessProduction + const HostLUNAccessSnapshot + type HostLUNTypeEnum int + const HostLUNTypeLUN + const HostLUNTypeSnap + const HostLUNTypeUnknown + type LUN struct + Description string + Health *Health + HostAccess []*BlockHostAccess + ID string + IsThinEnabled bool + MetadataSize uint64 + MetadataSizeAllocated uint64 + Name string + Pool *Pool + SizeAllocated uint64 + SizeTotal uint64 + SizeUsed uint64 + SnapCount uint32 + SnapWwn string + SnapsSize uint64 + SnapsSizeAllocated uint64 + Unity *Unity + Wwn string + type Pool struct + Description string + ID string + Name string + SizeFree uint64 + SizeTotal uint64 + SizeUsed uint64 + Unity *Unity + func (p *Pool) CreateLUN(name string, sizeGB uint64) (*LUN, error) + type RestClient interface + Delete func(ctx context.Context, path string, headers map[string]string, ...) error + Do func(ctx context.Context, method, path string, body, resp interface{}) error + DoWithHeaders func(ctx context.Context, method, path string, headers map[string]string, ...) error + Get func(ctx context.Context, path string, headers map[string]string, resp interface{}) error + PingPong func(ctx context.Context, method, path string, headers map[string]string, ...) (*http.Response, error) + Post func(ctx context.Context, path string, headers map[string]string, ...) error + func NewRestClient(ctx context.Context, host, username, password string, opts RestClientOptions) (RestClient, error) + type RestClientOptions struct + Insecure bool + TraceHTTP bool + type Storage interface + GetLUNById func(id string) (*LUN, error) + GetLUNByName func(name string) (*LUN, error) + GetLUNs func() ([]*LUN, error) + GetPoolById func(id string) (*Pool, error) + GetPoolByName func(name string) (*Pool, error) + GetPools func() ([]*Pool, error) + type StorageResource struct + ID string + type Unity struct + func NewUnity(mgmtIP, username, password string, insecure bool) (*Unity, error) + func (u *Unity) FilterHostLUN(hostID, lunID string) (*HostLUN, error) + func (u *Unity) GetHostByID(id string) (*Host, error) + func (u *Unity) GetHosts() ([]*Host, error) + func (u *Unity) GetLUNByID(id string) (*LUN, error) + func (u *Unity) GetLUNs() ([]*LUN, error) + func (u *Unity) GetPoolByID(id string) (*Pool, error) + func (u *Unity) GetPools() ([]*Pool, error) + type UnityError struct + ErrorCode int + HTTPStatusCode int + Message string + Messages []UnityErrorMessage + func (e *UnityError) Error() string + type UnityErrorMessage struct + Message string