Documentation ¶
Overview ¶
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.187215664 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.1822526 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.184708848 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.188563197 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.189915819 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.191293435 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.192671868 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.194464791 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.195602676 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.196772626 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.198222076 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.199720105 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.201207186 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.203056294 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.204599391 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.211020128 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-05-15 06:25:01.212712479 +0000 UTC.
Index ¶
- Constants
- Variables
- 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 NewRestClient(ctx context.Context, host, username, password string, opts *restClientOptions) (*restClient, error)
- func NewRestClientOptions(insecure, traceHttp bool) *restClientOptions
- func ParseUnityError(reader io.Reader) (error, error)
- type BlockHostAccess
- type BlockHostAccessEnum
- type EthernetPort
- type EthernetPortOperatorGen
- type FSSupportedProtocolEnum
- type Filesystem
- type FilesystemOperatorGen
- type Health
- type Host
- type HostLUN
- type HostLUNAccessEnum
- type HostLUNOperator
- type HostLUNOperatorGen
- type HostLunTypeEnum
- type HostOperatorGen
- type IpProtocolVersionEnum
- type IscsiNode
- type IscsiNodeOperatorGen
- type IscsiPortal
- type IscsiPortalOperatorGen
- type Lun
- type LunOperatorGen
- type NFSShareDefaultAccessEnum
- type NasServer
- type NasServerOperatorGen
- type NfsShare
- type NfsShareOperatorGen
- type Option
- type Options
- 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()
- type Pool
- 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
- type Resource
- type RestClient
- type Snap
- 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 (r *Snap) Delete() error
- func (s *Snap) DetachFromHost() error
- func (r *Snap) Refresh() error
- func (r *Snap) Repr() *idRepresent
- type SnapAccessLevelEnum
- type SnapCreatorTypeEnum
- type SnapHostAccess
- type SnapOperatorGen
- type SnapStateEnum
- type StorageResource
- type StorageResourceOperatorGen
- type Unity
- func (u *Unity) CreateOnType(typeName string, body map[string]interface{}, resp interface{}) error
- func (u *Unity) DeleteInstance(resType, id string) error
- func (u *Unity) FillEthernetPorts(respEntries []*instanceResp) ([]*EthernetPort, 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) FillIscsiNodes(respEntries []*instanceResp) ([]*IscsiNode, error)
- func (u *Unity) FillIscsiPortals(respEntries []*instanceResp) ([]*IscsiPortal, 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) FillSnaps(respEntries []*instanceResp) ([]*Snap, error)
- func (u *Unity) FillStorageResources(respEntries []*instanceResp) ([]*StorageResource, error)
- func (u *Unity) FilterEthernetPorts(filter *filter) ([]*EthernetPort, 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) FilterIscsiNodes(filter *filter) ([]*IscsiNode, error)
- func (u *Unity) FilterIscsiPortals(filter *filter) ([]*IscsiPortal, 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) FilterSnaps(filter *filter) ([]*Snap, error)
- func (u *Unity) FilterStorageResources(filter *filter) ([]*StorageResource, error)
- func (u *Unity) GetCollection(resType, fields string, filter *filter) ([]*instanceResp, 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) 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) GetHosts() ([]*Host, 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) 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) 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) GetPools() ([]*Pool, 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) GetStorageResourceById(id string) (*StorageResource, error)
- func (u *Unity) GetStorageResourceByName(name string) (*StorageResource, error)
- func (u *Unity) GetStorageResources() ([]*StorageResource, error)
- func (u *Unity) NewEthernetPortById(id string) *EthernetPort
- func (u *Unity) NewEthernetPortByName(name string) *EthernetPort
- 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) NewIscsiNodeById(id string) *IscsiNode
- func (u *Unity) NewIscsiNodeByName(name string) *IscsiNode
- func (u *Unity) NewIscsiPortalById(id string) *IscsiPortal
- 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) NewSnapById(id string) *Snap
- func (u *Unity) NewSnapByName(name string) *Snap
- 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
Constants ¶
const ( // UnityLunNameExistErrorCode is error code of UnityLunNameExist. UnityLunNameExistErrorCode = 108007744 // UnityResourceNotFoundErrorCode is error code of UnityResourceNotFound. UnityResourceNotFoundErrorCode = 131149829 )
const ( // HeaderKeyContentType is key name of `Content-Type`. HeaderKeyContentType = "Content-Type" // HeaderValueContentTypeJSON is `json` value of `Content-Type`. HeaderValueContentTypeJSON = "application/json" // HeaderValueContentTypeBinaryOctetStream is `binary` value of `Content-Type`. HeaderValueContentTypeBinaryOctetStream = "binary/octet-stream" )
Variables ¶
var ErrUnableParseRespToError = errors.New("unable parse response body to unity error")
Functions ¶
func GetUnityErrorStatusCode ¶ added in v0.2.0
GetUnityErrorStatusCode returns the unity error code.
func IsUnityError ¶ added in v0.2.0
IsUnityError returns true if err is an unity error.
func IsUnityLunNameExistError ¶ added in v0.2.0
IsUnityLunNameExistError returns true or false on whether its error code is UnityLunNameExistErrorCode.
func IsUnityResourceNotFoundError ¶ added in v0.2.0
IsUnityResourceNotFoundError returns true or false on whether its error code is UnityResourceNotFoundErrorCode.
func NewFilter ¶ added in v0.2.0
func NewFilter(f string) *filter
NewFilter returns a filter used for filtering collection.
func NewFilterOn ¶ added in v0.2.0
func NewFilterOn(typeName string) filterOn
func NewFilterf ¶ added in v0.2.0
func NewFilterf(format string, args ...interface{}) *filter
NewFilterf returns a filter used for filtering collection.
func NewRestClient ¶
func NewRestClient( ctx context.Context, host, username, password string, opts *restClientOptions, ) (*restClient, error)
NewRestClient returns a new REST client to Unity.
func NewRestClientOptions ¶ added in v0.2.0
func NewRestClientOptions(insecure, traceHttp bool) *restClientOptions
NewRestClientOptions returns a rest client option for creating rest client.
Types ¶
type BlockHostAccess ¶
type BlockHostAccess struct { Resource Host *Host `json:"host"` AccessMask HostLUNAccessEnum `json:"accessMask"` }
BlockHostAccess defines `blockHostAccess` type.
type BlockHostAccessEnum ¶ added in v0.2.0
type BlockHostAccessEnum int
const ( // BlockHostAccessOff means: Access is disabled. BlockHostAccessOff BlockHostAccessEnum = 0 // BlockHostAccessOn means: Access is enabled. BlockHostAccessOn BlockHostAccessEnum = 1 // BlockHostAccessMixed means: (Applies to Consistency Groups only.) Indicates that LUNs in a consistency group have different host access. BlockHostAccessMixed BlockHostAccessEnum = 2 )
type EthernetPort ¶ added in v0.4.0
type EthernetPort struct { Resource Health *Health `json:"health"` Id string `json:"id"` IsLinkUp bool `json:"isLinkUp"` Name string `json:"name"` }
EthernetPort defines `ethernetPort` type.
func (*EthernetPort) Refresh ¶ added in v0.4.0
func (r *EthernetPort) Refresh() error
Refresh updates the info from Unity.
func (*EthernetPort) Repr ¶ added in v0.4.0
func (r *EthernetPort) Repr() *idRepresent
Repr represents a `ethernetPort` object using its id.
type EthernetPortOperatorGen ¶ added in v0.4.0
type EthernetPortOperatorGen interface { NewEthernetPortById(id string) *EthernetPort NewEthernetPortByName(name string) *EthernetPort GetEthernetPortById(id string) (*EthernetPort, error) GetEthernetPortByName(name string) (*EthernetPort, error) GetEthernetPorts() ([]*EthernetPort, error) FillEthernetPorts(respEntries []*instanceResp) ([]*EthernetPort, error) FilterEthernetPorts(filter *filter) ([]*EthernetPort, error) }
type FSSupportedProtocolEnum ¶ added in v0.2.0
type FSSupportedProtocolEnum int
const ( // FSSupportedProtocolNFS means: Only NFS share protocol supported by file system. FSSupportedProtocolNFS FSSupportedProtocolEnum = 0 // FSSupportedProtocolCIFS means: Only SMB (also known as CIFS) share protocol is supported by file system. FSSupportedProtocolCIFS FSSupportedProtocolEnum = 1 // FSSupportedProtocolMultiprotocol means: Both share protocols NFS and SMB (also known as CIFS) are supported by file system. FSSupportedProtocolMultiprotocol FSSupportedProtocolEnum = 2 )
type Filesystem ¶ added in v0.2.0
type Filesystem struct { Resource Id string `json:"id"` Name string `json:"name"` Health *Health `json:"health"` Description string `json:"description"` StorageResource *StorageResource `json:"storageResource"` }
Filesystem defines `filesystem` type.
func (*Filesystem) Delete ¶ added in v0.2.0
func (r *Filesystem) Delete() error
Delete deletes a filesystem object.
func (*Filesystem) ExportNfsShare ¶ added in v0.2.0
func (fs *Filesystem) ExportNfsShare( name string, opts ...Option, ) (*NfsShare, error)
ExportNfsShare exports the nfs share from this filesystem.
func (*Filesystem) Refresh ¶ added in v0.2.0
func (r *Filesystem) Refresh() error
Refresh updates the info from Unity.
func (*Filesystem) Repr ¶ added in v0.2.0
func (r *Filesystem) Repr() *idRepresent
Repr represents a `filesystem` object using its id.
type FilesystemOperatorGen ¶ added in v0.2.0
type FilesystemOperatorGen interface { NewFilesystemById(id string) *Filesystem NewFilesystemByName(name string) *Filesystem GetFilesystemById(id string) (*Filesystem, error) GetFilesystemByName(name string) (*Filesystem, error) GetFilesystems() ([]*Filesystem, error) FillFilesystems(respEntries []*instanceResp) ([]*Filesystem, error) FilterFilesystems(filter *filter) ([]*Filesystem, error) }
type Health ¶
type Health struct { Resource Value int `json:"value"` DescriptionIds []string `json:"descriptionIds"` Descriptions []string `json:"descriptions"` }
Health defines `health` type.
type Host ¶
type Host struct { Resource Id string `json:"id"` Name string `json:"name"` Health *Health `json:"health"` Description string `json:"description"` OsType string `json:"osType"` }
Host defines `host` type.
type HostLUN ¶
type HostLUN struct { Resource Id string `json:"id"` Host *Host `json:"host"` Type HostLunTypeEnum `json:"type"` Hlu uint16 `json:"hlu"` Lun *Lun `json:"lun"` IsReadOnly bool `json:"isReadOnly"` IsDefaultSnap bool `json:"isDefaultSnap"` }
HostLUN defines `hostLUN` type.
type HostLUNAccessEnum ¶
type HostLUNAccessEnum int
const ( // HostLUNAccessNoAccess means: No access. HostLUNAccessNoAccess HostLUNAccessEnum = 0 // HostLUNAccessProduction means: Access to production LUNs only. HostLUNAccessProduction HostLUNAccessEnum = 1 // HostLUNAccessSnapshot means: Access to LUN snapshots only. HostLUNAccessSnapshot HostLUNAccessEnum = 2 // HostLUNAccessBoth means: Access to both production LUNs and their snapshots. HostLUNAccessBoth HostLUNAccessEnum = 3 // HostLUNAccessProductionOn means: Request to grant production access to LUNs for host. Should be used only by GUI. HostLUNAccessProductionOn HostLUNAccessEnum = 4 // HostLUNAccessProductionOff means: Request to deny production access to LUNs for host. Should be used only by GUI. HostLUNAccessProductionOff HostLUNAccessEnum = 5 // HostLUNAccessMixed means: (Applies to consistency groups only.) Indicates that LUNs in a consistency group have different host access. Do not use this value in Create or Modify requests. HostLUNAccessMixed HostLUNAccessEnum = 65535 )
type HostLUNOperator ¶ added in v0.2.0
type HostLUNOperator interface { HostLUNOperatorGen FilterHostLunByHostAndLun(hostId, lunId string) (*HostLUN, error) }
type HostLUNOperatorGen ¶ added in v0.2.0
type HostLunTypeEnum ¶ added in v0.2.0
type HostLunTypeEnum int
const ( // HostLunTypeUnknown means: Unknown LUN type. HostLunTypeUnknown HostLunTypeEnum = 0 // HostLunTypeLUN means: Production LUN. HostLunTypeLUN HostLunTypeEnum = 1 // HostLunTypeLUN_Snap means: Snapshot LUN. HostLunTypeLUN_Snap HostLunTypeEnum = 2 )
type HostOperatorGen ¶ added in v0.2.0
type HostOperatorGen interface { NewHostById(id string) *Host NewHostByName(name string) *Host GetHostById(id string) (*Host, error) GetHostByName(name string) (*Host, error) GetHosts() ([]*Host, error) FillHosts(respEntries []*instanceResp) ([]*Host, error) FilterHosts(filter *filter) ([]*Host, error) }
type IpProtocolVersionEnum ¶ added in v0.4.0
type IpProtocolVersionEnum int
const ( // IpProtocolVersionIPv4 means: Network interface uses IPv4 address. IpProtocolVersionIPv4 IpProtocolVersionEnum = 4 // IpProtocolVersionIPv6 means: Network interface uses IPv6 address. IpProtocolVersionIPv6 IpProtocolVersionEnum = 6 )
type IscsiNode ¶ added in v0.4.0
type IscsiNode struct { Resource Alias string `json:"alias"` EthernetPort EthernetPort `json:"ethernetPort"` Id string `json:"id"` Name string `json:"name"` }
IscsiNode defines `iscsiNode` type.
type IscsiNodeOperatorGen ¶ added in v0.4.0
type IscsiNodeOperatorGen interface { NewIscsiNodeById(id string) *IscsiNode NewIscsiNodeByName(name string) *IscsiNode GetIscsiNodeById(id string) (*IscsiNode, error) GetIscsiNodeByName(name string) (*IscsiNode, error) GetIscsiNodes() ([]*IscsiNode, error) FillIscsiNodes(respEntries []*instanceResp) ([]*IscsiNode, error) FilterIscsiNodes(filter *filter) ([]*IscsiNode, error) }
type IscsiPortal ¶ added in v0.4.0
type IscsiPortal struct { Resource EthernetPort *EthernetPort `json:"ethernetPort"` Gateway string `json:"gateway"` Id string `json:"id"` IpAddress string `json:"ipAddress"` IpProtocolVersion IpProtocolVersionEnum `json:"ipProtocolVersion"` IscsiNode *IscsiNode `json:"iscsiNode"` Netmask string `json:"netmask"` V6PrefixLength uint32 `json:"v6PrefixLength"` VlanId uint16 `json:"vlanId"` }
IscsiPortal defines `iscsiPortal` type.
func (*IscsiPortal) Refresh ¶ added in v0.4.0
func (r *IscsiPortal) Refresh() error
Refresh updates the info from Unity.
func (*IscsiPortal) Repr ¶ added in v0.4.0
func (r *IscsiPortal) Repr() *idRepresent
Repr represents a `iscsiPortal` object using its id.
type IscsiPortalOperatorGen ¶ added in v0.4.0
type IscsiPortalOperatorGen interface { NewIscsiPortalById(id string) *IscsiPortal GetIscsiPortalById(id string) (*IscsiPortal, error) GetIscsiPortals() ([]*IscsiPortal, error) FillIscsiPortals(respEntries []*instanceResp) ([]*IscsiPortal, error) FilterIscsiPortals(filter *filter) ([]*IscsiPortal, error) }
type Lun ¶ added in v0.2.0
type Lun struct { Resource Description string `json:"description"` Health *Health `json:"health"` HostAccess []*BlockHostAccess `json:"hostAccess"` Id string `json:"id"` IsThinEnabled bool `json:"isThinEnabled"` MetadataSize uint64 `json:"metadataSize"` MetadataSizeAllocated uint64 `json:"metadataSizeAllocated"` Name string `json:"name"` Pool *Pool `json:"pool"` SizeAllocated uint64 `json:"sizeAllocated"` SizeTotal uint64 `json:"sizeTotal"` SizeUsed uint64 `json:"sizeUsed"` SnapCount uint32 `json:"snapCount"` SnapWwn string `json:"snapWwn"` SnapsSize uint64 `json:"snapsSize"` SnapsSizeAllocated uint64 `json:"snapsSizeAllocated"` StorageResource *StorageResource `json:"storageResource"` Wwn string `json:"wwn"` }
Lun defines `lun` type.
type LunOperatorGen ¶ added in v0.2.0
type NFSShareDefaultAccessEnum ¶ added in v0.2.0
type NFSShareDefaultAccessEnum int
const ( NFSShareDefaultAccessEnum = 0 NFSShareDefaultAccessReadOnly NFSShareDefaultAccessEnum = 1 NFSShareDefaultAccessReadWrite NFSShareDefaultAccessEnum = 2 NFSShareDefaultAccessRoot NFSShareDefaultAccessEnum = 3 NFSShareDefaultAccessRoRoot NFSShareDefaultAccessEnum = 4 )NFSShareDefaultAccessNoAccess
type NasServer ¶ added in v0.2.0
type NasServer struct { Resource Id string `json:"id"` Name string `json:"name"` Health *Health `json:"health"` }
NasServer defines `nasServer` type.
type NasServerOperatorGen ¶ added in v0.2.0
type NasServerOperatorGen interface { NewNasServerById(id string) *NasServer NewNasServerByName(name string) *NasServer GetNasServerById(id string) (*NasServer, error) GetNasServerByName(name string) (*NasServer, error) GetNasServers() ([]*NasServer, error) FillNasServers(respEntries []*instanceResp) ([]*NasServer, error) FilterNasServers(filter *filter) ([]*NasServer, error) }
type NfsShare ¶ added in v0.2.0
type NfsShare struct {}
NfsShare defines `nfsShare` type.
type NfsShareOperatorGen ¶ added in v0.2.0
type NfsShareOperatorGen interface {}
type Option ¶ added in v0.2.0
type Option func(*Options)
Option defines an optional parameter.
func DefaultAccessOpt ¶ added in v0.2.0
func DefaultAccessOpt(da NFSShareDefaultAccessEnum) Option
DefaultAccessOpt constructs optional parameter `defaultAccess`.
func HostAccessOpt ¶ added in v0.2.0
func HostAccessOpt(host *Host, accessMask HostLUNAccessEnum) Option
HostAccessOpt constructs optional parameter `hostAccess`.
func SupportedProtocolsOpt ¶ added in v0.2.0
func SupportedProtocolsOpt(protocol FSSupportedProtocolEnum) Option
SupportedProtocolsOpt constructs optional parameter `supportedProtocols`.
type Options ¶ added in v0.2.0
type Options map[string]interface{}
Options defines the mapping of optional parameters.
func NewOptions ¶ added in v0.2.0
NewOptions constructs the optional parameters.
func (*Options) PopDefaultAccess ¶ added in v0.2.0
func (o *Options) PopDefaultAccess() interface{}
PopDefaultAccess retrieves optional parameter `defaultAccess` and removes it from options.
func (*Options) PopHostAccess ¶ added in v0.2.0
func (o *Options) PopHostAccess() interface{}
PopHostAccess retrieves optional parameter `hostAccess` and removes it from options.
func (*Options) PopName ¶ added in v0.2.0
func (o *Options) PopName() interface{}
PopName retrieves optional parameter `name` and removes it from options.
func (*Options) PopSize ¶ added in v0.2.0
func (o *Options) PopSize() interface{}
PopSize retrieves optional parameter `size` and removes it from options.
func (*Options) PopSupportedProtocols ¶ added in v0.2.0
func (o *Options) PopSupportedProtocols() interface{}
PopSupportedProtocols retrieves optional parameter `supportedProtocols` and removes it from options.
func (*Options) PushDefaultAccess ¶ added in v0.2.0
func (o *Options) PushDefaultAccess(da NFSShareDefaultAccessEnum)
PushDefaultAccess adds optional parameter `defaultAccess`.
func (*Options) PushHostAccess ¶ added in v0.2.0
func (o *Options) PushHostAccess(host *Host, accessMask HostLUNAccessEnum)
PushHostAccess adds optional parameter `hostAccess`.
func (*Options) PushSupportedProtocols ¶ added in v0.2.0
func (o *Options) PushSupportedProtocols(protocol FSSupportedProtocolEnum)
PushSupportedProtocols adds optional parameter `supportedProtocols`.
func (*Options) WarnNotUsedOptions ¶ added in v0.2.0
func (o *Options) WarnNotUsedOptions()
WarnNotUsedOptions logs warning messages for not-used optional parameters.
type Pool ¶
type Pool struct { Resource Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` Health *Health `json:"health"` SizeFree uint64 `json:"sizeFree"` SizeTotal uint64 `json:"sizeTotal"` SizeUsed uint64 `json:"sizeUsed"` }
Pool defines `pool` type.
func (*Pool) CreateFilesystem ¶ added in v0.2.0
func (p *Pool) CreateFilesystem( nasServer *NasServer, name string, sizeGB uint64, opts ...Option, ) (*Filesystem, error)
CreateFilesystem creates a new filesystem on the pool. Parameters - nasServer, name and sizeGB are required. SupportedProtocolsOpt is optional.
func (*Pool) CreateLun ¶ added in v0.2.0
CreateLun creates a new Lun on the pool. Parameter - name and sizeGB are required. HostAccessOpt is optional.
func (*Pool) CreateNfsShare ¶ added in v0.2.0
func (p *Pool) CreateNfsShare( nasServer *NasServer, name string, sizeGB uint64, opts ...Option, ) (*NfsShare, error)
CreateNfsShare creates a new filesystem on the pool then exports a nfs share from it. Parameters - nasServer, name and sizeGB are required. DefaultAccessOpt is optional.
type PoolOperatorGen ¶ added in v0.2.0
type PoolOperatorGen interface { NewPoolById(id string) *Pool NewPoolByName(name string) *Pool GetPoolById(id string) (*Pool, error) GetPoolByName(name string) (*Pool, error) GetPools() ([]*Pool, error) FillPools(respEntries []*instanceResp) ([]*Pool, error) FilterPools(filter *filter) ([]*Pool, error) }
type Resource ¶ added in v0.2.0
type Resource struct { Unity UnityConnector // contains filtered or unexported fields }
type RestClient ¶
type RestClient interface { Do( ctx context.Context, method, path string, body, resp interface{}, ) error Get( ctx context.Context, path string, headers map[string]string, resp interface{}, ) error Post( ctx context.Context, path string, headers map[string]string, body, resp interface{}, ) error Delete( ctx context.Context, path string, headers map[string]string, body, resp interface{}, ) error }
RestClient acts as a REST client.
type Snap ¶ added in v0.3.0
type Snap struct { Resource Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` StorageResource *StorageResource `json:"storageResource"` Lun *Lun `json:"lun"` CreationTime string `json:"creationTime"` ExpirationTime string `json:"expirationTime"` CreatorType SnapCreatorTypeEnum `json:"creatorType"` IsSystemSnap bool `json:"isSystemSnap"` IsModifiable bool `json:"isModifiable"` IsReadOnly bool `json:"isReadOnly"` IsModified bool `json:"isModified"` State SnapStateEnum `json:"state"` Size uint64 `json:"size"` HostAccess []*SnapHostAccess `json:"hostAccess"` }
Snap defines `snap` type.
func (*Snap) AttachToHost ¶ added in v0.3.0
func (s *Snap) AttachToHost(host *Host, access SnapAccessLevelEnum) error
func (*Snap) Create ¶ added in v0.3.0
func (s *Snap) Create(sr *StorageResource) error
func (*Snap) DetachFromHost ¶ added in v0.3.0
type SnapAccessLevelEnum ¶ added in v0.3.0
type SnapAccessLevelEnum int
const ( // SnapAccessLevelReadOnly means: Allow read-only access to the snapshot for a host. SnapAccessLevelReadOnly SnapAccessLevelEnum = 0 // SnapAccessLevelReadWrite means: Allow read/write access to the snapshot for a host. SnapAccessLevelReadWrite SnapAccessLevelEnum = 1 // SnapAccessLevelReadOnlyPartial means: (Applies to consistency group snapshots only.) Indicates that host has read-only access to some individual snapshots in a consistency group snapshot. Do not use this value in Modify requests. SnapAccessLevelReadOnlyPartial SnapAccessLevelEnum = 2 // SnapAccessLevelReadWritePartial means: (Applies to consistency group snapshots only.) Indicates that host has read/write access to some individual snapshots in a consistency group snapshot. Do not use this value in Modify requests. SnapAccessLevelReadWritePartial SnapAccessLevelEnum = 3 // SnapAccessLevelMixed means: (Applies to consistency group snapshots only.) Indicates that host has read-only and read/write access to some individual snapshots in a consistency group snapshot. Do not use this value in Modify requests. SnapAccessLevelMixed SnapAccessLevelEnum = 4 )
type SnapCreatorTypeEnum ¶ added in v0.3.0
type SnapCreatorTypeEnum int
const ( // SnapCreatorTypeNone means: Not specified. SnapCreatorTypeNone SnapCreatorTypeEnum = 0 // SnapCreatorTypeScheduled means: Created by a snapshot schedule. SnapCreatorTypeScheduled SnapCreatorTypeEnum = 1 // SnapCreatorTypeUser_Custom means: Created by a user with a custom name. SnapCreatorTypeUser_Custom SnapCreatorTypeEnum = 2 // SnapCreatorTypeUser_Default means: Created by a user with a default name. SnapCreatorTypeUser_Default SnapCreatorTypeEnum = 3 // SnapCreatorTypeExternal_VSS means: Created by Windows Volume Shadow Copy Service (VSS) to obtain an application consistent snapshot. SnapCreatorTypeExternal_VSS SnapCreatorTypeEnum = 4 // SnapCreatorTypeExternal_NDMP means: Created by an NDMP backup operation. SnapCreatorTypeExternal_NDMP SnapCreatorTypeEnum = 5 // SnapCreatorTypeExternal_Restore means: Created as a backup snapshot before a snapshot restore. SnapCreatorTypeExternal_Restore SnapCreatorTypeEnum = 6 // SnapCreatorTypeExternal_Replication_Manager means: Created by Replication Manager. SnapCreatorTypeExternal_Replication_Manager SnapCreatorTypeEnum = 8 // SnapCreatorTypeReplication means: Created by a native replication operation. SnapCreatorTypeReplication SnapCreatorTypeEnum = 9 // SnapCreatorTypeSnap_CLI means: Created inband by SnapCLI. SnapCreatorTypeSnap_CLI SnapCreatorTypeEnum = 11 // SnapCreatorTypeAppSync means: Created by AppSync. SnapCreatorTypeAppSync SnapCreatorTypeEnum = 12 )
type SnapHostAccess ¶ added in v0.3.0
type SnapHostAccess struct { Resource Host *Host `json:"host"` AccessMask SnapAccessLevelEnum `json:"accessMask"` }
SnapHostAccess defines `snapHostAccess` type.
type SnapOperatorGen ¶ added in v0.3.0
type SnapOperatorGen interface { NewSnapById(id string) *Snap NewSnapByName(name string) *Snap GetSnapById(id string) (*Snap, error) GetSnapByName(name string) (*Snap, error) GetSnaps() ([]*Snap, error) FillSnaps(respEntries []*instanceResp) ([]*Snap, error) FilterSnaps(filter *filter) ([]*Snap, error) }
type SnapStateEnum ¶ added in v0.3.0
type SnapStateEnum int
const ( // SnapStateReady means: The snaphot is operating normally. SnapStateReady SnapStateEnum = 2 // SnapStateFaulted means: The storage pool that the snapshot belongs to is degraded. SnapStateFaulted SnapStateEnum = 3 // SnapStateOffline means: The snapshot is not accessible possibly because the storage resource is not ready or the storage pool is full. SnapStateOffline SnapStateEnum = 6 // SnapStateInvalid means: The snapshot has become invalid becauuse of a non recoverable error. SnapStateInvalid SnapStateEnum = 7 // SnapStateInitializing means: The snapshot is being created. SnapStateInitializing SnapStateEnum = 8 // SnapStateDestroying means: The snapshot is being deleted. SnapStateDestroying SnapStateEnum = 9 )
type StorageResource ¶
type StorageResource struct { Resource Id string `json:"id"` Name string `json:"name"` Health *Health `json:"health"` Description string `json:"description"` Filesystem *Filesystem `json:"filesystem"` }
StorageResource defines `storageResource` type.
func (*StorageResource) Refresh ¶ added in v0.2.0
func (r *StorageResource) Refresh() error
Refresh updates the info from Unity.
func (*StorageResource) Repr ¶ added in v0.2.0
func (r *StorageResource) Repr() *idRepresent
Repr represents a `storageResource` object using its id.
type StorageResourceOperatorGen ¶ added in v0.2.0
type StorageResourceOperatorGen interface { NewStorageResourceById(id string) *StorageResource NewStorageResourceByName(name string) *StorageResource GetStorageResourceById(id string) (*StorageResource, error) GetStorageResourceByName(name string) (*StorageResource, error) GetStorageResources() ([]*StorageResource, error) FillStorageResources(respEntries []*instanceResp) ([]*StorageResource, error) FilterStorageResources(filter *filter) ([]*StorageResource, error) }
type Unity ¶
type Unity struct {
// contains filtered or unexported fields
}
Unity defines the connection to Unity system.
func (*Unity) CreateOnType ¶ added in v0.3.0
func (u *Unity) CreateOnType( typeName string, body map[string]interface{}, resp interface{}, ) error
CreateOnType sends POST request to create resource type.
func (*Unity) DeleteInstance ¶ added in v0.2.0
DeleteInstance deletes the instance.
func (*Unity) FillEthernetPorts ¶ added in v0.4.0
func (u *Unity) FillEthernetPorts( respEntries []*instanceResp, ) ([]*EthernetPort, error)
FillEthernetPorts generates the `ethernetPort` objects from collection query response.
func (*Unity) FillFilesystems ¶ added in v0.2.0
func (u *Unity) FillFilesystems( respEntries []*instanceResp, ) ([]*Filesystem, error)
FillFilesystems generates the `filesystem` objects from collection query response.
func (*Unity) FillHostLUNs ¶ added in v0.2.0
FillHostLUNs generates the `hostLUN` objects from collection query response.
func (*Unity) FillHosts ¶ added in v0.2.0
FillHosts generates the `host` objects from collection query response.
func (*Unity) FillIscsiNodes ¶ added in v0.4.0
FillIscsiNodes generates the `iscsiNode` objects from collection query response.
func (*Unity) FillIscsiPortals ¶ added in v0.4.0
func (u *Unity) FillIscsiPortals( respEntries []*instanceResp, ) ([]*IscsiPortal, error)
FillIscsiPortals generates the `iscsiPortal` objects from collection query response.
func (*Unity) FillLuns ¶ added in v0.2.0
FillLuns generates the `lun` objects from collection query response.
func (*Unity) FillNasServers ¶ added in v0.2.0
FillNasServers generates the `nasServer` objects from collection query response.
func (*Unity) FillNfsShares ¶ added in v0.2.0
FillNfsShares generates the `nfsShare` objects from collection query response.
func (*Unity) FillPools ¶ added in v0.2.0
FillPools generates the `pool` objects from collection query response.
func (*Unity) FillSnaps ¶ added in v0.3.0
FillSnaps generates the `snap` objects from collection query response.
func (*Unity) FillStorageResources ¶ added in v0.2.0
func (u *Unity) FillStorageResources( respEntries []*instanceResp, ) ([]*StorageResource, error)
FillStorageResources generates the `storageResource` objects from collection query response.
func (*Unity) FilterEthernetPorts ¶ added in v0.4.0
func (u *Unity) FilterEthernetPorts( filter *filter, ) ([]*EthernetPort, error)
FilterEthernetPorts filters the `ethernetPort` objects by given filters.
func (*Unity) FilterFilesystems ¶ added in v0.2.0
func (u *Unity) FilterFilesystems( filter *filter, ) ([]*Filesystem, error)
FilterFilesystems filters the `filesystem` objects by given filters.
func (*Unity) FilterHostLUNs ¶ added in v0.2.0
FilterHostLUNs filters the `hostLUN` objects by given filters.
func (*Unity) FilterHostLunByHostAndLun ¶ added in v0.2.0
FilterHostLunByHostAndLun filters the `HostLun` by given its host Id and Lun Id.
func (*Unity) FilterHosts ¶ added in v0.2.0
FilterHosts filters the `host` objects by given filters.
func (*Unity) FilterIscsiNodes ¶ added in v0.4.0
FilterIscsiNodes filters the `iscsiNode` objects by given filters.
func (*Unity) FilterIscsiPortals ¶ added in v0.4.0
func (u *Unity) FilterIscsiPortals( filter *filter, ) ([]*IscsiPortal, error)
FilterIscsiPortals filters the `iscsiPortal` objects by given filters.
func (*Unity) FilterLuns ¶ added in v0.2.0
FilterLuns filters the `lun` objects by given filters.
func (*Unity) FilterNasServers ¶ added in v0.2.0
FilterNasServers filters the `nasServer` objects by given filters.
func (*Unity) FilterNfsShares ¶ added in v0.2.0
FilterNfsShares filters the `nfsShare` objects by given filters.
func (*Unity) FilterPools ¶ added in v0.2.0
FilterPools filters the `pool` objects by given filters.
func (*Unity) FilterSnaps ¶ added in v0.3.0
FilterSnaps filters the `snap` objects by given filters.
func (*Unity) FilterStorageResources ¶ added in v0.2.0
func (u *Unity) FilterStorageResources( filter *filter, ) ([]*StorageResource, error)
FilterStorageResources filters the `storageResource` objects by given filters.
func (*Unity) GetCollection ¶ added in v0.2.0
GetCollection queries instance collection.
func (*Unity) GetEthernetPortById ¶ added in v0.4.0
func (u *Unity) GetEthernetPortById( id string, ) (*EthernetPort, error)
GetEthernetPortById retrives the `ethernetPort` by given its id.
func (*Unity) GetEthernetPortByName ¶ added in v0.4.0
func (u *Unity) GetEthernetPortByName( name string, ) (*EthernetPort, error)
GetEthernetPortByName retrives the `ethernetPort` by given its name.
func (*Unity) GetEthernetPorts ¶ added in v0.4.0
func (u *Unity) GetEthernetPorts() ([]*EthernetPort, error)
GetEthernetPorts retrives all `ethernetPort` objects.
func (*Unity) GetFilesystemById ¶ added in v0.2.0
func (u *Unity) GetFilesystemById( id string, ) (*Filesystem, error)
GetFilesystemById retrives the `filesystem` by given its id.
func (*Unity) GetFilesystemByName ¶ added in v0.2.0
func (u *Unity) GetFilesystemByName( name string, ) (*Filesystem, error)
GetFilesystemByName retrives the `filesystem` by given its name.
func (*Unity) GetFilesystems ¶ added in v0.2.0
func (u *Unity) GetFilesystems() ([]*Filesystem, error)
GetFilesystems retrives all `filesystem` objects.
func (*Unity) GetHostById ¶ added in v0.2.0
GetHostById retrives the `host` by given its id.
func (*Unity) GetHostByName ¶ added in v0.2.0
GetHostByName retrives the `host` by given its name.
func (*Unity) GetHostLUNById ¶ added in v0.2.0
GetHostLUNById retrives the `hostLUN` by given its id.
func (*Unity) GetHostLUNs ¶ added in v0.2.0
GetHostLUNs retrives all `hostLUN` objects.
func (*Unity) GetInstanceById ¶ added in v0.2.0
GetInstanceById queries instance via id.
func (*Unity) GetInstanceByName ¶ added in v0.2.0
GetInstanceByName queries instance via name.
func (*Unity) GetIscsiNodeById ¶ added in v0.4.0
GetIscsiNodeById retrives the `iscsiNode` by given its id.
func (*Unity) GetIscsiNodeByName ¶ added in v0.4.0
GetIscsiNodeByName retrives the `iscsiNode` by given its name.
func (*Unity) GetIscsiNodes ¶ added in v0.4.0
GetIscsiNodes retrives all `iscsiNode` objects.
func (*Unity) GetIscsiPortalById ¶ added in v0.4.0
func (u *Unity) GetIscsiPortalById( id string, ) (*IscsiPortal, error)
GetIscsiPortalById retrives the `iscsiPortal` by given its id.
func (*Unity) GetIscsiPortals ¶ added in v0.4.0
func (u *Unity) GetIscsiPortals() ([]*IscsiPortal, error)
GetIscsiPortals retrives all `iscsiPortal` objects.
func (*Unity) GetLunById ¶ added in v0.2.0
GetLunById retrives the `lun` by given its id.
func (*Unity) GetLunByName ¶ added in v0.2.0
GetLunByName retrives the `lun` by given its name.
func (*Unity) GetNasServerById ¶ added in v0.2.0
GetNasServerById retrives the `nasServer` by given its id.
func (*Unity) GetNasServerByName ¶ added in v0.2.0
GetNasServerByName retrives the `nasServer` by given its name.
func (*Unity) GetNasServers ¶ added in v0.2.0
GetNasServers retrives all `nasServer` objects.
func (*Unity) GetNfsShareById ¶ added in v0.2.0
GetNfsShareById retrives the `nfsShare` by given its id.
func (*Unity) GetNfsShareByName ¶ added in v0.2.0
GetNfsShareByName retrives the `nfsShare` by given its name.
func (*Unity) GetNfsShares ¶ added in v0.2.0
GetNfsShares retrives all `nfsShare` objects.
func (*Unity) GetPoolById ¶ added in v0.2.0
GetPoolById retrives the `pool` by given its id.
func (*Unity) GetPoolByName ¶ added in v0.2.0
GetPoolByName retrives the `pool` by given its name.
func (*Unity) GetSnapById ¶ added in v0.3.0
GetSnapById retrives the `snap` by given its id.
func (*Unity) GetSnapByName ¶ added in v0.3.0
GetSnapByName retrives the `snap` by given its name.
func (*Unity) GetStorageResourceById ¶ added in v0.2.0
func (u *Unity) GetStorageResourceById( id string, ) (*StorageResource, error)
GetStorageResourceById retrives the `storageResource` by given its id.
func (*Unity) GetStorageResourceByName ¶ added in v0.2.0
func (u *Unity) GetStorageResourceByName( name string, ) (*StorageResource, error)
GetStorageResourceByName retrives the `storageResource` by given its name.
func (*Unity) GetStorageResources ¶ added in v0.2.0
func (u *Unity) GetStorageResources() ([]*StorageResource, error)
GetStorageResources retrives all `storageResource` objects.
func (*Unity) NewEthernetPortById ¶ added in v0.4.0
func (u *Unity) NewEthernetPortById( id string, ) *EthernetPort
NewEthernetPortById constructs a `EthernetPort` object with id.
func (*Unity) NewEthernetPortByName ¶ added in v0.4.0
func (u *Unity) NewEthernetPortByName( name string, ) *EthernetPort
NewEthernetPortByName constructs a `ethernetPort` object with name.
func (*Unity) NewFilesystemById ¶ added in v0.2.0
func (u *Unity) NewFilesystemById( id string, ) *Filesystem
NewFilesystemById constructs a `Filesystem` object with id.
func (*Unity) NewFilesystemByName ¶ added in v0.2.0
func (u *Unity) NewFilesystemByName( name string, ) *Filesystem
NewFilesystemByName constructs a `filesystem` object with name.
func (*Unity) NewHostById ¶ added in v0.2.0
NewHostById constructs a `Host` object with id.
func (*Unity) NewHostByName ¶ added in v0.2.0
NewHostByName constructs a `host` object with name.
func (*Unity) NewHostLUNById ¶ added in v0.2.0
NewHostLUNById constructs a `HostLUN` object with id.
func (*Unity) NewIscsiNodeById ¶ added in v0.4.0
NewIscsiNodeById constructs a `IscsiNode` object with id.
func (*Unity) NewIscsiNodeByName ¶ added in v0.4.0
NewIscsiNodeByName constructs a `iscsiNode` object with name.
func (*Unity) NewIscsiPortalById ¶ added in v0.4.0
func (u *Unity) NewIscsiPortalById( id string, ) *IscsiPortal
NewIscsiPortalById constructs a `IscsiPortal` object with id.
func (*Unity) NewLunById ¶ added in v0.2.0
NewLunById constructs a `Lun` object with id.
func (*Unity) NewLunByName ¶ added in v0.2.0
NewLunByName constructs a `lun` object with name.
func (*Unity) NewNasServerById ¶ added in v0.2.0
NewNasServerById constructs a `NasServer` object with id.
func (*Unity) NewNasServerByName ¶ added in v0.2.0
NewNasServerByName constructs a `nasServer` object with name.
func (*Unity) NewNfsShareById ¶ added in v0.2.0
NewNfsShareById constructs a `NfsShare` object with id.
func (*Unity) NewNfsShareByName ¶ added in v0.2.0
NewNfsShareByName constructs a `nfsShare` object with name.
func (*Unity) NewPoolById ¶ added in v0.2.0
NewPoolById constructs a `Pool` object with id.
func (*Unity) NewPoolByName ¶ added in v0.2.0
NewPoolByName constructs a `pool` object with name.
func (*Unity) NewSnapById ¶ added in v0.3.0
NewSnapById constructs a `Snap` object with id.
func (*Unity) NewSnapByName ¶ added in v0.3.0
NewSnapByName constructs a `snap` object with name.
func (*Unity) NewStorageResourceById ¶ added in v0.2.0
func (u *Unity) NewStorageResourceById( id string, ) *StorageResource
NewStorageResourceById constructs a `StorageResource` object with id.
func (*Unity) NewStorageResourceByName ¶ added in v0.2.0
func (u *Unity) NewStorageResourceByName( name string, ) *StorageResource
NewStorageResourceByName constructs a `storageResource` object with name.
type UnityConnector ¶ added in v0.2.0
type UnityConnector interface { GetInstanceById( resType, id, fields string, instance interface{}, ) error GetInstanceByName( resType, name, fields string, instance interface{}, ) error GetCollection( resType, fields string, filter *filter, ) ([]*instanceResp, error) PostOnType( typeName, action string, body map[string]interface{}, ) (string, error) CreateOnType( typeName string, body map[string]interface{}, resp interface{}, ) error PostOnInstance( typeName, resId, action string, body map[string]interface{}, ) error DeleteInstance(resType, id string) error StorageResourceOperatorGen PoolOperatorGen LunOperatorGen SnapOperatorGen HostOperatorGen HostLUNOperator NasServerOperatorGen FilesystemOperatorGen NfsShareOperatorGen EthernetPortOperatorGen IscsiNodeOperatorGen IscsiPortalOperatorGen }
UnityConnector defines the interface to storage system.
Source Files ¶
- blockhostaccess_gen.go
- enums_gen.go
- errors.go
- errors_gen.go
- ethernetport_gen.go
- filesystem.go
- filesystem_gen.go
- filter.go
- health_gen.go
- host.go
- host_gen.go
- hostlun.go
- hostlun_gen.go
- iscsinode_gen.go
- iscsiportal_gen.go
- lun_gen.go
- nasserver_gen.go
- nfsshare.go
- nfsshare_gen.go
- option.go
- pool.go
- pool_gen.go
- resource.go
- restclient.go
- snap.go
- snap_gen.go
- snaphostaccess_gen.go
- storageresource_gen.go
- unity.go
- util.go