Documentation
¶
Index ¶
- Constants
- Variables
- type AccessType
- type Client
- type ConfigConnect
- type Filesystem
- func (f *Filesystem) CreateFilesystem(ctx context.Context, name, storagepool, description, nasServer string, ...) (*types.Filesystem, error)
- func (f *Filesystem) CreateNFSShare(ctx context.Context, name, path, filesystemID string, ...) (*types.Filesystem, error)
- func (f *Filesystem) CreateNFSShareFromSnapshot(ctx context.Context, name, path, snapshotID string, ...) (*types.NFSShare, error)
- func (f *Filesystem) DeleteFilesystem(ctx context.Context, filesystemID string) error
- func (f *Filesystem) DeleteNFSShare(ctx context.Context, filesystemID, nfsShareID string) error
- func (f *Filesystem) DeleteNFSShareCreatedFromSnapshot(ctx context.Context, nfsShareID string) error
- func (f *Filesystem) ExpandFilesystem(ctx context.Context, filesystemID string, newSize uint64) error
- func (f *Filesystem) FindFilesystemByID(ctx context.Context, filesystemID string) (*types.Filesystem, error)
- func (f *Filesystem) FindFilesystemByName(ctx context.Context, filesystemName string) (*types.Filesystem, error)
- func (f *Filesystem) FindNASServerByID(ctx context.Context, nasServerID string) (*types.NASServer, error)
- func (f *Filesystem) FindNFSShareByID(ctx context.Context, nfsShareID string) (*types.NFSShare, error)
- func (f *Filesystem) FindNFSShareByName(ctx context.Context, nfsSharename string) (*types.NFSShare, error)
- func (f *Filesystem) GetFilesystemIDFromResID(ctx context.Context, filesystemResID string) (string, error)
- func (f *Filesystem) ModifyNFSShareCreatedFromSnapshotHostAccess(ctx context.Context, nfsShareID string, hostIDs []string, ...) error
- func (f *Filesystem) ModifyNFSShareHostAccess(ctx context.Context, filesystemID, nfsShareID string, hostIDs []string, ...) error
- type FilesystemAccessType
- type Host
- func (h *Host) CreateHost(ctx context.Context, hostName string, tenantID string) (*types.Host, error)
- func (h *Host) CreateHostIPPort(ctx context.Context, hostID, ip string) (*types.HostIPPort, error)
- func (h *Host) CreateHostInitiator(ctx context.Context, hostID, wwnOrIqn string, ...) (*types.HostInitiator, error)
- func (h *Host) DeleteHost(ctx context.Context, hostName string) error
- func (h *Host) FindFcPortByID(ctx context.Context, fcPortID string) (*types.FcPort, error)
- func (h *Host) FindHostByName(ctx context.Context, hostName string) (*types.Host, error)
- func (h *Host) FindHostIPPortByID(ctx context.Context, hostIPID string) (*types.HostIPPort, error)
- func (h *Host) FindHostInitiatorByID(ctx context.Context, wwnOrIqn string) (*types.HostInitiator, error)
- func (h *Host) FindHostInitiatorByName(ctx context.Context, wwnOrIqn string) (*types.HostInitiator, error)
- func (h *Host) FindHostInitiatorPathByID(ctx context.Context, initiatorPathID string) (*types.HostInitiatorPath, error)
- func (h *Host) FindTenants(ctx context.Context) (*types.TenantInfo, error)
- func (h *Host) ListHostInitiators(ctx context.Context) ([]types.HostInitiator, error)
- func (h *Host) ModifyHostInitiator(ctx context.Context, hostID string, initiator *types.HostInitiator) (*types.HostInitiator, error)
- func (h *Host) ModifyHostInitiatorByID(ctx context.Context, hostID, initiatorID string) (*types.HostInitiator, error)
- type Ipinterface
- type LicenseType
- type Metrics
- func (m *Metrics) CreateRealTimeMetricsQuery(ctx context.Context, metricPaths []string, interval int) (*types.MetricQueryCreateResponse, error)
- func (m *Metrics) DeleteRealTimeMetricsQuery(ctx context.Context, queryID int) error
- func (m *Metrics) GetAllRealTimeMetricPaths(ctx context.Context) error
- func (m *Metrics) GetCapacity(ctx context.Context) (*types.SystemCapacityMetricsQueryResult, error)
- func (m *Metrics) GetMetricsCollection(ctx context.Context, queryID int) (*types.MetricQueryResult, error)
- type NFSShareDefaultAccess
- type Snapshot
- func (s *Snapshot) CopySnapshot(ctx context.Context, sourceSnapshotID, name string) (*types.Snapshot, error)
- func (s *Snapshot) CreateSnapshot(ctx context.Context, ...) (*types.Snapshot, error)
- func (s *Snapshot) CreateSnapshotWithFsAccesType(ctx context.Context, ...) (*types.Snapshot, error)
- func (s *Snapshot) DeleteFilesystemAsSnapshot(ctx context.Context, snapshotID string, sourceFs *types.Filesystem) error
- func (s *Snapshot) DeleteSnapshot(ctx context.Context, snapshotID string) error
- func (s *Snapshot) FindSnapshotByID(ctx context.Context, snapshotID string) (*types.Snapshot, error)
- func (s *Snapshot) FindSnapshotByName(ctx context.Context, snapshotName string) (*types.Snapshot, error)
- func (s *Snapshot) ListSnapshots(ctx context.Context, startToken int, maxEntries int, ...) ([]types.Snapshot, int, error)
- func (s *Snapshot) ModifySnapshot(ctx context.Context, snapshotID, description, retentionDuration string) error
- func (s *Snapshot) ModifySnapshotAutoDeleteParameter(ctx context.Context, snapshotID string) error
- type Storagepool
- type Volume
- func (v *Volume) CreateCloneFromVolume(ctx context.Context, name, volID string) (*types.Volume, error)
- func (v *Volume) CreateLun(ctx context.Context, name, poolID, description string, size uint64, ...) (*types.Volume, error)
- func (v *Volume) CreteLunThinClone(ctx context.Context, name, snapID, volID string) (*types.Volume, error)
- func (v *Volume) DeleteVolume(ctx context.Context, volumeID string) error
- func (v *Volume) ExpandVolume(ctx context.Context, volumeID string, newSize uint64) error
- func (v *Volume) ExportVolume(ctx context.Context, volID, hostID string) error
- func (v *Volume) FindHostIOLimitByName(ctx context.Context, hostIoPolicyName string) (*types.IoLimitPolicy, error)
- func (v *Volume) FindVolumeByID(ctx context.Context, volID string) (*types.Volume, error)
- func (v *Volume) FindVolumeByName(ctx context.Context, volName string) (*types.Volume, error)
- func (v *Volume) GetMaxVolumeSize(ctx context.Context, systemLimitID string) (*types.MaxVolumSizeInfo, error)
- func (v *Volume) ListVolumes(ctx context.Context, startToken int, maxEntries int) ([]types.Volume, int, error)
- func (v *Volume) ModifyVolumeExport(ctx context.Context, volID string, hostIDList []string) error
- func (v *Volume) RenameVolume(ctx context.Context, newName, volID string) error
- func (v *Volume) 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 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 SnapshotNotFoundErrorCode = "0x7d13005"
SnapshotNotFoundErrorCode stores snapshot not found error code
var VolumeNotFoundErrorCode = "0x7d13005"
VolumeNotFoundErrorCode stores Volume not found error code
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client Struct holds the configuration & REST Client.
func NewClientWithArgs ¶
func NewClientWithArgs(ctx context.Context, endpoint string, insecure bool) (client *Client, err error)
NewClientWithArgs initialize the new REST Client with the given arguments.
func (*Client) Authenticate ¶
func (c *Client) 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.
type ConfigConnect ¶
ConfigConnect Struct holds the endpoint & credential info.
type Filesystem ¶ added in v1.9.0
type Filesystem struct {
// contains filtered or unexported fields
}
Filesystem structure
func NewFilesystem ¶ added in v1.1.0
func NewFilesystem(client *Client) *Filesystem
NewFilesystem function returns filesystem
func (*Filesystem) CreateFilesystem ¶ added in v1.9.0
func (f *Filesystem) 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 (*Filesystem) CreateNFSShare ¶ added in v1.9.0
func (f *Filesystem) CreateNFSShare(ctx context.Context, name, path, filesystemID string, nfsShareDefaultAccess NFSShareDefaultAccess) (*types.Filesystem, error)
CreateNFSShare - Create NFS Share for a File system
func (*Filesystem) CreateNFSShareFromSnapshot ¶ added in v1.9.0
func (f *Filesystem) CreateNFSShareFromSnapshot(ctx context.Context, name, path, snapshotID string, nfsShareDefaultAccess NFSShareDefaultAccess) (*types.NFSShare, error)
CreateNFSShareFromSnapshot - Create NFS Share for a File system Snapshot
func (*Filesystem) DeleteFilesystem ¶ added in v1.9.0
func (f *Filesystem) 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 (*Filesystem) DeleteNFSShare ¶ added in v1.9.0
func (f *Filesystem) 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 (*Filesystem) DeleteNFSShareCreatedFromSnapshot ¶ added in v1.9.0
func (f *Filesystem) 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 (*Filesystem) ExpandFilesystem ¶ added in v1.9.0
func (f *Filesystem) ExpandFilesystem(ctx context.Context, filesystemID string, newSize uint64) error
ExpandFilesystem Filesystem Expand volume to provided capacity
func (*Filesystem) FindFilesystemByID ¶ added in v1.9.0
func (f *Filesystem) 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 (*Filesystem) FindFilesystemByName ¶ added in v1.9.0
func (f *Filesystem) 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 (*Filesystem) FindNASServerByID ¶ added in v1.9.0
func (f *Filesystem) 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 (*Filesystem) FindNFSShareByID ¶ added in v1.9.0
func (f *Filesystem) 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 (*Filesystem) FindNFSShareByName ¶ added in v1.9.0
func (f *Filesystem) 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 (*Filesystem) GetFilesystemIDFromResID ¶ added in v1.9.0
func (f *Filesystem) GetFilesystemIDFromResID(ctx context.Context, filesystemResID string) (string, error)
GetFilesystemIDFromResID - Returns the filesystem ID for the filesystem
func (*Filesystem) ModifyNFSShareCreatedFromSnapshotHostAccess ¶ added in v1.9.0
func (f *Filesystem) ModifyNFSShareCreatedFromSnapshotHostAccess(ctx context.Context, nfsShareID string, hostIDs []string, accessType AccessType) error
ModifyNFSShareCreatedFromSnapshotHostAccess - Modify the host access on NFS Share
func (*Filesystem) ModifyNFSShareHostAccess ¶ added in v1.9.0
func (f *Filesystem) ModifyNFSShareHostAccess(ctx context.Context, filesystemID, nfsShareID string, hostIDs []string, accessType AccessType) error
ModifyNFSShareHostAccess - Modify the host access on NFS Share
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 Host ¶ added in v1.9.0
type Host struct {
// contains filtered or unexported fields
}
Host Structure
func (*Host) CreateHost ¶ added in v1.9.0
func (h *Host) CreateHost(ctx context.Context, hostName string, tenantID string) (*types.Host, error)
CreateHost Create a new Host
func (*Host) CreateHostIPPort ¶ added in v1.9.0
CreateHostIPPort - Create Host IP Port
func (*Host) CreateHostInitiator ¶ added in v1.9.0
func (h *Host) CreateHostInitiator(ctx context.Context, hostID, wwnOrIqn string, initiatorType types.InitiatorType) (*types.HostInitiator, error)
CreateHostInitiator - Create Host Initiator
func (*Host) DeleteHost ¶ added in v1.9.0
DeleteHost function is used only in unit tests
func (*Host) FindFcPortByID ¶ added in v1.9.0
FindFcPortByID Finds FC Port
func (*Host) FindHostByName ¶ added in v1.9.0
FindHostByName Finds the Host by it's name. If the Host is not found, an error will be returned.
func (*Host) FindHostIPPortByID ¶ added in v1.9.0
FindHostIPPortByID method to get host Ip port object from Unity by cli ID
func (*Host) FindHostInitiatorByID ¶ added in v1.9.0
func (h *Host) FindHostInitiatorByID(ctx context.Context, wwnOrIqn string) (*types.HostInitiator, error)
FindHostInitiatorByID - Find Host Initiator
func (*Host) FindHostInitiatorByName ¶ added in v1.9.0
func (h *Host) FindHostInitiatorByName(ctx context.Context, wwnOrIqn string) (*types.HostInitiator, error)
FindHostInitiatorByName - Find Host Initiator by name
func (*Host) FindHostInitiatorPathByID ¶ added in v1.9.0
func (h *Host) FindHostInitiatorPathByID(ctx context.Context, initiatorPathID string) (*types.HostInitiatorPath, error)
FindHostInitiatorPathByID Finds Host Initiator
func (*Host) FindTenants ¶ added in v1.9.0
FindTenants finds tenants
func (*Host) ListHostInitiators ¶ added in v1.9.0
ListHostInitiators lists all host initiators
func (*Host) ModifyHostInitiator ¶ added in v1.9.0
func (h *Host) ModifyHostInitiator(ctx context.Context, hostID string, initiator *types.HostInitiator) (*types.HostInitiator, error)
ModifyHostInitiator - WILL BE DEPRECATED
func (*Host) ModifyHostInitiatorByID ¶ added in v1.9.0
func (h *Host) ModifyHostInitiatorByID(ctx context.Context, hostID, initiatorID string) (*types.HostInitiator, error)
ModifyHostInitiatorByID function modifies host initiator by ID
type Ipinterface ¶ added in v1.9.0
type Ipinterface struct {
// contains filtered or unexported fields
}
Ipinterface structure
func NewIPInterface ¶ added in v1.9.0
func NewIPInterface(client *Client) *Ipinterface
NewIPInterface returns IP interface
func (*Ipinterface) ListIscsiIPInterfaces ¶ added in v1.9.0
func (f *Ipinterface) ListIscsiIPInterfaces(ctx context.Context) ([]types.IPInterfaceEntries, error)
ListIscsiIPInterfaces - List the IpnInterfaces configured on the array
type Metrics ¶ added in v1.9.0
type Metrics struct {
// contains filtered or unexported fields
}
Metrics structure
func NewMetrics ¶ added in v1.6.0
NewMetrics returns a new instance of the Unity Metric query interface.
func (*Metrics) CreateRealTimeMetricsQuery ¶ added in v1.9.0
func (m *Metrics) 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 (*Metrics) DeleteRealTimeMetricsQuery ¶ added in v1.9.0
DeleteRealTimeMetricsQuery deletes the MetricRealTime Collection of the given queryID. - Example: DELETE /api/instances/metricRealTimeQuery/37
func (*Metrics) GetAllRealTimeMetricPaths ¶ added in v1.9.0
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 (*Metrics) GetCapacity ¶ added in v1.15.0
GetCapacity gets Unity capacity metrics at the system level. - Example: GET /api/types/systemCapacity/instances?fields=id,sizeFree,sizeTotal,sizeUsed,sizePreallocated,sizeSubscribed,totalLogicalSize
func (*Metrics) GetMetricsCollection ¶ added in v1.9.0
func (m *Metrics) 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
type NFSShareDefaultAccess ¶ added in v1.2.0
type NFSShareDefaultAccess string
NFSShareDefaultAccess is string
type Snapshot ¶ added in v1.9.0
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot structure
func (*Snapshot) CopySnapshot ¶ added in v1.9.0
func (s *Snapshot) 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 (*Snapshot) CreateSnapshot ¶ added in v1.9.0
func (s *Snapshot) 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 (*Snapshot) CreateSnapshotWithFsAccesType ¶ added in v1.9.0
func (s *Snapshot) CreateSnapshotWithFsAccesType(ctx context.Context, storageResourceID, snapshotName, description, retentionDuration string, filesystemAccessType FilesystemAccessType) (*types.Snapshot, error)
CreateSnapshotWithFsAccesType - Creates snashot with FsAccess type
func (*Snapshot) DeleteFilesystemAsSnapshot ¶ added in v1.9.0
func (s *Snapshot) DeleteFilesystemAsSnapshot(ctx context.Context, snapshotID string, sourceFs *types.Filesystem) error
DeleteFilesystemAsSnapshot - Delete Snapshots acting as filesystem on array
func (*Snapshot) DeleteSnapshot ¶ added in v1.9.0
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 (*Snapshot) FindSnapshotByID ¶ added in v1.9.0
func (s *Snapshot) FindSnapshotByID(ctx context.Context, snapshotID string) (*types.Snapshot, error)
FindSnapshotByID - To find snapshot using snapshot-id
func (*Snapshot) FindSnapshotByName ¶ added in v1.9.0
func (s *Snapshot) FindSnapshotByName(ctx context.Context, snapshotName string) (*types.Snapshot, error)
FindSnapshotByName - To find snapshot using snapshot-name
func (*Snapshot) ListSnapshots ¶ added in v1.9.0
func (s *Snapshot) 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.
type Storagepool ¶ added in v1.9.0
type Storagepool struct {
// contains filtered or unexported fields
}
Storagepool structure
func NewStoragePool ¶
func NewStoragePool(client *Client) *Storagepool
NewStoragePool returns storagepool
func (*Storagepool) FindStoragePoolByID ¶ added in v1.9.0
func (sp *Storagepool) 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 (*Storagepool) FindStoragePoolByName ¶ added in v1.9.0
func (sp *Storagepool) 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.
type Volume ¶ added in v1.9.0
type Volume struct {
// contains filtered or unexported fields
}
Volume structure
func (*Volume) CreateCloneFromVolume ¶ added in v1.9.0
func (v *Volume) CreateCloneFromVolume(ctx context.Context, name, volID string) (*types.Volume, error)
CreateCloneFromVolume - Volume cloning
func (*Volume) CreateLun ¶ added in v1.9.0
func (v *Volume) 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 (*Volume) CreteLunThinClone ¶ added in v1.9.0
func (v *Volume) CreteLunThinClone(ctx context.Context, name, snapID, volID string) (*types.Volume, error)
CreteLunThinClone - Create a lun thin clone
func (*Volume) DeleteVolume ¶ added in v1.9.0
DeleteVolume - Delete Volume by its ID. If the Volume is not present on the array, an error will be returned.
func (*Volume) ExpandVolume ¶ added in v1.9.0
ExpandVolume - Expand volume to provided capacity
func (*Volume) ExportVolume ¶ added in v1.9.0
ExportVolume - Export volume to a host
func (*Volume) FindHostIOLimitByName ¶ added in v1.9.0
func (v *Volume) FindHostIOLimitByName(ctx context.Context, hostIoPolicyName string) (*types.IoLimitPolicy, error)
FindHostIOLimitByName - Find Host IO limit
func (*Volume) FindVolumeByID ¶ added in v1.9.0
FindVolumeByID - Find the volume by it's Id. If the volume is not found, an error will be returned.
func (*Volume) FindVolumeByName ¶ added in v1.9.0
FindVolumeByName - Find the volume by it's name. If the volume is not found, an error will be returned.
func (*Volume) GetMaxVolumeSize ¶ added in v1.16.0
func (v *Volume) GetMaxVolumeSize(ctx context.Context, systemLimitID string) (*types.MaxVolumSizeInfo, error)
GetMaxVolumeSize - Returns the max size of a volume supported by the array
func (*Volume) ListVolumes ¶ added in v1.9.0
func (v *Volume) ListVolumes(ctx context.Context, startToken int, maxEntries int) ([]types.Volume, int, error)
ListVolumes - list volumes
func (*Volume) ModifyVolumeExport ¶ added in v1.9.0
ModifyVolumeExport - Export volume to multiple hosts / Modify the host access list on a given Volume
func (*Volume) RenameVolume ¶ added in v1.9.0
RenameVolume - Rename Volume