Documentation ¶
Overview ¶
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.294994663 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.29431512 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.294548637 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.295366513 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.295768847 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.296117331 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.296519432 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.296908927 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.297315917 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.308490403 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.30889602 +0000 UTC.
DO NOT EDIT. GENERATED by go:generate at 2019-01-01 09:01:44.309273397 +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 FSSupportedProtocolEnum
- type Filesystem
- type FilesystemOperatorGen
- type Health
- type Host
- type HostLUN
- type HostLUNAccessEnum
- type HostLUNOperator
- type HostLUNOperatorGen
- type HostLunTypeEnum
- type HostOperatorGen
- 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 StorageResource
- type StorageResourceOperatorGen
- 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) 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) 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) 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
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 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 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 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) DeleteInstance ¶ added in v0.2.0
DeleteInstance deletes the instance.
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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) PostOnInstance( typeName, resId, action string, body map[string]interface{}, ) error DeleteInstance(resType, id string) error StorageResourceOperatorGen PoolOperatorGen LunOperatorGen HostOperatorGen HostLUNOperator NasServerOperatorGen FilesystemOperatorGen NfsShareOperatorGen }
UnityConnector defines the interface to storage system.
Source Files ¶
- blockhostaccess_gen.go
- enums_gen.go
- errors.go
- errors_gen.go
- filesystem.go
- filesystem_gen.go
- filter.go
- health_gen.go
- host.go
- host_gen.go
- hostlun.go
- hostlun_gen.go
- lun_gen.go
- nasserver_gen.go
- nfsshare.go
- nfsshare_gen.go
- option.go
- pool.go
- pool_gen.go
- resource.go
- restclient.go
- storageresource_gen.go
- unity.go
- util.go