Documentation
¶
Index ¶
- Constants
- Variables
- type AccessType
- type ConfigConnect
- type FilesystemAccessType
- type LicenseType
- type NFSShareDefaultAccess
- type UnityClient
- type UnityClientImpl
- func (c *UnityClientImpl) Authenticate(ctx context.Context, configConnect *ConfigConnect) error
- func (c *UnityClientImpl) BasicSystemInfo(ctx context.Context, configConnect *ConfigConnect) error
- func (c *UnityClientImpl) CopySnapshot(ctx context.Context, sourceSnapshotID, name string) (*types.Snapshot, error)
- func (c *UnityClientImpl) CreateCloneFromVolume(ctx context.Context, name, volID string) (*types.Volume, error)
- func (c *UnityClientImpl) CreateFilesystem(ctx context.Context, name, storagepool, description, nasServer string, ...) (*types.Filesystem, error)
- func (c *UnityClientImpl) CreateHost(ctx context.Context, hostName string, tenantID string) (*types.Host, error)
- func (c *UnityClientImpl) CreateHostIPPort(ctx context.Context, hostID, ip string) (*types.HostIPPort, error)
- func (c *UnityClientImpl) CreateHostInitiator(ctx context.Context, hostID, wwnOrIqn string, ...) (*types.HostInitiator, error)
- func (c *UnityClientImpl) CreateLun(ctx context.Context, name, poolID, description string, size uint64, ...) (*types.Volume, error)
- func (c *UnityClientImpl) CreateNFSShare(ctx context.Context, name, path, filesystemID string, ...) (*types.Filesystem, error)
- func (c *UnityClientImpl) CreateNFSShareFromSnapshot(ctx context.Context, name, path, snapshotID string, ...) (*types.NFSShare, error)
- func (c *UnityClientImpl) CreateRealTimeMetricsQuery(ctx context.Context, metricPaths []string, interval int) (*types.MetricQueryCreateResponse, error)
- func (c *UnityClientImpl) CreateSnapshot(ctx context.Context, ...) (*types.Snapshot, error)
- func (c *UnityClientImpl) CreateSnapshotWithFsAccesType(ctx context.Context, ...) (*types.Snapshot, error)
- func (c *UnityClientImpl) CreteLunThinClone(ctx context.Context, name, snapID, volID string) (*types.Volume, error)
- func (c *UnityClientImpl) DeleteFilesystem(ctx context.Context, filesystemID string) error
- func (c *UnityClientImpl) DeleteFilesystemAsSnapshot(ctx context.Context, snapshotID string, sourceFs *types.Filesystem) error
- func (c *UnityClientImpl) DeleteHost(ctx context.Context, hostName string) error
- func (c *UnityClientImpl) DeleteNFSShare(ctx context.Context, filesystemID, nfsShareID string) error
- func (c *UnityClientImpl) DeleteNFSShareCreatedFromSnapshot(ctx context.Context, nfsShareID string) error
- func (c *UnityClientImpl) DeleteRealTimeMetricsQuery(ctx context.Context, queryID int) error
- func (c *UnityClientImpl) DeleteSnapshot(ctx context.Context, snapshotID string) error
- func (c *UnityClientImpl) DeleteVolume(ctx context.Context, volumeID string) error
- func (c *UnityClientImpl) ExpandFilesystem(ctx context.Context, filesystemID string, newSize uint64) error
- func (c *UnityClientImpl) ExpandVolume(ctx context.Context, volumeID string, newSize uint64) error
- func (c *UnityClientImpl) ExportVolume(ctx context.Context, volID, hostID string) error
- func (c *UnityClientImpl) FindFcPortByID(ctx context.Context, fcPortID string) (*types.FcPort, error)
- func (c *UnityClientImpl) FindFilesystemByID(ctx context.Context, filesystemID string) (*types.Filesystem, error)
- func (c *UnityClientImpl) FindFilesystemByName(ctx context.Context, filesystemName string) (*types.Filesystem, error)
- func (c *UnityClientImpl) FindHostByName(ctx context.Context, hostName string) (*types.Host, error)
- func (c *UnityClientImpl) FindHostIOLimitByName(ctx context.Context, hostIoPolicyName string) (*types.IoLimitPolicy, error)
- func (c *UnityClientImpl) FindHostIPPortByID(ctx context.Context, hostIPID string) (*types.HostIPPort, error)
- func (c *UnityClientImpl) FindHostInitiatorByID(ctx context.Context, wwnOrIqn string) (*types.HostInitiator, error)
- func (c *UnityClientImpl) FindHostInitiatorByName(ctx context.Context, wwnOrIqn string) (*types.HostInitiator, error)
- func (c *UnityClientImpl) FindHostInitiatorPathByID(ctx context.Context, initiatorPathID string) (*types.HostInitiatorPath, error)
- func (c *UnityClientImpl) FindNASServerByID(ctx context.Context, nasServerID string) (*types.NASServer, error)
- func (c *UnityClientImpl) FindNFSShareByID(ctx context.Context, nfsShareID string) (*types.NFSShare, error)
- func (c *UnityClientImpl) FindNFSShareByName(ctx context.Context, nfsSharename string) (*types.NFSShare, error)
- func (c *UnityClientImpl) FindSnapshotByID(ctx context.Context, snapshotID string) (*types.Snapshot, error)
- func (c *UnityClientImpl) FindSnapshotByName(ctx context.Context, snapshotName string) (*types.Snapshot, error)
- func (c *UnityClientImpl) FindStoragePoolByID(ctx context.Context, poolID string) (*types.StoragePool, error)
- func (c *UnityClientImpl) FindStoragePoolByName(ctx context.Context, poolName string) (*types.StoragePool, error)
- func (c *UnityClientImpl) FindTenants(ctx context.Context) (*types.TenantInfo, error)
- func (c *UnityClientImpl) FindVolumeByID(ctx context.Context, volID string) (*types.Volume, error)
- func (c *UnityClientImpl) FindVolumeByName(ctx context.Context, volName string) (*types.Volume, error)
- func (c *UnityClientImpl) GetAllNFSServers(ctx context.Context) (*types.NFSServersResponse, error)
- func (c *UnityClientImpl) GetAllRealTimeMetricPaths(ctx context.Context) error
- func (c *UnityClientImpl) GetCapacity(ctx context.Context) (*types.SystemCapacityMetricsQueryResult, error)
- func (c *UnityClientImpl) GetFilesystemIDFromResID(ctx context.Context, filesystemResID string) (string, error)
- func (c *UnityClientImpl) GetMaxVolumeSize(ctx context.Context, systemLimitID string) (*types.MaxVolumSizeInfo, error)
- func (c *UnityClientImpl) GetMetricsCollection(ctx context.Context, queryID int) (*types.MetricQueryResult, error)
- func (c *UnityClientImpl) GetToken() string
- func (c *UnityClientImpl) ListHostInitiators(ctx context.Context) ([]types.HostInitiator, error)
- func (c *UnityClientImpl) ListHosts(ctx context.Context) ([]types.Host, error)
- func (c *UnityClientImpl) ListIscsiIPInterfaces(ctx context.Context) ([]types.IPInterfaceEntries, error)
- func (c *UnityClientImpl) ListSnapshots(ctx context.Context, startToken int, maxEntries int, ...) ([]types.Snapshot, int, error)
- func (c *UnityClientImpl) ListVolumes(ctx context.Context, startToken int, maxEntries int) ([]types.Volume, int, error)
- func (c *UnityClientImpl) ModifyHostInitiator(ctx context.Context, hostID string, initiator *types.HostInitiator) (*types.HostInitiator, error)
- func (c *UnityClientImpl) ModifyHostInitiatorByID(ctx context.Context, hostID, initiatorID string) (*types.HostInitiator, error)
- func (c *UnityClientImpl) ModifyNFSShareCreatedFromSnapshotHostAccess(ctx context.Context, nfsShareID string, hostIDs []string, ...) error
- func (c *UnityClientImpl) ModifyNFSShareHostAccess(ctx context.Context, filesystemID, nfsShareID string, hostIDs []string, ...) error
- func (c *UnityClientImpl) ModifySnapshot(ctx context.Context, snapshotID, description, retentionDuration string) error
- func (c *UnityClientImpl) ModifySnapshotAutoDeleteParameter(ctx context.Context, snapshotID string) error
- func (c *UnityClientImpl) ModifyVolumeExport(ctx context.Context, volID string, hostIDList []string) error
- func (c *UnityClientImpl) RenameVolume(ctx context.Context, newName, volID string) error
- func (c *UnityClientImpl) SetToken(token string)
- func (c *UnityClientImpl) UnexportVolume(ctx context.Context, volID string) error
Constants ¶
const ( // LunDisplayFields to display the Volume fields LunDisplayFields = "" /* 197-byte string literal not displayed */ // FileSystemDisplayFields to display the File System fields FileSystemDisplayFields = "" /* 160-byte string literal not displayed */ // StorageResourceDisplayFields to display Storage Resource fields StorageResourceDisplayFields = "id,name,filesystem" // TenantDisplayFields to display Tenants fields TenantDisplayFields = "id,name" NFSShareDisplayfields = "id,name,filesystem,readOnlyHosts,readWriteHosts,readOnlyRootAccessHosts,rootAccessHosts,exportPaths" // NasServerDisplayfields to display the NAS Server fields NasServerDisplayfields = "id,name,nfsServer?fields" // SnapshotDisplayFields to display the Snapshot fields SnapshotDisplayFields = "" /* 130-byte string literal not displayed */ // HostInitiatorsDisplayFields to display the HostInitiator fields HostInitiatorsDisplayFields = "id,health,type,initiatorId,isIgnored,parentHost,paths" // HostIPPortDisplayFields to display the HostIPPort fields HostIPPortDisplayFields = "id,address" // LicenseInfoDisplayFields to display License Info fields LicenseInfoDisplayFields = "isInstalled,isValid" // HostInitiatorPathDisplayFields to display the HostInitiatorPath fields HostInitiatorPathDisplayFields = "fcPort" // FcPortDisplayFields to display the FC Port fields FcPortDisplayFields = "wwn" // HostIOLimitFields to display host IO limit fields HostIOLimitFields = "id,name,description" // IscsiIPFields to display Iscsi IP fields IscsiIPFields = "id,ipAddress,type" // HostfieldsToQuery to display host fields HostfieldsToQuery = "id,name,description,fcHostInitiators,iscsiHostInitiators,hostIPPorts?fields" // StoragePoolFields to display Storage Pool fields StoragePoolFields = "" /* 162-byte string literal not displayed */ // SystemCapacityFields to display system capacity details SystemCapacityFields = "id,sizeFree,sizeTotal,sizeUsed,sizePreallocated,sizeSubscribed,totalLogicalSize" // MaximumVolumeSize to display limit and unit MaximumVolumeSize = "limitValue,unit" )
const ( ReadOnlyAccessType = AccessType("READ_ONLY") ReadWriteAccessType = AccessType("READ_WRITE") ReadOnlyRootAccessType = AccessType("READ_ONLY_ROOT") ReadWriteRootAccessType = AccessType("READ_WRITE_ROOT") )
AccessType constants
const ( NoneDefaultAccess = NFSShareDefaultAccess("0") ReadOnlyDefaultAccess = NFSShareDefaultAccess("1") ReadWriteDefaultAccess = NFSShareDefaultAccess("2") ReadOnlyRootDefaultAccess = NFSShareDefaultAccess("3") ReadWriteRootDefaultAccess = NFSShareDefaultAccess("4") )
NFSShareDefaultAccess constants
const ( LunNameMaxLength = 63 SnapForClone = "csi-snapforclone-" ThinProvisioning LicenseType = "THIN_PROVISIONING" DataReduction LicenseType = "DATA_REDUCTION" )
Constants
const (
FsNameMaxLength = 63
)
FsNameMaxLength provides the allowed max length for filesystem name
Variables ¶
var ( ErrorHostNotFound = errors.New("unable to find host") ErrorMultipleHostFound = errors.New("Found multiple hosts with same name. Delete the duplicate entries on the array") MultipleHostFoundErrorCode = "0x7d13158" HostNotFoundErrorCode = "0x7d13005" )
Host not found error variables
var AttachedSnapshotsErrorCode = "0x6000c17"
AttachedSnapshotsErrorCode stores error code for attached snapshots
var DependentClonesErrorCode = "0x6701673"
DependentClonesErrorCode stores error code of dependent clones
var ErrorCloningFailed = errors.New("volume Cloning Failed")
ErrorCloningFailed stores Cloning failed error message
var ErrorCreateSnapshotFailed = errors.New("create Snapshot Failed")
ErrorCreateSnapshotFailed stores Create snapshot failed error message
var ErrorDependentClones = errors.New("the specified volume cannot be deleted because it has one or more dependent thin clones")
ErrorDependentClones stores dependent clones error message
var ErrorFilesystemNotFound = errors.New("Unable to find filesystem")
ErrorFilesystemNotFound stores error for filesystem not found
var ErrorSnapshotNotFound = errors.New("Unable to find filesystem")
ErrorSnapshotNotFound stores Snapshot not found error
var ErrorVolumeNotFound = errors.New("Unable to find volume")
ErrorVolumeNotFound stores Volume not found error
var FilesystemNotFoundErrorCode = "0x7d13005"
FilesystemNotFoundErrorCode stores error code for filesystem not found
var LUNModifiedErrorCode = "0x6701500"
LUNModifiedErrorCode indicates that the requested operation has failed because the LUN has already been modified by another request.
var MarkFilesystemForDeletion = "csi-marked-filesystem-for-deletion(do not remove this from description)"
MarkFilesystemForDeletion stores filesystem for deletion mark
var MarkVolumeForDeletion = "csi-marked-vol-for-deletion"
MarkVolumeForDeletion stores mark of volume deletion
var NothingToModifyErrorCode = "0x6701020"
NothingToModifyErrorCode indicates that the user requested modification of the storage resource but the system found that there is nothing to modify.
var SnapshotNotFoundErrorCode = "0x7d13005"
SnapshotNotFoundErrorCode stores snapshot not found error code
var VolumeHostAccessErrorCode = "0x6701688"
VolumeHostAccessErrorCode indicates that the storage resource can still be accessed by one or more hosts. Remove all host access from the storage resource before attempting to delete it.
var VolumeNotFoundErrorCode = "0x7d13005"
VolumeNotFoundErrorCode stores Volume not found error code
Functions ¶
This section is empty.
Types ¶
type ConfigConnect ¶
ConfigConnect Struct holds the endpoint & credential info.
type FilesystemAccessType ¶ added in v1.3.0
type FilesystemAccessType int
FilesystemAccessType is integer
const ( BlockAccessType FilesystemAccessType = 0 // Parameter not applicable for block CheckpointAccessType FilesystemAccessType = 1 // Checkpoint access to enable access through a .ckpt folder in the file system. ProtocolAccessType FilesystemAccessType = 2 // Protocol access to enable access through a file share. )
FilesystemAccessType constants
type NFSShareDefaultAccess ¶ added in v1.2.0
type NFSShareDefaultAccess string
NFSShareDefaultAccess is string
type UnityClient ¶ added in v1.21.0
type UnityClient interface {
Authenticate(ctx context.Context, configConnect *ConfigConnect) error
BasicSystemInfo(ctx context.Context, configConnect *ConfigConnect) error
GetToken() string
SetToken(token string)
CreateFilesystem(ctx context.Context, name string, storagepool string, description string, nasServer string, size uint64, tieringPolicy int, hostIOSize int, supportedProtocol int, isThinEnabled bool, isDataReductionEnabled bool) (*types.Filesystem, error)
DeleteFilesystem(ctx context.Context, filesystemID string) error
ExpandFilesystem(ctx context.Context, filesystemID string, newSize uint64) error
FindFilesystemByID(ctx context.Context, filesystemID string) (*types.Filesystem, error)
FindFilesystemByName(ctx context.Context, filesystemName string) (*types.Filesystem, error)
FindNASServerByID(ctx context.Context, nasServerID string) (*types.NASServer, error)
GetFilesystemIDFromResID(ctx context.Context, filesystemResID string) (string, error)
FindHostByName(ctx context.Context, hostName string) (*types.Host, error)
CreateHost(ctx context.Context, hostName string, tenantID string) (*types.Host, error)
DeleteHost(ctx context.Context, hostName string) error
CreateHostIPPort(ctx context.Context, hostID, ip string) (*types.HostIPPort, error)
FindHostIPPortByID(ctx context.Context, hostIPID string) (*types.HostIPPort, error)
ListHostInitiators(ctx context.Context) ([]types.HostInitiator, error)
ListHosts(ctx context.Context) ([]types.Host, error)
FindHostInitiatorByName(ctx context.Context, wwnOrIqn string) (*types.HostInitiator, error)
FindHostInitiatorByID(ctx context.Context, wwnOrIqn string) (*types.HostInitiator, error)
CreateHostInitiator(ctx context.Context, hostID, wwnOrIqn string, initiatorType types.InitiatorType) (*types.HostInitiator, error)
ModifyHostInitiator(ctx context.Context, hostID string, initiator *types.HostInitiator) (*types.HostInitiator, error)
ModifyHostInitiatorByID(ctx context.Context, hostID, initiatorID string) (*types.HostInitiator, error)
FindHostInitiatorPathByID(ctx context.Context, initiatorPathID string) (*types.HostInitiatorPath, error)
FindFcPortByID(ctx context.Context, fcPortID string) (*types.FcPort, error)
FindTenants(ctx context.Context) (*types.TenantInfo, error)
ListIscsiIPInterfaces(ctx context.Context) ([]types.IPInterfaceEntries, error)
CreateRealTimeMetricsQuery(ctx context.Context, metricPaths []string, interval int) (*types.MetricQueryCreateResponse, error)
DeleteRealTimeMetricsQuery(ctx context.Context, queryID int) error
GetAllRealTimeMetricPaths(ctx context.Context) error
GetCapacity(ctx context.Context) (*types.SystemCapacityMetricsQueryResult, error)
GetMetricsCollection(ctx context.Context, queryID int) (*types.MetricQueryResult, error)
CopySnapshot(ctx context.Context, sourceSnapshotID string, name string) (*types.Snapshot, error)
CreateSnapshot(ctx context.Context, storageResourceID string, snapshotName string, description string, retentionDuration string) (*types.Snapshot, error)
CreateSnapshotWithFsAccesType(ctx context.Context, storageResourceID string, snapshotName string, _ string, retentionDuration string, filesystemAccessType FilesystemAccessType) (*types.Snapshot, error)
DeleteFilesystemAsSnapshot(ctx context.Context, snapshotID string, sourceFs *types.Filesystem) error
DeleteSnapshot(ctx context.Context, snapshotID string) error
FindSnapshotByID(ctx context.Context, snapshotID string) (*types.Snapshot, error)
FindSnapshotByName(ctx context.Context, snapshotName string) (*types.Snapshot, error)
ListSnapshots(ctx context.Context, startToken int, maxEntries int, sourceVolumeID string, snapshotID string) ([]types.Snapshot, int, error)
ModifySnapshot(ctx context.Context, snapshotID string, description string, retentionDuration string) error
ModifySnapshotAutoDeleteParameter(ctx context.Context, snapshotID string) error
FindStoragePoolByName(ctx context.Context, poolName string) (*types.StoragePool, error)
FindStoragePoolByID(ctx context.Context, poolID string) (*types.StoragePool, error)
CreateCloneFromVolume(ctx context.Context, name string, volID string) (*types.Volume, error)
CreateLun(ctx context.Context, name string, poolID string, description string, size uint64, fastVPTieringPolicy int, hostIOLimitID string, isThinEnabled bool, isDataReductionEnabled bool) (*types.Volume, error)
CreteLunThinClone(ctx context.Context, name string, snapID string, volID string) (*types.Volume, error)
DeleteVolume(ctx context.Context, volumeID string) error
ExpandVolume(ctx context.Context, volumeID string, newSize uint64) error
ExportVolume(ctx context.Context, volID string, hostID string) error
FindHostIOLimitByName(ctx context.Context, hostIoPolicyName string) (*types.IoLimitPolicy, error)
FindVolumeByID(ctx context.Context, volID string) (*types.Volume, error)
FindVolumeByName(ctx context.Context, volName string) (*types.Volume, error)
GetMaxVolumeSize(ctx context.Context, systemLimitID string) (*types.MaxVolumSizeInfo, error)
ListVolumes(ctx context.Context, startToken int, maxEntries int) ([]types.Volume, int, error)
ModifyVolumeExport(ctx context.Context, volID string, hostIDList []string) error
RenameVolume(ctx context.Context, newName string, volID string) error
UnexportVolume(ctx context.Context, volID string) error
GetAllNFSServers(ctx context.Context) (*types.NFSServersResponse, error)
}
UnityClient interface for Unity Client
func NewClient ¶
func NewClient(ctx context.Context) (UnityClient, error)
NewClient initialize the new REST Client with default options.
func NewClientWithArgs ¶
NewClientWithArgs initialize the new REST Client with the given arguments.
type UnityClientImpl ¶ added in v1.21.0
type UnityClientImpl struct {
// contains filtered or unexported fields
}
UnityClientImpl Struct holds the configuration & REST Client.
func (*UnityClientImpl) Authenticate ¶ added in v1.21.0
func (c *UnityClientImpl) Authenticate(ctx context.Context, configConnect *ConfigConnect) error
Authenticate make a REST API call [/loginSessionInfo] to Unity to get authenticate the given credentials. The response contains the EMC-CSRF-TOKEN and the client caches it for further communication.
func (*UnityClientImpl) BasicSystemInfo ¶ added in v1.21.0
func (c *UnityClientImpl) BasicSystemInfo(ctx context.Context, configConnect *ConfigConnect) error
BasicSystemInfo make a REST API call [/basicSystemInfo/instances] to Unity to check if array is responding.
func (*UnityClientImpl) CopySnapshot ¶ added in v1.21.0
func (c *UnityClientImpl) CopySnapshot(ctx context.Context, sourceSnapshotID, name string) (*types.Snapshot, error)
CopySnapshot - Creates a copy of the source snapshot which can be used for NFS export, and returns the ID of the copy snapshot
func (*UnityClientImpl) CreateCloneFromVolume ¶ added in v1.21.0
func (c *UnityClientImpl) CreateCloneFromVolume(ctx context.Context, name, volID string) (*types.Volume, error)
CreateCloneFromVolume - Volume cloning
func (*UnityClientImpl) CreateFilesystem ¶ added in v1.21.0
func (c *UnityClientImpl) CreateFilesystem(ctx context.Context, name, storagepool, description, nasServer string, size uint64, tieringPolicy, hostIOSize, supportedProtocol int, isThinEnabled, isDataReductionEnabled bool) (*types.Filesystem, error)
CreateFilesystem - Create a new filesystem on the array
func (*UnityClientImpl) CreateHost ¶ added in v1.21.0
func (c *UnityClientImpl) CreateHost(ctx context.Context, hostName string, tenantID string) (*types.Host, error)
CreateHost Create a new Host
func (*UnityClientImpl) CreateHostIPPort ¶ added in v1.21.0
func (c *UnityClientImpl) CreateHostIPPort(ctx context.Context, hostID, ip string) (*types.HostIPPort, error)
CreateHostIPPort - Create Host IP Port
func (*UnityClientImpl) CreateHostInitiator ¶ added in v1.21.0
func (c *UnityClientImpl) CreateHostInitiator(ctx context.Context, hostID, wwnOrIqn string, initiatorType types.InitiatorType) (*types.HostInitiator, error)
CreateHostInitiator - Create Host Initiator
func (*UnityClientImpl) CreateLun ¶ added in v1.21.0
func (c *UnityClientImpl) CreateLun(ctx context.Context, name, poolID, description string, size uint64, fastVPTieringPolicy int, hostIOLimitID string, isThinEnabled, isDataReductionEnabled bool, ) (*types.Volume, error)
CreateLun API create a Lun with the given arguments. Pre-validations: 1. Length of the Lun name should be less than 63 characters.
- Size of Lun should be in bytes.
func (*UnityClientImpl) CreateNFSShare ¶ added in v1.21.0
func (c *UnityClientImpl) CreateNFSShare(ctx context.Context, name, path, filesystemID string, nfsShareDefaultAccess NFSShareDefaultAccess) (*types.Filesystem, error)
CreateNFSShare - Create NFS Share for a File system
func (*UnityClientImpl) CreateNFSShareFromSnapshot ¶ added in v1.21.0
func (c *UnityClientImpl) CreateNFSShareFromSnapshot(ctx context.Context, name, path, snapshotID string, nfsShareDefaultAccess NFSShareDefaultAccess) (*types.NFSShare, error)
CreateNFSShareFromSnapshot - Create NFS Share for a File system Snapshot
func (*UnityClientImpl) CreateRealTimeMetricsQuery ¶ added in v1.21.0
func (c *UnityClientImpl) CreateRealTimeMetricsQuery(ctx context.Context, metricPaths []string, interval int) (*types.MetricQueryCreateResponse, error)
CreateRealTimeMetricsQuery create an MetricRealTime Collection of the given metric paths and collection interval.
- The GetMetricsCollection interface can be called to retrieve results.
- Example: POST api/types/metricRealTimeQuery/instances BODY: { "paths": ["sp.*.cpu.summary.busyTicks" ,"sp.*.cpu.summary.idleTicks"], "interval": 5 }
func (*UnityClientImpl) CreateSnapshot ¶ added in v1.21.0
func (c *UnityClientImpl) CreateSnapshot(ctx context.Context, storageResourceID, snapshotName, description, retentionDuration string) (*types.Snapshot, error)
CreateSnapshot creates a snapshot of a volume
Parameters:
- `storageResourceID` : the array to check - `name` : the value to search for
Returns: - *types.Snapshot - an error if create snapshot fails
func (*UnityClientImpl) CreateSnapshotWithFsAccesType ¶ added in v1.21.0
func (c *UnityClientImpl) CreateSnapshotWithFsAccesType(ctx context.Context, storageResourceID, snapshotName, _, retentionDuration string, filesystemAccessType FilesystemAccessType) (*types.Snapshot, error)
CreateSnapshotWithFsAccesType - Creates snashot with FsAccess type
func (*UnityClientImpl) CreteLunThinClone ¶ added in v1.21.0
func (c *UnityClientImpl) CreteLunThinClone(ctx context.Context, name, snapID, volID string) (*types.Volume, error)
CreteLunThinClone - Create a lun thin clone
func (*UnityClientImpl) DeleteFilesystem ¶ added in v1.21.0
func (c *UnityClientImpl) DeleteFilesystem(ctx context.Context, filesystemID string) error
DeleteFilesystem delete by its ID. If the Filesystem is not present on the array, an error will be returned.
func (*UnityClientImpl) DeleteFilesystemAsSnapshot ¶ added in v1.21.0
func (c *UnityClientImpl) DeleteFilesystemAsSnapshot(ctx context.Context, snapshotID string, sourceFs *types.Filesystem) error
DeleteFilesystemAsSnapshot - Delete Snapshots acting as filesystem on array
func (*UnityClientImpl) DeleteHost ¶ added in v1.21.0
func (c *UnityClientImpl) DeleteHost(ctx context.Context, hostName string) error
DeleteHost function is used only in unit tests
func (*UnityClientImpl) DeleteNFSShare ¶ added in v1.21.0
func (c *UnityClientImpl) DeleteNFSShare(ctx context.Context, filesystemID, nfsShareID string) error
DeleteNFSShare by its ID. If the NFSShare is not present on the array, an error will be returned.
func (*UnityClientImpl) DeleteNFSShareCreatedFromSnapshot ¶ added in v1.21.0
func (c *UnityClientImpl) DeleteNFSShareCreatedFromSnapshot(ctx context.Context, nfsShareID string) error
DeleteNFSShareCreatedFromSnapshot by its ID. If the NFSShare is not present on the array, an error will be returned.
func (*UnityClientImpl) DeleteRealTimeMetricsQuery ¶ added in v1.21.0
func (c *UnityClientImpl) DeleteRealTimeMetricsQuery(ctx context.Context, queryID int) error
DeleteRealTimeMetricsQuery deletes the MetricRealTime Collection of the given queryID. - Example: DELETE /api/instances/metricRealTimeQuery/37
func (*UnityClientImpl) DeleteSnapshot ¶ added in v1.21.0
func (c *UnityClientImpl) DeleteSnapshot(ctx context.Context, snapshotID string) error
DeleteSnapshot deletes a snapshot based on Snapshot ID
Parameters:
- `snapshotID` : User need to provide snapshot CLI Id.
Returns: - an error if delete snapshot fails
func (*UnityClientImpl) DeleteVolume ¶ added in v1.21.0
func (c *UnityClientImpl) DeleteVolume(ctx context.Context, volumeID string) error
DeleteVolume - Delete Volume by its ID. If the Volume is not present on the array, an error will be returned.
func (*UnityClientImpl) ExpandFilesystem ¶ added in v1.21.0
func (c *UnityClientImpl) ExpandFilesystem(ctx context.Context, filesystemID string, newSize uint64) error
ExpandFilesystem Filesystem Expand volume to provided capacity
func (*UnityClientImpl) ExpandVolume ¶ added in v1.21.0
ExpandVolume - Expand volume to provided capacity
func (*UnityClientImpl) ExportVolume ¶ added in v1.21.0
func (c *UnityClientImpl) ExportVolume(ctx context.Context, volID, hostID string) error
ExportVolume - Export volume to a host
func (*UnityClientImpl) FindFcPortByID ¶ added in v1.21.0
func (c *UnityClientImpl) FindFcPortByID(ctx context.Context, fcPortID string) (*types.FcPort, error)
FindFcPortByID Finds FC Port
func (*UnityClientImpl) FindFilesystemByID ¶ added in v1.21.0
func (c *UnityClientImpl) FindFilesystemByID(ctx context.Context, filesystemID string) (*types.Filesystem, error)
FindFilesystemByID - Find the Filesystem by it's Id. If the Filesystem is not found, an error will be returned.
func (*UnityClientImpl) FindFilesystemByName ¶ added in v1.21.0
func (c *UnityClientImpl) FindFilesystemByName(ctx context.Context, filesystemName string) (*types.Filesystem, error)
FindFilesystemByName - Find the Filesystem by it's name. If the Filesystem is not found, an error will be returned.
func (*UnityClientImpl) FindHostByName ¶ added in v1.21.0
FindHostByName Finds the Host by it's name. If the Host is not found, an error will be returned.
func (*UnityClientImpl) FindHostIOLimitByName ¶ added in v1.21.0
func (c *UnityClientImpl) FindHostIOLimitByName(ctx context.Context, hostIoPolicyName string) (*types.IoLimitPolicy, error)
FindHostIOLimitByName - Find Host IO limit
func (*UnityClientImpl) FindHostIPPortByID ¶ added in v1.21.0
func (c *UnityClientImpl) FindHostIPPortByID(ctx context.Context, hostIPID string) (*types.HostIPPort, error)
FindHostIPPortByID method to get host Ip port object from Unity by cli ID
func (*UnityClientImpl) FindHostInitiatorByID ¶ added in v1.21.0
func (c *UnityClientImpl) FindHostInitiatorByID(ctx context.Context, wwnOrIqn string) (*types.HostInitiator, error)
FindHostInitiatorByID - Find Host Initiator
func (*UnityClientImpl) FindHostInitiatorByName ¶ added in v1.21.0
func (c *UnityClientImpl) FindHostInitiatorByName(ctx context.Context, wwnOrIqn string) (*types.HostInitiator, error)
FindHostInitiatorByName - Find Host Initiator by name
func (*UnityClientImpl) FindHostInitiatorPathByID ¶ added in v1.21.0
func (c *UnityClientImpl) FindHostInitiatorPathByID(ctx context.Context, initiatorPathID string) (*types.HostInitiatorPath, error)
FindHostInitiatorPathByID Finds Host Initiator
func (*UnityClientImpl) FindNASServerByID ¶ added in v1.21.0
func (c *UnityClientImpl) FindNASServerByID(ctx context.Context, nasServerID string) (*types.NASServer, error)
FindNASServerByID - Find the NAS Server by it's Id. If the NAS Server is not found, an error will be returned.
func (*UnityClientImpl) FindNFSShareByID ¶ added in v1.21.0
func (c *UnityClientImpl) FindNFSShareByID(ctx context.Context, nfsShareID string) (*types.NFSShare, error)
FindNFSShareByID - Find the NFS Share by it's Id. If the NFS Share is not found, an error will be returned.
func (*UnityClientImpl) FindNFSShareByName ¶ added in v1.21.0
func (c *UnityClientImpl) FindNFSShareByName(ctx context.Context, nfsSharename string) (*types.NFSShare, error)
FindNFSShareByName - Find the NFS Share by it's name. If the NFS Share is not found, an error will be returned.
func (*UnityClientImpl) FindSnapshotByID ¶ added in v1.21.0
func (c *UnityClientImpl) FindSnapshotByID(ctx context.Context, snapshotID string) (*types.Snapshot, error)
FindSnapshotByID - To find snapshot using snapshot-id
func (*UnityClientImpl) FindSnapshotByName ¶ added in v1.21.0
func (c *UnityClientImpl) FindSnapshotByName(ctx context.Context, snapshotName string) (*types.Snapshot, error)
FindSnapshotByName - To find snapshot using snapshot-name
func (*UnityClientImpl) FindStoragePoolByID ¶ added in v1.21.0
func (c *UnityClientImpl) FindStoragePoolByID(ctx context.Context, poolID string) (*types.StoragePool, error)
FindStoragePoolByID - Find the volume by it's Id. If the volume is not found, an error will be returned.
func (*UnityClientImpl) FindStoragePoolByName ¶ added in v1.21.0
func (c *UnityClientImpl) FindStoragePoolByName(ctx context.Context, poolName string) (*types.StoragePool, error)
FindStoragePoolByName - Find the volume by it's name. If the volume is not found, an error will be returned.
func (*UnityClientImpl) FindTenants ¶ added in v1.21.0
func (c *UnityClientImpl) FindTenants(ctx context.Context) (*types.TenantInfo, error)
FindTenants finds tenants
func (*UnityClientImpl) FindVolumeByID ¶ added in v1.21.0
FindVolumeByID - Find the volume by it's Id. If the volume is not found, an error will be returned.
func (*UnityClientImpl) FindVolumeByName ¶ added in v1.21.0
func (c *UnityClientImpl) FindVolumeByName(ctx context.Context, volName string) (*types.Volume, error)
FindVolumeByName - Find the volume by it's name. If the volume is not found, an error will be returned.
func (*UnityClientImpl) GetAllNFSServers ¶ added in v1.22.0
func (c *UnityClientImpl) GetAllNFSServers(ctx context.Context) (*types.NFSServersResponse, error)
func (*UnityClientImpl) GetAllRealTimeMetricPaths ¶ added in v1.21.0
func (c *UnityClientImpl) GetAllRealTimeMetricPaths(ctx context.Context) error
GetAllRealTimeMetricPaths gets all the Unity Metric paths. Consider using for debugging or enumerating metrics. This will take a bit of time to complete. - /api/types/metric/instances?compact=true&filter=isRealtimeAvailable eq true
func (*UnityClientImpl) GetCapacity ¶ added in v1.21.0
func (c *UnityClientImpl) GetCapacity(ctx context.Context) (*types.SystemCapacityMetricsQueryResult, error)
GetCapacity gets Unity capacity metrics at the system level. - Example: GET /api/types/systemCapacity/instances?fields=id,sizeFree,sizeTotal,sizeUsed,sizePreallocated,sizeSubscribed,totalLogicalSize
func (*UnityClientImpl) GetFilesystemIDFromResID ¶ added in v1.21.0
func (c *UnityClientImpl) GetFilesystemIDFromResID(ctx context.Context, filesystemResID string) (string, error)
GetFilesystemIDFromResID - Returns the filesystem ID for the filesystem
func (*UnityClientImpl) GetMaxVolumeSize ¶ added in v1.21.0
func (c *UnityClientImpl) GetMaxVolumeSize(ctx context.Context, systemLimitID string) (*types.MaxVolumSizeInfo, error)
GetMaxVolumeSize - Returns the max size of a volume supported by the array
func (*UnityClientImpl) GetMetricsCollection ¶ added in v1.21.0
func (c *UnityClientImpl) GetMetricsCollection(ctx context.Context, queryID int) (*types.MetricQueryResult, error)
GetMetricsCollection gets Unity MetricsCollection of the provided 'queryID'. - The MetricCollection should exist already or you can create one using CreateXXXMetricsQuery. - Example: GET /api/types/metricQueryResult/instances?filter=queryId eq 37
func (*UnityClientImpl) GetToken ¶ added in v1.21.0
func (c *UnityClientImpl) GetToken() string
GetToken function gets token
func (*UnityClientImpl) ListHostInitiators ¶ added in v1.21.0
func (c *UnityClientImpl) ListHostInitiators(ctx context.Context) ([]types.HostInitiator, error)
ListHostInitiators lists all host initiators
func (*UnityClientImpl) ListIscsiIPInterfaces ¶ added in v1.21.0
func (c *UnityClientImpl) ListIscsiIPInterfaces(ctx context.Context) ([]types.IPInterfaceEntries, error)
ListIscsiIPInterfaces - List the IpnInterfaces configured on the array
func (*UnityClientImpl) ListSnapshots ¶ added in v1.21.0
func (c *UnityClientImpl) ListSnapshots(ctx context.Context, startToken int, maxEntries int, sourceVolumeID, snapshotID string) ([]types.Snapshot, int, error)
ListSnapshots lists all snapshots based on Snapshot ID or source-volume-id Returns a chunk of data on a single page, as specified by the maxEntries and page (startToken) parameters.
func (*UnityClientImpl) ListVolumes ¶ added in v1.21.0
func (c *UnityClientImpl) ListVolumes(ctx context.Context, startToken int, maxEntries int) ([]types.Volume, int, error)
ListVolumes - list volumes
func (*UnityClientImpl) ModifyHostInitiator ¶ added in v1.21.0
func (c *UnityClientImpl) ModifyHostInitiator(ctx context.Context, hostID string, initiator *types.HostInitiator) (*types.HostInitiator, error)
ModifyHostInitiator - WILL BE DEPRECATED
func (*UnityClientImpl) ModifyHostInitiatorByID ¶ added in v1.21.0
func (c *UnityClientImpl) ModifyHostInitiatorByID(ctx context.Context, hostID, initiatorID string) (*types.HostInitiator, error)
ModifyHostInitiatorByID function modifies host initiator by ID
func (*UnityClientImpl) ModifyNFSShareCreatedFromSnapshotHostAccess ¶ added in v1.21.0
func (c *UnityClientImpl) ModifyNFSShareCreatedFromSnapshotHostAccess(ctx context.Context, nfsShareID string, hostIDs []string, accessType AccessType) error
ModifyNFSShareCreatedFromSnapshotHostAccess - Modify the host access on NFS Share
func (*UnityClientImpl) ModifyNFSShareHostAccess ¶ added in v1.21.0
func (c *UnityClientImpl) ModifyNFSShareHostAccess(ctx context.Context, filesystemID, nfsShareID string, hostIDs []string, accessType AccessType) error
ModifyNFSShareHostAccess - Modify the host access on NFS Share
func (*UnityClientImpl) ModifySnapshot ¶ added in v1.21.0
func (c *UnityClientImpl) ModifySnapshot(ctx context.Context, snapshotID, description, retentionDuration string) error
ModifySnapshot - Modify Snapshot's description and retention duration parameters
func (*UnityClientImpl) ModifySnapshotAutoDeleteParameter ¶ added in v1.21.0
func (c *UnityClientImpl) ModifySnapshotAutoDeleteParameter(ctx context.Context, snapshotID string) error
ModifySnapshotAutoDeleteParameter - Modify Snapshot (currently used to disable auto-delete parameter)
func (*UnityClientImpl) ModifyVolumeExport ¶ added in v1.21.0
func (c *UnityClientImpl) ModifyVolumeExport(ctx context.Context, volID string, hostIDList []string) error
ModifyVolumeExport - Export volume to multiple hosts / Modify the host access list on a given Volume
func (*UnityClientImpl) RenameVolume ¶ added in v1.21.0
func (c *UnityClientImpl) RenameVolume(ctx context.Context, newName, volID string) error
RenameVolume - Rename Volume
func (*UnityClientImpl) SetToken ¶ added in v1.21.0
func (c *UnityClientImpl) SetToken(token string)
SetToken function sets token
func (*UnityClientImpl) UnexportVolume ¶ added in v1.21.0
func (c *UnityClientImpl) UnexportVolume(ctx context.Context, volID string) error
UnexportVolume - Unexport volume