api

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Overview

DO NOT EDIT: Auto generated using 'ifacemaker -f ontap_rest.go -s RestClient -i RestClientInterface -p api'

Index

Constants

View Source
const (
	DefaultZapiRecords   = 100
	MaxZapiRecords       = 0xfffffffe
	NumericalValueNotSet = -1

	MaxNASLabelLength = 1023
	MaxSANLabelLength = 254

	// errors
	ESNAPSHOTBUSY_REST = "1638555"

	SVMSubtypeSyncSource      = "sync_source"
	SVMSubtypeSyncDestination = "sync_destination"
)
View Source
const (
	SnapmirrorStateUninitialized = SnapmirrorState("uninitialized")
	SnapmirrorStateSnapmirrored  = SnapmirrorState("snapmirrored")
	SnapmirrorStateBroken        = SnapmirrorState("broken-off")
)
View Source
const (
	SnapmirrorStatusIdle         = SnapmirrorStatus("idle")
	SnapmirrorStatusAborting     = SnapmirrorStatus("aborting")
	SnapmirrorStatusBreaking     = SnapmirrorStatus("breaking")
	SnapmirrorStatusQuiescing    = SnapmirrorStatus("quiescing")
	SnapmirrorStatusTransferring = SnapmirrorStatus("transferring")
)
View Source
const (
	SnapmirrorPolicyTypeSync  = SnapmirrorPolicyType("sync_mirror")
	SnapmirrorPolicyTypeAsync = SnapmirrorPolicyType("async_mirror")
)
View Source
const (
	SnapmirrorPolicyRuleAll = "all_source_snapshots"
)

Variables

View Source
var (
	// must be string pointers, but cannot take address of a const, so don't modify these at runtime!
	LifOperationalStatusUp   = "up"
	LifOperationalStatusDown = "down"
)
View Source
var FakeIgroups map[string]map[string]struct{}
View Source
var MinimumONTAPVersion = utils.MustParseSemantic("9.11.1")

Functions

func ApiError

func ApiError(message string) error

func EnsureSVMWithRest

func EnsureSVMWithRest(
	ctx context.Context, ontapConfig *drivers.OntapStorageDriverConfig, restClient RestClientInterface,
) error

EnsureSVMWithRest uses the supplied SVM or attempts to derive one if no SVM is supplied

func ExtractErrorResponse

func ExtractErrorResponse(ctx context.Context, restError interface{}) (errorResponse *models.ErrorResponse, errorOut error)

ExtractErrorResponse returns any underlying *models.ErrorResponse from the supplied restError

func GetError

func GetError(ctx context.Context, response *APIResponse, errorIn error) (errorOut error)

GetError inspects the supplied *APIResponse and error parameters to determine if an error occurred

func HasNextLink(restResult interface{}) (result bool)

HasNextLink checks if restResult.Links.Next exists using reflection

func IsApiError

func IsApiError(err error) bool

func IsNotFoundError

func IsNotFoundError(err error) bool

func IsNotReadyError

func IsNotReadyError(err error) bool

func IsSnapshotBusyError

func IsSnapshotBusyError(err error) bool

func IsTooManyLunsError

func IsTooManyLunsError(err error) bool

func IsVolumeCreateJobExistsError

func IsVolumeCreateJobExistsError(err error) bool

func IsVolumeIdAttributesReadError

func IsVolumeIdAttributesReadError(err error) bool

func IsVolumeReadError

func IsVolumeReadError(err error) bool

func IsVolumeSpaceAttributesReadError

func IsVolumeSpaceAttributesReadError(err error) bool

func NewFakeUnstartedVserver

func NewFakeUnstartedVserver(ctx context.Context, vserverAdminHost, vserverAggrName string) *httptest.Server

func NewParamWrapper

func NewParamWrapper(
	originalParams runtime.ClientRequestWriter, next *models.Href,
) runtime.ClientRequestWriter

NewParamWrapper is a factory function to create a new instance of ParamWrapper

func NotFoundError

func NotFoundError(message string) error

func NotReadyError

func NotReadyError(message string) error

func SnapshotBusyError

func SnapshotBusyError(message string) error

func ToBoolPointer

func ToBoolPointer(b bool) *bool

ToBoolPointer returns a pointer to the supplied bool

func ToExportAuthenticationFlavorSlice

func ToExportAuthenticationFlavorSlice(authFlavor []string) []models.ExportAuthenticationFlavor

ToExportAuthenticationFlavorSlice converts a slice of strings into a slice of ExportAuthenticationFlavor

func ToInt64Pointer

func ToInt64Pointer(i int) *int64

ToInt64Pointer returns an int64 pointer to the supplied int

func ToSliceStringPointer

func ToSliceStringPointer(slice []string) []*string

ToSliceStringPointer returns a slice of strings converted into a slice of string pointers

func ToSliceVolumeAggregatesItems

func ToSliceVolumeAggregatesItems(aggrs []string) []*models.VolumeAggregatesItems0

func ToStringPointer

func ToStringPointer(s string) *string

ToStringPointer returns a pointer to the supplied string

func TooManyLunsError

func TooManyLunsError(message string) error

func ValidatePayloadExists

func ValidatePayloadExists(ctx context.Context, restResult interface{}) (errorOut error)

ValidatePayloadExists returns an error if the Payload field is missing from the supplied restResult

func VolumeCreateJobExistsError

func VolumeCreateJobExistsError(message string) error

func VolumeIdAttributesReadError

func VolumeIdAttributesReadError(message string) error

func VolumeReadError

func VolumeReadError(message string) error

func VolumeSpaceAttributesReadError

func VolumeSpaceAttributesReadError(message string) error
func WithNextLink(next *models.Href) func(*runtime.ClientOperation)

Types

type APIResponse

type APIResponse struct {
	// contains filtered or unexported fields
}

func NewAPIResponse

func NewAPIResponse(status, reason, errno string) *APIResponse

NewAPIResponse factory method to create a new instance of an APIResponse

func (APIResponse) APIName

func (o APIResponse) APIName() string

func (APIResponse) Errno

func (o APIResponse) Errno() string

func (APIResponse) Reason

func (o APIResponse) Reason() string

func (APIResponse) Status

func (o APIResponse) Status() string

type AggregateCommitment

type AggregateCommitment struct {
	AggregateSize  float64
	TotalAllocated float64
}

func (*AggregateCommitment) Percent

func (o *AggregateCommitment) Percent() float64

func (*AggregateCommitment) PercentWithRequestedSize

func (o *AggregateCommitment) PercentWithRequestedSize(requestedSize float64) float64

func (AggregateCommitment) String

func (o AggregateCommitment) String() string

type AggregateSpace

type AggregateSpace interface {
	Size() int64
	Used() int64
	Footprint() int64
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the object to use for interacting with ONTAP controllers

func NewClient

func NewClient(config ClientConfig, SVM string) *Client

NewClient is a factory method for creating a new instance

func NewZAPIClient

func NewZAPIClient(config ClientConfig, SVM string) *Client

NewZAPIClient is a factory method for creating a new instance

func (Client) AggrSpaceGetIterRequest

func (c Client) AggrSpaceGetIterRequest(aggregateName string) (*azgo.AggrSpaceGetIterResponse, error)

AggrSpaceGetIterRequest returns the aggregates on the system equivalent to filer::> storage aggregate show-space -aggregate-name aggregate

func (Client) AggregateCommitment

func (c Client) AggregateCommitment(ctx context.Context, aggregate string) (*AggregateCommitment, error)

AggregateCommitmentPercentage returns the allocated capacity percentage for an aggregate See also; https://practical-admin.com/blog/netapp-powershell-toolkit-aggregate-overcommitment-report/

func (*Client) ClientConfig

func (c *Client) ClientConfig() ClientConfig

func (Client) EmsAutosupportLog

func (c Client) EmsAutosupportLog(
	appVersion string,
	autoSupport bool,
	category string,
	computerName string,
	eventDescription string,
	eventID int,
	eventSource string,
	logLevel int,
) (*azgo.EmsAutosupportLogResponse, error)

EmsAutosupportLog generates an auto support message with the supplied parameters

func (Client) ExportPolicyCreate

func (c Client) ExportPolicyCreate(policy string) (*azgo.ExportPolicyCreateResponse, error)

ExportPolicyCreate creates an export policy equivalent to filer::> vserver export-policy create

func (Client) ExportPolicyDestroy

func (c Client) ExportPolicyDestroy(policy string) (*azgo.ExportPolicyDestroyResponse, error)

func (Client) ExportPolicyGet

func (c Client) ExportPolicyGet(policy string) (*azgo.ExportPolicyGetResponse, error)

func (Client) ExportRuleCreate

func (c Client) ExportRuleCreate(
	policy, clientMatch string,
	protocols, roSecFlavors, rwSecFlavors, suSecFlavors []string,
) (*azgo.ExportRuleCreateResponse, error)

ExportRuleCreate creates a rule in an export policy equivalent to filer::> vserver export-policy rule create

func (Client) ExportRuleDestroy

func (c Client) ExportRuleDestroy(policy string, ruleIndex int) (*azgo.ExportRuleDestroyResponse, error)

ExportRuleDestroy deletes the rule at the given index in the given policy

func (Client) ExportRuleGetIterRequest

func (c Client) ExportRuleGetIterRequest(policy string) (*azgo.ExportRuleGetIterResponse, error)

ExportRuleGetIterRequest returns the export rules in an export policy equivalent to filer::> vserver export-policy rule show

func (Client) FlexGroupCreate

func (c Client) FlexGroupCreate(
	ctx context.Context, name string, size int, aggrs []azgo.AggrNameType, spaceReserve, snapshotPolicy,
	unixPermissions, exportPolicy, securityStyle, tieringPolicy, comment string, qosPolicyGroup QosPolicyGroup,
	encrypt *bool, snapshotReserve int,
) (*azgo.VolumeCreateAsyncResponse, error)

FlexGroupCreate creates a FlexGroup with the specified options equivalent to filer::> volume create -vserver svm_name -volume fg_vol_name –auto-provision-as flexgroup -size fg_size -state online -type RW -policy default -unix-permissions ---rwxr-xr-x -space-guarantee none -snapshot-policy none -security-style unix -encrypt false

func (Client) FlexGroupDestroy

func (c Client) FlexGroupDestroy(
	ctx context.Context, name string, force bool,
) (*azgo.VolumeDestroyAsyncResponse, error)

FlexGroupDestroy destroys a FlexGroup

func (Client) FlexGroupExists

func (c Client) FlexGroupExists(ctx context.Context, name string) (bool, error)

FlexGroupExists tests for the existence of a FlexGroup

func (Client) FlexGroupGet

func (c Client) FlexGroupGet(name string) (*azgo.VolumeAttributesType, error)

FlexGroupGet returns all relevant details for a single FlexGroup

func (Client) FlexGroupGetAll

func (c Client) FlexGroupGetAll(prefix string) (*azgo.VolumeGetIterResponse, error)

FlexGroupGetAll returns all relevant details for all FlexGroups whose names match the supplied prefix

func (Client) FlexGroupModifyUnixPermissions

func (c Client) FlexGroupModifyUnixPermissions(
	ctx context.Context, volumeName, unixPermissions string,
) (*azgo.VolumeModifyIterAsyncResponse, error)

func (Client) FlexGroupSetComment

func (c Client) FlexGroupSetComment(
	ctx context.Context, volumeName, newVolumeComment string,
) (*azgo.VolumeModifyIterAsyncResponse, error)

FlexGroupSetComment sets a flexgroup's comment to the supplied value

func (Client) FlexGroupSetSize

func (c Client) FlexGroupSetSize(ctx context.Context, name, newSize string) (*azgo.VolumeSizeAsyncResponse, error)

FlexGroupSetSize sets the size of the specified FlexGroup

func (Client) FlexGroupSize

func (c Client) FlexGroupSize(name string) (int, error)

FlexGroupSize retrieves the size of the specified volume

func (Client) FlexGroupUsedSize

func (c Client) FlexGroupUsedSize(name string) (int, error)

FlexGroupUsedSize retrieves the used space of the specified volume

func (Client) FlexGroupVolumeDisableSnapshotDirectoryAccess

func (c Client) FlexGroupVolumeDisableSnapshotDirectoryAccess(
	ctx context.Context, name string,
) (*azgo.VolumeModifyIterAsyncResponse, error)

FlexGroupVolumeDisableSnapshotDirectoryAccess disables access to the ".snapshot" directory Disable '.snapshot' to allow official mysql container's chmod-in-init to work

func (Client) GetClonedZapiRunner

func (c Client) GetClonedZapiRunner() *azgo.ZapiRunner

GetClonedZapiRunner returns a clone of the ZapiRunner configured on this driver.

func (Client) GetNontunneledZapiRunner

func (c Client) GetNontunneledZapiRunner() *azgo.ZapiRunner

GetNontunneledZapiRunner returns a clone of the ZapiRunner configured on this driver with the SVM field cleared so ZAPI calls made with the resulting runner aren't tunneled. Note that the calls could still go directly to either a cluster or vserver management LIF.

func (Client) GetPeeredVservers

func (c Client) GetPeeredVservers(ctx context.Context) ([]string, error)

GetPeeredVservers returns a list of vservers peered with the vserver for this backend

func (Client) IgroupAdd

func (c Client) IgroupAdd(initiatorGroupName, initiator string) (*azgo.IgroupAddResponse, error)

IgroupAdd adds an initiator to an initiator group equivalent to filer::> igroup add -vserver iscsi_vs -igroup docker -initiator iqn.1993-08.org.debian:01:9031309bbebd

func (Client) IgroupCreate

func (c Client) IgroupCreate(
	initiatorGroupName, initiatorGroupType, osType string,
) (*azgo.IgroupCreateResponse, error)

IgroupCreate creates the specified initiator group equivalent to filer::> igroup create docker -vserver iscsi_vs -protocol iscsi -ostype linux

func (Client) IgroupDestroy

func (c Client) IgroupDestroy(initiatorGroupName string) (*azgo.IgroupDestroyResponse, error)

IgroupDestroy destroys an initiator group

func (Client) IgroupGet

func (c Client) IgroupGet(initiatorGroupName string) (*azgo.InitiatorGroupInfoType, error)

IgroupGet gets a specified initiator group

func (Client) IgroupList

func (c Client) IgroupList() (*azgo.IgroupGetIterResponse, error)

IgroupList lists initiator groups

func (Client) IgroupRemove

func (c Client) IgroupRemove(initiatorGroupName, initiator string, force bool) (*azgo.IgroupRemoveResponse, error)

IgroupRemove removes an initiator from an initiator group

func (Client) IsVserverDRCapable

func (c Client) IsVserverDRCapable(ctx context.Context) (bool, error)

func (Client) IsVserverDRDestination

func (c Client) IsVserverDRDestination(ctx context.Context) (bool, error)

IsVserverDRDestination identifies if the Vserver is a destination vserver of Snapmirror relationship (SVM-DR) or not

func (Client) IsVserverDRSource

func (c Client) IsVserverDRSource(ctx context.Context) (bool, error)

IsVserverDRSource identifies if the Vserver is a source vserver of Snapmirror relationship (SVM-DR) or not

func (Client) IscsiInitiatorAddAuth

func (c Client) IscsiInitiatorAddAuth(
	initiator, authType, userName, passphrase, outboundUserName, outboundPassphrase string,
) (*azgo.IscsiInitiatorAddAuthResponse, error)

IscsiInitiatorAddAuth creates and sets the authorization details for a single initiator

equivalent to filer::> vserver iscsi security create -vserver SVM -initiator-name iqn.1993-08.org.debian:01:9031309bbebd \
                         -auth-type CHAP -user-name outboundUserName -outbound-user-name outboundPassphrase

func (Client) IscsiInitiatorAuthGetIter

func (c Client) IscsiInitiatorAuthGetIter() ([]azgo.IscsiSecurityEntryInfoType, error)

IscsiInitiatorAuthGetIter returns the authorization details for all non-default initiators for the Client's SVM equivalent to filer::> vserver iscsi security show -vserver SVM

func (Client) IscsiInitiatorDeleteAuth

func (c Client) IscsiInitiatorDeleteAuth(initiator string) (*azgo.IscsiInitiatorDeleteAuthResponse, error)

IscsiInitiatorDeleteAuth deletes the authorization details for a single initiator equivalent to filer::> vserver iscsi security delete -vserver SVM -initiator-name iqn.1993-08.org.debian:01:9031309bbebd

func (Client) IscsiInitiatorGetAuth

func (c Client) IscsiInitiatorGetAuth(initiator string) (*azgo.IscsiInitiatorGetAuthResponse, error)

IscsiInitiatorGetAuth returns the authorization details for a single initiator equivalent to filer::> vserver iscsi security show -vserver SVM -initiator-name iqn.1993-08.org.debian:01:9031309bbebd

or filer::> vserver iscsi security show -vserver SVM -initiator-name default

func (Client) IscsiInitiatorGetDefaultAuth

func (c Client) IscsiInitiatorGetDefaultAuth() (*azgo.IscsiInitiatorGetDefaultAuthResponse, error)

IscsiInitiatorGetDefaultAuth returns the authorization details for the default initiator equivalent to filer::> vserver iscsi security show -vserver SVM -initiator-name default

func (Client) IscsiInitiatorGetIter

func (c Client) IscsiInitiatorGetIter() ([]azgo.IscsiInitiatorListEntryInfoType, error)

IscsiInitiatorGetIter returns the initiator details for all non-default initiators for the Client's SVM equivalent to filer::> vserver iscsi initiator show -vserver SVM

func (Client) IscsiInitiatorModifyCHAPParams

func (c Client) IscsiInitiatorModifyCHAPParams(
	initiator, userName, passphrase, outboundUserName, outboundPassphrase string,
) (*azgo.IscsiInitiatorModifyChapParamsResponse, error)

IscsiInitiatorModifyCHAPParams modifies the authorization details for a single initiator

equivalent to filer::> vserver iscsi security modify -vserver SVM -initiator-name iqn.1993-08.org.debian:01:9031309bbebd \
                         -user-name outboundUserName -outbound-user-name outboundPassphrase

func (Client) IscsiInitiatorSetDefaultAuth

func (c Client) IscsiInitiatorSetDefaultAuth(
	authType, userName, passphrase, outboundUserName, outboundPassphrase string,
) (*azgo.IscsiInitiatorSetDefaultAuthResponse, error)

IscsiInitiatorSetDefaultAuth sets the authorization details for the default initiator

equivalent to filer::> vserver iscsi security modify -vserver SVM -initiator-name default \
                          -auth-type CHAP -user-name outboundUserName -outbound-user-name outboundPassphrase

func (Client) IscsiInterfaceGetIterRequest

func (c Client) IscsiInterfaceGetIterRequest() (*azgo.IscsiInterfaceGetIterResponse, error)

IscsiInterfaceGetIterRequest returns information about the vserver's iSCSI interfaces

func (Client) IscsiNodeGetNameRequest

func (c Client) IscsiNodeGetNameRequest() (*azgo.IscsiNodeGetNameResponse, error)

IscsiNodeGetNameRequest gets the IQN of the vserver

func (Client) IscsiServiceGetIterRequest

func (c Client) IscsiServiceGetIterRequest() (*azgo.IscsiServiceGetIterResponse, error)

IscsiServiceGetIterRequest returns information about an iSCSI target

func (Client) JobGetIterStatus

func (c Client) JobGetIterStatus(jobId int) (*azgo.JobGetIterResponse, error)

JobGetIterStatus returns the current job status for Async requests.

func (Client) JobScheduleExists

func (c Client) JobScheduleExists(ctx context.Context, jobName string) (bool, error)

func (Client) LunCloneCreate

func (c Client) LunCloneCreate(
	volumeName, sourceLun, destinationLun string, qosPolicyGroup QosPolicyGroup,
) (*azgo.CloneCreateResponse, error)

LunCloneCreate clones a LUN from a snapshot

func (Client) LunCount

func (c Client) LunCount(ctx context.Context, volume string) (int, error)

LunCount returns the number of LUNs that exist in a given volume

func (Client) LunCreate

func (c Client) LunCreate(
	lunPath string, sizeInBytes int, osType string, qosPolicyGroup QosPolicyGroup, spaceReserved bool,
	spaceAllocated bool,
) (*azgo.LunCreateBySizeResponse, error)

LunCreate creates a lun with the specified attributes equivalent to filer::> lun create -vserver iscsi_vs -path /vol/v/lun1 -size 1g -ostype linux -space-reserve disabled -space-allocation enabled

func (Client) LunDestroy

func (c Client) LunDestroy(lunPath string) (*azgo.LunDestroyResponse, error)

LunDestroy destroys a LUN equivalent to filer::> lun destroy -vserver iscsi_vs -path /vol/v/lun0

func (Client) LunGet

func (c Client) LunGet(path string) (*azgo.LunInfoType, error)

LunGet returns all relevant details for a single LUN equivalent to filer::> lun show

func (Client) LunGetAll

func (c Client) LunGetAll(pathPattern string) (*azgo.LunGetIterResponse, error)

LunGetAll returns all relevant details for all LUNs whose paths match the supplied pattern equivalent to filer::> lun show -path /vol/trident_*/*

func (Client) LunGetAllForVolume

func (c Client) LunGetAllForVolume(volumeName string) (*azgo.LunGetIterResponse, error)

LunGetAllForVolume returns all relevant details for all LUNs in the supplied Volume equivalent to filer::> lun show -volume trident_CEwDWXQRPz

func (Client) LunGetAllForVserver

func (c Client) LunGetAllForVserver(vserverName string) (*azgo.LunGetIterResponse, error)

LunGetAllForVserver returns all relevant details for all LUNs in the supplied SVM equivalent to filer::> lun show -vserver trident_CEwDWXQRPz

func (Client) LunGetAttribute

func (c Client) LunGetAttribute(lunPath, name string) (*azgo.LunGetAttributeResponse, error)

LunGetAttribute gets a named attribute for a given LUN.

func (Client) LunGetGeometry

func (c Client) LunGetGeometry(path string) (*azgo.LunGetGeometryResponse, error)

func (Client) LunGetSerialNumber

func (c Client) LunGetSerialNumber(lunPath string) (*azgo.LunGetSerialNumberResponse, error)

LunGetSerialNumber returns the serial# for a lun

func (Client) LunMap

func (c Client) LunMap(initiatorGroupName, lunPath string, lunID int) (*azgo.LunMapResponse, error)

LunMap maps a lun to an id in an initiator group equivalent to filer::> lun map -vserver iscsi_vs -path /vol/v/lun1 -igroup docker -lun-id 0

func (Client) LunMapAutoID

func (c Client) LunMapAutoID(initiatorGroupName, lunPath string) (*azgo.LunMapResponse, error)

LunMapAutoID maps a LUN in an initiator group, allowing ONTAP to choose an available LUN ID equivalent to filer::> lun map -vserver iscsi_vs -path /vol/v/lun1 -igroup docker

func (Client) LunMapGet

func (c Client) LunMapGet(initiatorGroupName, lunPath string) (*azgo.LunMapGetIterResponse, error)

LunMapGet returns a list of LUN map details equivalent to filer::> lun mapping show -vserver iscsi_vs -path /vol/v/lun0 -igroup trident

func (Client) LunMapIfNotMapped

func (c Client) LunMapIfNotMapped(
	ctx context.Context, initiatorGroupName, lunPath string, importNotManaged bool,
) (int, error)

func (Client) LunMapListInfo

func (c Client) LunMapListInfo(lunPath string) (*azgo.LunMapListInfoResponse, error)

LunMapListInfo returns lun mapping information for the specified lun equivalent to filer::> lun mapped show -vserver iscsi_vs -path /vol/v/lun0

func (Client) LunMapsGetByIgroup

func (c Client) LunMapsGetByIgroup(initiatorGroupName string) (*azgo.LunMapGetIterResponse, error)

LunMapsGetByIgroup returns a list of LUN map details for a given igroup equivalent to filer::> lun mapping show -vserver iscsi_vs -igroup trident

func (Client) LunMapsGetByLun

func (c Client) LunMapsGetByLun(lunPath string) (*azgo.LunMapGetIterResponse, error)

LunMapsGetByLun returns a list of LUN map details for a given LUN path equivalent to filer::> lun mapping show -vserver iscsi_vs -path /vol/v/lun0

func (Client) LunOffline

func (c Client) LunOffline(lunPath string) (*azgo.LunOfflineResponse, error)

LunOffline offlines a lun equivalent to filer::> lun offline -vserver iscsi_vs -path /vol/v/lun0

func (Client) LunOnline

func (c Client) LunOnline(lunPath string) (*azgo.LunOnlineResponse, error)

LunOnline onlines a lun equivalent to filer::> lun online -vserver iscsi_vs -path /vol/v/lun0

func (Client) LunRename

func (c Client) LunRename(path, newPath string) (*azgo.LunMoveResponse, error)

LunRename changes the name of a LUN

func (Client) LunResize

func (c Client) LunResize(path string, sizeBytes int) (uint64, error)

func (Client) LunSetAttribute

func (c Client) LunSetAttribute(lunPath, name, value string) (*azgo.LunSetAttributeResponse, error)

LunSetAttribute sets a named attribute for a given LUN.

func (Client) LunSetQosPolicyGroup

func (c Client) LunSetQosPolicyGroup(
	lunPath string, qosPolicyGroup QosPolicyGroup,
) (*azgo.LunSetQosPolicyGroupResponse, error)

LunSetQosPolicyGroup sets the qos policy group or adaptive qos policy group on a lun; does not unset policy groups

func (Client) LunSize

func (c Client) LunSize(flexvolName string) (int, error)

LunSize retrieves the size of the specified volume, does not work with economy driver

func (Client) LunUnmap

func (c Client) LunUnmap(initiatorGroupName, lunPath string) (*azgo.LunUnmapResponse, error)

LunUnmap deletes the lun mapping for the given LUN path and igroup equivalent to filer::> lun mapping delete -vserver iscsi_vs -path /vol/v/lun0 -igroup group

func (Client) NetInterfaceGet

func (c Client) NetInterfaceGet() (*azgo.NetInterfaceGetIterResponse, error)

NetInterfaceGet returns the list of network interfaces with associated metadata equivalent to filer::> net interface list, but only those LIFs that are operational

func (Client) NetInterfaceGetDataLIFs

func (c Client) NetInterfaceGetDataLIFs(ctx context.Context, protocol string) ([]string, error)

func (Client) NetInterfaceGetDataLIFsNode

func (c Client) NetInterfaceGetDataLIFsNode(ctx context.Context, ip string) (string, error)

func (Client) NodeListSerialNumbers

func (c Client) NodeListSerialNumbers(ctx context.Context) ([]string, error)

func (Client) QtreeCount

func (c Client) QtreeCount(ctx context.Context, volume string) (int, error)

QtreeCount returns the number of Qtrees in the specified Flexvol, not including the Flexvol itself

func (Client) QtreeCreate

func (c Client) QtreeCreate(
	name, volumeName, unixPermissions, exportPolicy, securityStyle, qosPolicy string,
) (*azgo.QtreeCreateResponse, error)

QtreeCreate creates a qtree with the specified options equivalent to filer::> qtree create -vserver ndvp_vs -volume v -qtree q -export-policy default -unix-permissions ---rwxr-xr-x -security-style unix

func (Client) QtreeDestroyAsync

func (c Client) QtreeDestroyAsync(path string, force bool) (*azgo.QtreeDeleteAsyncResponse, error)

QtreeDestroyAsync destroys a qtree in the background equivalent to filer::> volume qtree delete -foreground false

func (Client) QtreeExists

func (c Client) QtreeExists(ctx context.Context, name, volumePrefix string) (bool, string, error)

QtreeExists returns true if the named Qtree exists (and is unique in the matching Flexvols)

func (Client) QtreeGet

func (c Client) QtreeGet(name, volumePrefix string) (*azgo.QtreeInfoType, error)

QtreeGet returns all relevant details for a single qtree equivalent to filer::> volume qtree show

func (Client) QtreeGetAll

func (c Client) QtreeGetAll(volumePrefix string) (*azgo.QtreeListIterResponse, error)

QtreeGetAll returns all relevant details for all qtrees whose Flexvol names match the supplied prefix equivalent to filer::> volume qtree show

func (Client) QtreeList

func (c Client) QtreeList(prefix, volumePrefix string) (*azgo.QtreeListIterResponse, error)

QtreeList returns the names of all Qtrees whose names match the supplied prefix equivalent to filer::> volume qtree show

func (Client) QtreeModifyExportPolicy

func (c Client) QtreeModifyExportPolicy(name, volumeName, exportPolicy string) (*azgo.QtreeModifyResponse, error)

func (Client) QtreeRename

func (c Client) QtreeRename(path, newPath string) (*azgo.QtreeRenameResponse, error)

QtreeRename renames a qtree equivalent to filer::> volume qtree rename

func (Client) QuotaEntryList

func (c Client) QuotaEntryList(volume string) (*azgo.QuotaListEntriesIterResponse, error)

QuotaEntryList returns the disk limit quotas for a Flexvol equivalent to filer::> volume quota policy rule show

func (Client) QuotaGetEntry

func (c Client) QuotaGetEntry(target, quotaType string) (*azgo.QuotaEntryType, error)

QuotaEntryGet returns the disk limit for a single qtree equivalent to filer::> volume quota policy rule show

func (Client) QuotaOff

func (c Client) QuotaOff(volume string) (*azgo.QuotaOffResponse, error)

QuotaOff disables quotas on a Flexvol equivalent to filer::> volume quota off

func (Client) QuotaOn

func (c Client) QuotaOn(volume string) (*azgo.QuotaOnResponse, error)

QuotaOn enables quotas on a Flexvol equivalent to filer::> volume quota on

func (Client) QuotaResize

func (c Client) QuotaResize(volume string) (*azgo.QuotaResizeResponse, error)

QuotaResize resizes quotas on a Flexvol equivalent to filer::> volume quota resize

func (Client) QuotaSetEntry

func (c Client) QuotaSetEntry(
	qtreeName, volumeName, quotaTarget, quotaType, diskLimit string,
) (*azgo.QuotaSetEntryResponse, error)

QuotaSetEntry creates a new quota rule with an optional hard disk limit equivalent to filer::> volume quota policy rule create

func (Client) QuotaStatus

func (c Client) QuotaStatus(volume string) (*azgo.QuotaStatusResponse, error)

QuotaStatus returns the quota status for a Flexvol equivalent to filer::> volume quota show

func (Client) SVMGetAggregateNames

func (c Client) SVMGetAggregateNames() ([]string, error)

SVMGetAggregateNames returns an array of names of the aggregates assigned to the configured vserver. The vserver-get-iter API works with either cluster or vserver scope, so the ZAPI runner may or may not be configured for tunneling; using the query parameter ensures we address only the configured vserver.

func (*Client) SVMMCC

func (c *Client) SVMMCC() bool

func (*Client) SVMName

func (c *Client) SVMName() string

func (*Client) SVMUUID

func (c *Client) SVMUUID() string

func (*Client) SetSVMMCC

func (c *Client) SetSVMMCC(mcc bool)

func (*Client) SetSVMUUID

func (c *Client) SetSVMUUID(svmUUID string)

func (Client) SnapmirrorAbort

func (c Client) SnapmirrorAbort(
	localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string,
) (*azgo.SnapmirrorAbortResponse, error)

func (Client) SnapmirrorBreak

func (c Client) SnapmirrorBreak(
	localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName, snapshotName string,
) (*azgo.SnapmirrorBreakResponse, error)

func (Client) SnapmirrorCreate

func (c Client) SnapmirrorCreate(
	localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName, repPolicy, repSchedule string,
) (*azgo.SnapmirrorCreateResponse, error)

func (Client) SnapmirrorDelete

func (c Client) SnapmirrorDelete(
	localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string,
) (*azgo.SnapmirrorDestroyResponse, error)

Intended to be from the destination vserver

func (Client) SnapmirrorDeleteViaDestination

func (c Client) SnapmirrorDeleteViaDestination(
	localFlexvolName, localSVMName string,
) (*azgo.SnapmirrorDestroyResponse, error)

Intended to be from the destination vserver

func (Client) SnapmirrorGet

func (c Client) SnapmirrorGet(
	localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string,
) (*azgo.SnapmirrorGetResponse, error)

func (Client) SnapmirrorGetDestinationIterRequest

func (c Client) SnapmirrorGetDestinationIterRequest(
	relGroupType string,
) (*azgo.SnapmirrorGetDestinationIterResponse, error)

SnapmirrorGetDestinationIterRequest returns the snapmirror operations on the source cluster equivalent to filer::> snapmirror list-destinations

func (Client) SnapmirrorGetIterRequest

func (c Client) SnapmirrorGetIterRequest(relGroupType string) (*azgo.SnapmirrorGetIterResponse, error)

SnapmirrorGetIterRequest returns the snapmirror operations on the destination cluster equivalent to filer::> snapmirror show

func (Client) SnapmirrorInitialize

func (c Client) SnapmirrorInitialize(
	localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string,
) (*azgo.SnapmirrorInitializeResponse, error)

func (Client) SnapmirrorPolicyExists

func (c Client) SnapmirrorPolicyExists(ctx context.Context, policyName string) (bool, error)

func (Client) SnapmirrorPolicyGet

func (c Client) SnapmirrorPolicyGet(
	ctx context.Context, policyName string,
) (*azgo.SnapmirrorPolicyInfoType, error)

func (Client) SnapmirrorQuiesce

func (c Client) SnapmirrorQuiesce(
	localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string,
) (*azgo.SnapmirrorQuiesceResponse, error)

func (Client) SnapmirrorRelease

func (c Client) SnapmirrorRelease(sourceFlexvolName, sourceSVMName string) error

SnapmirrorRelease removes all local snapmirror relationship metadata from the source vserver Intended to be used on the source vserver

func (Client) SnapmirrorResync

func (c Client) SnapmirrorResync(
	localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string,
) (*azgo.SnapmirrorResyncResponse, error)

func (Client) SnapshotCreate

func (c Client) SnapshotCreate(snapshotName, volumeName string) (*azgo.SnapshotCreateResponse, error)

SnapshotCreate creates a snapshot of a volume

func (Client) SnapshotDelete

func (c Client) SnapshotDelete(snapshotName, volumeName string) (*azgo.SnapshotDeleteResponse, error)

DeleteSnapshot deletes a snapshot of a volume

func (Client) SnapshotList

func (c Client) SnapshotList(volumeName string) (*azgo.SnapshotGetIterResponse, error)

SnapshotList returns the list of snapshots associated with a volume

func (Client) SnapshotRestoreVolume

func (c Client) SnapshotRestoreVolume(snapshotName, volumeName string) (*azgo.SnapshotRestoreVolumeResponse, error)

SnapshotRestoreVolume restores a volume to a snapshot as a non-blocking operation

func (Client) SupportsFeature

func (c Client) SupportsFeature(ctx context.Context, feature Feature) bool

SupportsFeature returns true if the Ontapi version supports the supplied feature

func (Client) SystemGetOntapiVersion

func (c Client) SystemGetOntapiVersion(ctx context.Context) (string, error)

SystemGetOntapiVersion gets the ONTAPI version using the credentials, and caches & returns the result.

func (Client) SystemGetVersion

func (c Client) SystemGetVersion() (*azgo.SystemGetVersionResponse, error)

SystemGetVersion returns the system version equivalent to filer::> version

func (Client) TieringPolicyValue

func (c Client) TieringPolicyValue(ctx context.Context) string

func (Client) VolumeCloneCreate

func (c Client) VolumeCloneCreate(name, source, snapshot string) (*azgo.VolumeCloneCreateResponse, error)

VolumeCloneCreate clones a volume from a snapshot

func (Client) VolumeCloneCreateAsync

func (c Client) VolumeCloneCreateAsync(name, source, snapshot string) (*azgo.VolumeCloneCreateAsyncResponse, error)

VolumeCloneCreateAsync clones a volume from a snapshot

func (Client) VolumeCloneSplitStart

func (c Client) VolumeCloneSplitStart(name string) (*azgo.VolumeCloneSplitStartResponse, error)

VolumeCloneSplitStart splits a cloned volume from its parent

func (Client) VolumeCreate

func (c Client) VolumeCreate(
	ctx context.Context, name, aggregateName, size, spaceReserve, snapshotPolicy, unixPermissions,
	exportPolicy, securityStyle, tieringPolicy, comment string, qosPolicyGroup QosPolicyGroup, encrypt *bool,
	snapshotReserve int, dpVolume bool,
) (*azgo.VolumeCreateResponse, error)

VolumeCreate creates a volume with the specified options equivalent to filer::> volume create -vserver iscsi_vs -volume v -aggregate aggr1 -size 1g -state online -type RW -policy default -unix-permissions ---rwxr-xr-x -space-guarantee none -snapshot-policy none -security-style unix -encrypt false

func (Client) VolumeDestroy

func (c Client) VolumeDestroy(name string, force bool) (*azgo.VolumeDestroyResponse, error)

VolumeDestroy destroys a volume

func (Client) VolumeDisableSnapshotDirectoryAccess

func (c Client) VolumeDisableSnapshotDirectoryAccess(name string) (*azgo.VolumeModifyIterResponse, error)

VolumeDisableSnapshotDirectoryAccess disables access to the ".snapshot" directory Disable '.snapshot' to allow official mysql container's chmod-in-init to work

func (Client) VolumeExists

func (c Client) VolumeExists(ctx context.Context, name string) (bool, error)

VolumeExists tests for the existence of a Flexvol

func (Client) VolumeGet

func (c Client) VolumeGet(name string) (*azgo.VolumeAttributesType, error)

VolumeGet returns all relevant details for a single Flexvol equivalent to filer::> volume show

func (Client) VolumeGetAll

func (c Client) VolumeGetAll(prefix string) (response *azgo.VolumeGetIterResponse, err error)

VolumeGetAll returns all relevant details for all FlexVols whose names match the supplied prefix equivalent to filer::> volume show

func (Client) VolumeGetType

func (c Client) VolumeGetType(name string) (string, error)

VolumeGetType returns the volume type such as RW or DP

func (Client) VolumeList

func (c Client) VolumeList(prefix string) (*azgo.VolumeGetIterResponse, error)

VolumeList returns the names of all Flexvols whose names match the supplied prefix

func (Client) VolumeListAllBackedBySnapshot

func (c Client) VolumeListAllBackedBySnapshot(ctx context.Context, volumeName, snapshotName string) ([]string, error)

VolumeListAllBackedBySnapshot returns the names of all FlexVols backed by the specified snapshot

func (Client) VolumeListByAttrs

func (c Client) VolumeListByAttrs(
	prefix, aggregate, spaceReserve, snapshotPolicy, tieringPolicy string, snapshotDir bool, encrypt *bool, snapReserve int,
) (*azgo.VolumeGetIterResponse, error)

VolumeListByAttrs returns the names of all Flexvols matching the specified attributes

func (Client) VolumeModifyExportPolicy

func (c Client) VolumeModifyExportPolicy(volumeName, exportPolicyName string) (*azgo.VolumeModifyIterResponse, error)

func (Client) VolumeModifyUnixPermissions

func (c Client) VolumeModifyUnixPermissions(
	volumeName, unixPermissions string,
) (*azgo.VolumeModifyIterResponse, error)

func (Client) VolumeMount

func (c Client) VolumeMount(name, junctionPath string) (*azgo.VolumeMountResponse, error)

VolumeMount mounts a volume at the specified junction

func (Client) VolumeOffline

func (c Client) VolumeOffline(name string) (*azgo.VolumeOfflineResponse, error)

VolumeOffline offlines a volume

func (Client) VolumeRename

func (c Client) VolumeRename(volumeName, newVolumeName string) (*azgo.VolumeRenameResponse, error)

VolumeRename changes the name of a FlexVol (but not a FlexGroup!)

func (Client) VolumeSetComment

func (c Client) VolumeSetComment(ctx context.Context, volumeName, newVolumeComment string) (
	*azgo.VolumeModifyIterResponse, error,
)

VolumeSetComment sets a volume's comment to the supplied value equivalent to filer::> volume modify -vserver iscsi_vs -volume v -comment newVolumeComment

func (Client) VolumeSetQosPolicyGroupName

func (c Client) VolumeSetQosPolicyGroupName(
	name string, qosPolicyGroup QosPolicyGroup,
) (*azgo.VolumeModifyIterResponse, error)

Use this to set the QoS Policy Group for volume clones since we can't set adaptive policy groups directly during volume clone creation.

func (Client) VolumeSetSize

func (c Client) VolumeSetSize(name, newSize string) (*azgo.VolumeSizeResponse, error)

VolumeSetSize sets the size of the specified volume

func (Client) VolumeSize

func (c Client) VolumeSize(name string) (int, error)

VolumeSize retrieves the size of the specified volume

func (Client) VolumeUnmount

func (c Client) VolumeUnmount(name string, force bool) (*azgo.VolumeUnmountResponse, error)

VolumeUnmount unmounts a volume from the specified junction

func (Client) VolumeUsedSize

func (c Client) VolumeUsedSize(name string) (int, error)

VolumeUsedSize retrieves the used bytes of the specified volume

func (Client) VserverGetIterAdminRequest

func (c Client) VserverGetIterAdminRequest() (*azgo.VserverGetIterResponse, error)

VserverGetIterAdminRequest returns vservers of type "admin" on the system. equivalent to filer::> vserver show -type admin

func (Client) VserverGetIterRequest

func (c Client) VserverGetIterRequest() (*azgo.VserverGetIterResponse, error)

VserverGetIterRequest returns the vservers on the system equivalent to filer::> vserver show

func (Client) VserverGetRequest

func (c Client) VserverGetRequest() (*azgo.VserverGetResponse, error)

VserverGetRequest returns vserver to which it is sent equivalent to filer::> vserver show

func (Client) VserverShowAggrGetIterRequest

func (c Client) VserverShowAggrGetIterRequest() (*azgo.VserverShowAggrGetIterResponse, error)

VserverShowAggrGetIterRequest returns the aggregates on the vserver. Requires ONTAP 9 or later. equivalent to filer::> vserver show-aggregates

func (Client) WaitForAsyncResponse

func (c Client) WaitForAsyncResponse(ctx context.Context, zapiResult interface{}, maxWaitTime time.Duration) error

WaitForAsyncResponse handles waiting for an AsyncResponse to return successfully or return an error.

type ClientConfig

type ClientConfig struct {
	ManagementLIF           string
	Username                string
	Password                string
	ClientPrivateKey        string
	ClientCertificate       string
	TrustedCACertificate    string
	DriverContext           tridentconfig.DriverContext
	ContextBasedZapiRecords int
	DebugTraceFlags         map[string]bool
}

ClientConfig holds the configuration data for Client objects

type FakeZAPIResponse

type FakeZAPIResponse struct {
	XMLName         xml.Name               `xml:"netapp"`
	ResponseVersion string                 `xml:"version,attr"`
	ResponseXmlns   string                 `xml:"xmlns,attr"`
	Result          FakeZAPIResponseResult `xml:"results"`
}

type FakeZAPIResponseResult

type FakeZAPIResponseResult struct {
	XMLName          xml.Name `xml:"results"`
	ResultStatusAttr string   `xml:"status,attr"`
	ResultReasonAttr string   `xml:"reason,attr"`
	ResultErrnoAttr  string   `xml:"errno,attr"`
}

type Feature

type Feature string
const (
	MinimumONTAPIVersion      Feature = "MINIMUM_ONTAPI_VERSION"
	NetAppFlexGroups          Feature = "NETAPP_FLEXGROUPS"
	NetAppFlexGroupsClone     Feature = "NETAPP_FLEXGROUPS_CLONE_ONTAPI_MINIMUM"
	NetAppFabricPoolFlexVol   Feature = "NETAPP_FABRICPOOL_FLEXVOL"
	NetAppFabricPoolFlexGroup Feature = "NETAPP_FABRICPOOL_FLEXGROUP"
	LunGeometrySkip           Feature = "LUN_GEOMETRY_SKIP"
	FabricPoolForSVMDR        Feature = "FABRICPOOL_FOR_SVMDR"
	QosPolicies               Feature = "QOS_POLICIES"
	LIFServices               Feature = "LIF_SERVICES"
)

Define new version-specific feature constants here

type IscsiInitiatorAuth

type IscsiInitiatorAuth struct {
	SVMName                string
	ChapUser               string
	ChapPassphrase         string
	ChapOutboundUser       string
	ChapOutboundPassphrase string
	Initiator              string
	AuthType               string
}

type Lun

type Lun struct {
	Comment        string
	CreateTime     string
	Enabled        bool
	LunMaps        []LunMap
	Name           string
	Qos            QosPolicyGroup
	Size           string
	Mapped         bool
	UUID           string
	SerialNumber   string
	State          string
	VolumeName     string
	OsType         string
	SpaceReserved  *bool
	SpaceAllocated *bool
}

type LunMap

type LunMap struct {
	IgroupName string
	LunID      int
}

type LunOptionsResult

type LunOptionsResult struct {
	RecordSchema struct {
		Space struct {
			Size struct {
				OpenAPIType string `json:"open_api_type"`
				Range       struct {
					Min int   `json:"min"`
					Max int64 `json:"max"`
				} `json:"range"`
			} `json:"size,omitempty"`
		} `json:"space,omitempty"`
	} `json:"record_schema"`
}

type Luns

type Luns []Lun

type OntapAPI

type OntapAPI interface {
	APIVersion(context.Context) (string, error)
	SVMName() string

	EmsAutosupportLog(
		ctx context.Context, driverName, appVersion string, autoSupport bool, category string,
		computerName, eventDescription string, eventID int, eventSource string, logLevel int,
	)

	ExportPolicyCreate(ctx context.Context, policy string) error
	ExportPolicyDestroy(ctx context.Context, policy string) error
	ExportPolicyExists(ctx context.Context, policyName string) (bool, error)
	ExportRuleCreate(ctx context.Context, policyName, desiredPolicyRule string) error
	ExportRuleDestroy(ctx context.Context, policyName string, ruleIndex int) error
	ExportRuleList(ctx context.Context, policyName string) (map[string]int, error)

	FlexgroupCreate(ctx context.Context, volume Volume) error
	FlexgroupExists(ctx context.Context, volumeName string) (bool, error)
	FlexgroupInfo(ctx context.Context, volumeName string) (*Volume, error)
	FlexgroupDisableSnapshotDirectoryAccess(ctx context.Context, volumeName string) error
	FlexgroupSetComment(ctx context.Context, volumeNameInternal, volumeNameExternal, comment string) error
	FlexgroupModifyUnixPermissions(
		ctx context.Context, volumeNameInternal, volumeNameExternal, unixPermissions string,
	) error
	FlexgroupMount(ctx context.Context, name, junctionPath string) error
	FlexgroupListByPrefix(ctx context.Context, prefix string) (Volumes, error)
	FlexgroupDestroy(ctx context.Context, volumeName string, force bool) error
	FlexgroupSetSize(ctx context.Context, name, newSize string) error
	FlexgroupSize(ctx context.Context, volumeName string) (uint64, error)
	FlexgroupUnmount(ctx context.Context, name string, force bool) error
	FlexgroupUsedSize(ctx context.Context, volumeName string) (int, error)
	FlexgroupModifyExportPolicy(ctx context.Context, volumeName, policyName string) error
	FlexgroupSnapshotCreate(ctx context.Context, snapshotName, sourceVolume string) error
	FlexgroupSetQosPolicyGroupName(ctx context.Context, name string, qos QosPolicyGroup) error
	FlexgroupCloneSplitStart(ctx context.Context, cloneName string) error
	FlexgroupSnapshotList(ctx context.Context, sourceVolume string) (Snapshots, error)
	FlexgroupSnapshotDelete(ctx context.Context, snapshotName, sourceVolume string) error

	LunList(ctx context.Context, pattern string) (Luns, error)
	LunCreate(ctx context.Context, lun Lun) error
	LunCloneCreate(ctx context.Context, flexvol, source, lunName string, qosPolicyGroup QosPolicyGroup) error
	LunDestroy(ctx context.Context, lunPath string) error
	LunGetGeometry(ctx context.Context, lunPath string) (uint64, error)
	LunGetComment(ctx context.Context, lunPath string) (string, bool, error)
	LunSetAttribute(ctx context.Context, lunPath, attribute, fstype, context, luks string) error
	ParseLunComment(ctx context.Context, commentJSON string) (map[string]string, error)
	LunSetQosPolicyGroup(ctx context.Context, lunPath string, qosPolicyGroup QosPolicyGroup) error
	LunGetByName(ctx context.Context, name string) (*Lun, error)
	LunRename(ctx context.Context, lunPath, newLunPath string) error
	LunMapInfo(ctx context.Context, initiatorGroupName, lunPath string) (int, error)
	EnsureLunMapped(ctx context.Context, initiatorGroupName, lunPath string, importNotManaged bool) (int, error)
	LunUnmap(ctx context.Context, initiatorGroupName, lunPath string) error
	LunSize(ctx context.Context, lunPath string) (int, error)
	LunSetSize(ctx context.Context, lunPath, newSize string) (uint64, error)
	LunMapGetReportingNodes(ctx context.Context, initiatorGroupName, lunPath string) ([]string, error)
	LunListIgroupsMapped(ctx context.Context, lunPath string) ([]string, error)

	IscsiInitiatorGetDefaultAuth(ctx context.Context) (IscsiInitiatorAuth, error)
	IscsiInitiatorSetDefaultAuth(
		ctx context.Context, authType, userName, passphrase, outbountUserName,
		outboundPassphrase string,
	) error
	IscsiInterfaceGet(ctx context.Context, svm string) ([]string, error)
	IscsiNodeGetNameRequest(ctx context.Context) (string, error)

	IgroupCreate(ctx context.Context, initiatorGroupName, initiatorGroupType, osType string) error
	IgroupDestroy(ctx context.Context, initiatorGroupName string) error
	EnsureIgroupAdded(ctx context.Context, initiatorGroupName, initiator string) error
	IgroupRemove(ctx context.Context, initiatorGroupName, initiator string, force bool) error
	IgroupGetByName(ctx context.Context, initiatorGroupName string) (map[string]bool, error)
	IgroupListLUNsMapped(ctx context.Context, initiatorGroupName string) ([]string, error)

	GetSVMAggregateAttributes(ctx context.Context) (map[string]string, error)
	GetSVMAggregateNames(ctx context.Context) ([]string, error)
	GetSVMAggregateSpace(ctx context.Context, aggregate string) ([]SVMAggregateSpace, error)
	GetSVMPeers(ctx context.Context) ([]string, error)

	GetSVMUUID() string

	QtreeExists(ctx context.Context, name, volumePrefix string) (bool, string, error)
	QtreeCreate(
		ctx context.Context, name, volumeName, unixPermissions, exportPolicy, securityStyle, qosPolicy string,
	) error
	QtreeDestroyAsync(ctx context.Context, path string, force bool) error
	QtreeRename(ctx context.Context, path, newPath string) error
	QtreeModifyExportPolicy(ctx context.Context, name, volumeName, newExportPolicyName string) error
	QtreeCount(ctx context.Context, volumeName string) (int, error)
	QtreeListByPrefix(ctx context.Context, prefix, volumePrefix string) (Qtrees, error)
	QtreeGetByName(ctx context.Context, name, volumePrefix string) (*Qtree, error)

	QuotaEntryList(ctx context.Context, volumeName string) (QuotaEntries, error)
	QuotaOff(ctx context.Context, volumeName string) error
	QuotaOn(ctx context.Context, volumeName string) error
	QuotaResize(ctx context.Context, volumeName string) error
	QuotaStatus(ctx context.Context, volumeName string) (string, error)
	QuotaSetEntry(ctx context.Context, qtreeName, volumeName, quotaType, diskLimit string) error
	QuotaGetEntry(ctx context.Context, volumeName, qtreeName, quotaType string) (*QuotaEntry, error)

	GetSLMDataLifs(ctx context.Context, ips, reportingNodeNames []string) ([]string, error)
	NetInterfaceGetDataLIFs(ctx context.Context, protocol string) ([]string, error)
	NodeListSerialNumbers(ctx context.Context) ([]string, error)

	SnapshotRestoreVolume(ctx context.Context, snapshotName, sourceVolume string) error
	SnapshotRestoreFlexgroup(ctx context.Context, snapshotName, sourceVolume string) error

	SnapmirrorCreate(
		ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName,
		replicationPolicy, replicationSchedule string,
	) error
	SnapmirrorResync(ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string) error
	SnapmirrorDelete(ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string) error
	SnapmirrorGet(ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string) (
		*Snapmirror, error)
	SnapmirrorInitialize(
		ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string,
	) error
	SnapmirrorPolicyGet(ctx context.Context, replicationPolicy string) (*SnapmirrorPolicy, error)
	SnapmirrorQuiesce(
		ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string,
	) error
	SnapmirrorAbort(ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string) error
	SnapmirrorBreak(
		ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName,
		snapshotName string,
	) error
	JobScheduleExists(ctx context.Context, replicationSchedule string) error
	SupportsFeature(ctx context.Context, feature Feature) bool
	ValidateAPIVersion(ctx context.Context) error
	SnapmirrorDeleteViaDestination(localFlexvolName, localSVMName string) error
	SnapmirrorRelease(localFlexvolName, localSVMName string) error
	IsSVMDRCapable(ctx context.Context) (bool, error)

	VolumeCloneCreate(ctx context.Context, cloneName, sourceName, snapshot string, async bool) error
	VolumeCloneSplitStart(ctx context.Context, cloneName string) error

	VolumeCreate(ctx context.Context, volume Volume) error
	VolumeDestroy(ctx context.Context, volumeName string, force bool) error
	VolumeDisableSnapshotDirectoryAccess(ctx context.Context, name string) error
	VolumeExists(ctx context.Context, volumeName string) (bool, error)
	VolumeInfo(ctx context.Context, volumeName string) (*Volume, error)
	VolumeListByPrefix(ctx context.Context, prefix string) (Volumes, error)
	VolumeListBySnapshotParent(ctx context.Context, snapshotName, sourceVolume string) (VolumeNameList, error)
	VolumeModifyExportPolicy(ctx context.Context, volumeName, policyName string) error
	VolumeModifyUnixPermissions(
		ctx context.Context, volumeNameInternal, volumeNameExternal, unixPermissions string,
	) error
	VolumeMount(ctx context.Context, name, junctionPath string) error
	VolumeListByAttrs(ctx context.Context, volumeAttrs *Volume) (Volumes, error)
	VolumeRename(ctx context.Context, originalName, newName string) error
	VolumeSetComment(ctx context.Context, volumeNameInternal, volumeNameExternal, comment string) error
	VolumeSetQosPolicyGroupName(ctx context.Context, name string, qos QosPolicyGroup) error
	VolumeSetSize(ctx context.Context, name, newSize string) error
	VolumeSize(ctx context.Context, volumeName string) (uint64, error)
	VolumeUsedSize(ctx context.Context, volumeName string) (int, error)
	VolumeSnapshotCreate(ctx context.Context, snapshotName, sourceVolume string) error
	VolumeSnapshotList(ctx context.Context, sourceVolume string) (Snapshots, error)
	VolumeSnapshotDelete(ctx context.Context, snapshotName, sourceVolume string) error

	TieringPolicyValue(ctx context.Context) string
}

func NewRestClientFromOntapConfig

func NewRestClientFromOntapConfig(
	ctx context.Context, ontapConfig *drivers.OntapStorageDriverConfig,
) (OntapAPI, error)

NewRestClientFromOntapConfig is a factory method for creating a new Ontap API instance with a REST client

func NewZAPIClientFromOntapConfig

func NewZAPIClientFromOntapConfig(
	ctx context.Context, ontapConfig *drivers.OntapStorageDriverConfig, numRecords int,
) (OntapAPI, error)

type OntapAPIREST

type OntapAPIREST struct {
	// contains filtered or unexported fields
}

func NewOntapAPIREST

func NewOntapAPIREST(restClient *RestClient) (OntapAPIREST, error)

func NewOntapAPIRESTFromRestClientInterface

func NewOntapAPIRESTFromRestClientInterface(restClient RestClientInterface) (OntapAPIREST, error)

NewOntapAPIRESTFromRestClientInterface added for testing

func (OntapAPIREST) APIVersion

func (d OntapAPIREST) APIVersion(ctx context.Context) (string, error)

func (OntapAPIREST) EmsAutosupportLog

func (d OntapAPIREST) EmsAutosupportLog(
	ctx context.Context,
	driverName string,
	appVersion string,
	autoSupport bool,
	category string,
	computerName string,
	eventDescription string,
	eventID int,
	eventSource string,
	logLevel int,
)

func (OntapAPIREST) EnsureIgroupAdded

func (d OntapAPIREST) EnsureIgroupAdded(
	ctx context.Context, initiatorGroupName, initiator string,
) error

func (OntapAPIREST) EnsureLunMapped

func (d OntapAPIREST) EnsureLunMapped(
	ctx context.Context, initiatorGroupName, lunPath string, importNotManaged bool,
) (int, error)

func (OntapAPIREST) ExportPolicyCreate

func (d OntapAPIREST) ExportPolicyCreate(ctx context.Context, policy string) error

func (OntapAPIREST) ExportPolicyDestroy

func (d OntapAPIREST) ExportPolicyDestroy(ctx context.Context, policy string) error

func (OntapAPIREST) ExportPolicyExists

func (d OntapAPIREST) ExportPolicyExists(ctx context.Context, policyName string) (bool, error)

func (OntapAPIREST) ExportRuleCreate

func (d OntapAPIREST) ExportRuleCreate(ctx context.Context, policyName, desiredPolicyRules string) error

func (OntapAPIREST) ExportRuleDestroy

func (d OntapAPIREST) ExportRuleDestroy(ctx context.Context, policyName string, ruleIndex int) error

func (OntapAPIREST) ExportRuleList

func (d OntapAPIREST) ExportRuleList(ctx context.Context, policyName string) (map[string]int, error)

func (OntapAPIREST) FlexgroupCloneSplitStart

func (d OntapAPIREST) FlexgroupCloneSplitStart(ctx context.Context, cloneName string) error

func (OntapAPIREST) FlexgroupCreate

func (d OntapAPIREST) FlexgroupCreate(ctx context.Context, volume Volume) error

func (OntapAPIREST) FlexgroupDestroy

func (d OntapAPIREST) FlexgroupDestroy(ctx context.Context, volumeName string, force bool) error

func (OntapAPIREST) FlexgroupDisableSnapshotDirectoryAccess

func (d OntapAPIREST) FlexgroupDisableSnapshotDirectoryAccess(ctx context.Context, volumeName string) error

func (OntapAPIREST) FlexgroupExists

func (d OntapAPIREST) FlexgroupExists(ctx context.Context, volumeName string) (bool, error)

func (OntapAPIREST) FlexgroupInfo

func (d OntapAPIREST) FlexgroupInfo(ctx context.Context, volumeName string) (*Volume, error)

func (OntapAPIREST) FlexgroupListByPrefix

func (d OntapAPIREST) FlexgroupListByPrefix(ctx context.Context, prefix string) (Volumes, error)

func (OntapAPIREST) FlexgroupModifyExportPolicy

func (d OntapAPIREST) FlexgroupModifyExportPolicy(ctx context.Context, volumeName, policyName string) error

func (OntapAPIREST) FlexgroupModifyUnixPermissions

func (d OntapAPIREST) FlexgroupModifyUnixPermissions(
	ctx context.Context, volumeNameInternal, volumeNameExternal, unixPermissions string,
) error

func (OntapAPIREST) FlexgroupMount

func (d OntapAPIREST) FlexgroupMount(ctx context.Context, name, junctionPath string) error

func (OntapAPIREST) FlexgroupSetComment

func (d OntapAPIREST) FlexgroupSetComment(
	ctx context.Context, volumeNameInternal, volumeNameExternal, comment string,
) error

func (OntapAPIREST) FlexgroupSetQosPolicyGroupName

func (d OntapAPIREST) FlexgroupSetQosPolicyGroupName(ctx context.Context, name string, qos QosPolicyGroup) error

func (OntapAPIREST) FlexgroupSetSize

func (d OntapAPIREST) FlexgroupSetSize(ctx context.Context, name, newSize string) error

func (OntapAPIREST) FlexgroupSize

func (d OntapAPIREST) FlexgroupSize(ctx context.Context, volumeName string) (uint64, error)

func (OntapAPIREST) FlexgroupSnapshotCreate

func (d OntapAPIREST) FlexgroupSnapshotCreate(ctx context.Context, snapshotName, sourceVolume string) error

func (OntapAPIREST) FlexgroupSnapshotDelete

func (d OntapAPIREST) FlexgroupSnapshotDelete(ctx context.Context, snapshotName, sourceVolume string) error

func (OntapAPIREST) FlexgroupSnapshotList

func (d OntapAPIREST) FlexgroupSnapshotList(ctx context.Context, sourceVolume string) (Snapshots, error)

func (OntapAPIREST) FlexgroupUnmount

func (d OntapAPIREST) FlexgroupUnmount(ctx context.Context, name string, _ bool) error

func (OntapAPIREST) FlexgroupUsedSize

func (d OntapAPIREST) FlexgroupUsedSize(ctx context.Context, volumeName string) (int, error)

func (OntapAPIREST) GetCommentJSON

func (d OntapAPIREST) GetCommentJSON(ctx context.Context, fstype, context, luks string, commentLimit int) (string,
	error,
)

TODO: Change this for LUN Attributes when available GetCommentJSON returns a JSON-formatted string containing the labels on this LUN. This is a temporary solution until we are able to implement LUN attributes in REST For example: {"lunAttributes":{"fstype":"xfs","driverContext":"csi"}}

func (OntapAPIREST) GetSLMDataLifs

func (d OntapAPIREST) GetSLMDataLifs(ctx context.Context, ips, reportingNodeNames []string) ([]string, error)

GetSLMDataLifs returns IP addresses whose node name matches reporting node names

func (OntapAPIREST) GetSVMAggregateAttributes

func (d OntapAPIREST) GetSVMAggregateAttributes(ctx context.Context) (aggrList map[string]string, err error)

func (OntapAPIREST) GetSVMAggregateNames

func (d OntapAPIREST) GetSVMAggregateNames(ctx context.Context) ([]string, error)

func (OntapAPIREST) GetSVMAggregateSpace

func (d OntapAPIREST) GetSVMAggregateSpace(ctx context.Context, aggregate string) ([]SVMAggregateSpace, error)

func (OntapAPIREST) GetSVMPeers

func (d OntapAPIREST) GetSVMPeers(ctx context.Context) ([]string, error)

func (OntapAPIREST) GetSVMUUID

func (d OntapAPIREST) GetSVMUUID() string

func (OntapAPIREST) IgroupCreate

func (d OntapAPIREST) IgroupCreate(ctx context.Context, initiatorGroupName, initiatorGroupType, osType string) error

func (OntapAPIREST) IgroupDestroy

func (d OntapAPIREST) IgroupDestroy(ctx context.Context, initiatorGroupName string) error

func (OntapAPIREST) IgroupGetByName

func (d OntapAPIREST) IgroupGetByName(ctx context.Context, initiatorGroupName string) (map[string]bool,
	error,
)

func (OntapAPIREST) IgroupListLUNsMapped

func (d OntapAPIREST) IgroupListLUNsMapped(ctx context.Context, initiatorGroupName string) ([]string, error)

IgroupListLUNsMapped returns a list LUNs mapped to the igroup

func (OntapAPIREST) IgroupRemove

func (d OntapAPIREST) IgroupRemove(ctx context.Context, initiatorGroupName, initiator string, force bool) error

func (OntapAPIREST) IsSVMDRCapable

func (d OntapAPIREST) IsSVMDRCapable(_ context.Context) (bool, error)

func (OntapAPIREST) IscsiInitiatorGetDefaultAuth

func (d OntapAPIREST) IscsiInitiatorGetDefaultAuth(ctx context.Context) (IscsiInitiatorAuth, error)

func (OntapAPIREST) IscsiInitiatorSetDefaultAuth

func (d OntapAPIREST) IscsiInitiatorSetDefaultAuth(
	ctx context.Context, authType, userName, passphrase, outbountUserName, outboundPassphrase string,
) error

func (OntapAPIREST) IscsiInterfaceGet

func (d OntapAPIREST) IscsiInterfaceGet(ctx context.Context, svm string) ([]string, error)

func (OntapAPIREST) IscsiNodeGetNameRequest

func (d OntapAPIREST) IscsiNodeGetNameRequest(ctx context.Context) (string, error)

func (OntapAPIREST) JobScheduleExists

func (d OntapAPIREST) JobScheduleExists(ctx context.Context, replicationSchedule string) error

func (OntapAPIREST) LunCloneCreate

func (d OntapAPIREST) LunCloneCreate(ctx context.Context, flexvol, source, lunPath string,
	qosPolicyGroup QosPolicyGroup,
) error

func (OntapAPIREST) LunCreate

func (d OntapAPIREST) LunCreate(ctx context.Context, lun Lun) error

func (OntapAPIREST) LunDestroy

func (d OntapAPIREST) LunDestroy(ctx context.Context, lunPath string) error

func (OntapAPIREST) LunGetByName

func (d OntapAPIREST) LunGetByName(ctx context.Context, name string) (*Lun, error)

func (OntapAPIREST) LunGetComment

func (d OntapAPIREST) LunGetComment(ctx context.Context, lunPath string) (string, bool, error)

TODO: Change this for LUN Attributes when available

func (OntapAPIREST) LunGetGeometry

func (d OntapAPIREST) LunGetGeometry(ctx context.Context, lunPath string) (uint64, error)

func (OntapAPIREST) LunList

func (d OntapAPIREST) LunList(ctx context.Context, pattern string) (Luns, error)

func (OntapAPIREST) LunListIgroupsMapped

func (d OntapAPIREST) LunListIgroupsMapped(ctx context.Context, lunPath string) ([]string, error)

LunListIgroupsMapped returns a list of igroups the LUN is currently mapped to.

func (OntapAPIREST) LunMapGetReportingNodes

func (d OntapAPIREST) LunMapGetReportingNodes(ctx context.Context, initiatorGroupName, lunPath string) (
	[]string, error,
)

LunMapGetReportingNodes returns a list of LUN map details equivalent to filer::> lun mapping show -vserver iscsi_vs -path /vol/v/lun0 -igroup trident

func (OntapAPIREST) LunMapInfo

func (d OntapAPIREST) LunMapInfo(ctx context.Context, initiatorGroupName, lunPath string) (int, error)

func (OntapAPIREST) LunRename

func (d OntapAPIREST) LunRename(ctx context.Context, lunPath, newLunPath string) error

func (OntapAPIREST) LunSetAttribute

func (d OntapAPIREST) LunSetAttribute(ctx context.Context, lunPath, attribute, fstype, context, luks string) error

func (OntapAPIREST) LunSetComments

func (d OntapAPIREST) LunSetComments(ctx context.Context, lunPath, fstype, context, luks string) error

TODO: Change this for LUN Attributes when available

func (OntapAPIREST) LunSetQosPolicyGroup

func (d OntapAPIREST) LunSetQosPolicyGroup(ctx context.Context, lunPath string, qosPolicyGroup QosPolicyGroup) error

func (OntapAPIREST) LunSetSize

func (d OntapAPIREST) LunSetSize(ctx context.Context, lunPath, newSize string) (uint64, error)

func (OntapAPIREST) LunSize

func (d OntapAPIREST) LunSize(ctx context.Context, flexvolName string) (int, error)

func (OntapAPIREST) LunUnmap

func (d OntapAPIREST) LunUnmap(ctx context.Context, initiatorGroupName, lunPath string) error

func (OntapAPIREST) NetInterfaceGetDataLIFs

func (d OntapAPIREST) NetInterfaceGetDataLIFs(ctx context.Context, protocol string) ([]string, error)

func (OntapAPIREST) NodeListSerialNumbers

func (d OntapAPIREST) NodeListSerialNumbers(ctx context.Context) ([]string, error)

func (OntapAPIREST) ParseLunComment

func (d OntapAPIREST) ParseLunComment(ctx context.Context, commentJSON string) (map[string]string, error)

func (OntapAPIREST) QtreeCount

func (d OntapAPIREST) QtreeCount(ctx context.Context, volumeName string) (int, error)

func (OntapAPIREST) QtreeCreate

func (d OntapAPIREST) QtreeCreate(
	ctx context.Context, name, volumeName, unixPermissions, exportPolicy, securityStyle, qosPolicy string,
) error

func (OntapAPIREST) QtreeDestroyAsync

func (d OntapAPIREST) QtreeDestroyAsync(ctx context.Context, path string, force bool) error

func (OntapAPIREST) QtreeExists

func (d OntapAPIREST) QtreeExists(ctx context.Context, name, volumePrefix string) (bool, string, error)

func (OntapAPIREST) QtreeGetByName

func (d OntapAPIREST) QtreeGetByName(ctx context.Context, name, volumePrefix string) (*Qtree, error)

func (OntapAPIREST) QtreeListByPrefix

func (d OntapAPIREST) QtreeListByPrefix(ctx context.Context, prefix, volumePrefix string) (Qtrees, error)

func (OntapAPIREST) QtreeModifyExportPolicy

func (d OntapAPIREST) QtreeModifyExportPolicy(ctx context.Context, name, volumeName, newExportPolicyName string) error

func (OntapAPIREST) QtreeRename

func (d OntapAPIREST) QtreeRename(ctx context.Context, path, newPath string) error

func (OntapAPIREST) QuotaEntryList

func (d OntapAPIREST) QuotaEntryList(ctx context.Context, volumeName string) (QuotaEntries, error)

func (OntapAPIREST) QuotaGetEntry

func (d OntapAPIREST) QuotaGetEntry(ctx context.Context, volumeName, qtreeName, quotaType string) (*QuotaEntry, error)

func (OntapAPIREST) QuotaOff

func (d OntapAPIREST) QuotaOff(ctx context.Context, volumeName string) error

func (OntapAPIREST) QuotaOn

func (d OntapAPIREST) QuotaOn(ctx context.Context, volumeName string) error

func (OntapAPIREST) QuotaResize

func (d OntapAPIREST) QuotaResize(context.Context, string) error

func (OntapAPIREST) QuotaSetEntry

func (d OntapAPIREST) QuotaSetEntry(ctx context.Context, qtreeName, volumeName, quotaType, diskLimit string) error

func (OntapAPIREST) QuotaStatus

func (d OntapAPIREST) QuotaStatus(ctx context.Context, volumeName string) (string, error)

func (OntapAPIREST) SVMName

func (d OntapAPIREST) SVMName() string

func (OntapAPIREST) SnapmirrorAbort

func (d OntapAPIREST) SnapmirrorAbort(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) error

func (OntapAPIREST) SnapmirrorBreak

func (d OntapAPIREST) SnapmirrorBreak(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName, snapshotName string,
) error

func (OntapAPIREST) SnapmirrorCreate

func (d OntapAPIREST) SnapmirrorCreate(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName, replicationPolicy, replicationSchedule string,
) error

func (OntapAPIREST) SnapmirrorDelete

func (d OntapAPIREST) SnapmirrorDelete(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) error

func (OntapAPIREST) SnapmirrorDeleteViaDestination

func (d OntapAPIREST) SnapmirrorDeleteViaDestination(_, _ string) error

func (OntapAPIREST) SnapmirrorGet

func (d OntapAPIREST) SnapmirrorGet(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) (*Snapmirror, error)

func (OntapAPIREST) SnapmirrorInitialize

func (d OntapAPIREST) SnapmirrorInitialize(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) error

func (OntapAPIREST) SnapmirrorPolicyGet

func (d OntapAPIREST) SnapmirrorPolicyGet(ctx context.Context, replicationPolicy string) (*SnapmirrorPolicy, error)

func (OntapAPIREST) SnapmirrorQuiesce

func (d OntapAPIREST) SnapmirrorQuiesce(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) error

func (OntapAPIREST) SnapmirrorRelease

func (d OntapAPIREST) SnapmirrorRelease(_, _ string) error

func (OntapAPIREST) SnapmirrorResync

func (d OntapAPIREST) SnapmirrorResync(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) error

func (OntapAPIREST) SnapshotDeleteByNameAndStyle

func (d OntapAPIREST) SnapshotDeleteByNameAndStyle(
	ctx context.Context, snapshotName, sourceVolume, sourceVolumeUUID string,
) error

func (OntapAPIREST) SnapshotRestoreFlexgroup

func (d OntapAPIREST) SnapshotRestoreFlexgroup(ctx context.Context, snapshotName, sourceVolume string) error

func (OntapAPIREST) SnapshotRestoreVolume

func (d OntapAPIREST) SnapshotRestoreVolume(
	ctx context.Context, snapshotName, sourceVolume string,
) error

func (OntapAPIREST) SupportsFeature

func (d OntapAPIREST) SupportsFeature(ctx context.Context, feature Feature) bool

func (OntapAPIREST) TieringPolicyValue

func (d OntapAPIREST) TieringPolicyValue(ctx context.Context) string

func (OntapAPIREST) ValidateAPIVersion

func (d OntapAPIREST) ValidateAPIVersion(ctx context.Context) error

func (OntapAPIREST) VolumeCloneCreate

func (d OntapAPIREST) VolumeCloneCreate(ctx context.Context, cloneName, sourceName, snapshot string, async bool) error

func (OntapAPIREST) VolumeCloneSplitStart

func (d OntapAPIREST) VolumeCloneSplitStart(ctx context.Context, cloneName string) error

func (OntapAPIREST) VolumeCreate

func (d OntapAPIREST) VolumeCreate(ctx context.Context, volume Volume) error

func (OntapAPIREST) VolumeDestroy

func (d OntapAPIREST) VolumeDestroy(ctx context.Context, name string, force bool) error

func (OntapAPIREST) VolumeDisableSnapshotDirectoryAccess

func (d OntapAPIREST) VolumeDisableSnapshotDirectoryAccess(ctx context.Context, name string) error

func (OntapAPIREST) VolumeExists

func (d OntapAPIREST) VolumeExists(ctx context.Context, volumeName string) (bool, error)

func (OntapAPIREST) VolumeInfo

func (d OntapAPIREST) VolumeInfo(ctx context.Context, name string) (*Volume, error)

func (OntapAPIREST) VolumeListByAttrs

func (d OntapAPIREST) VolumeListByAttrs(ctx context.Context, volumeAttrs *Volume) (Volumes, error)

VolumeListByAttrs is used to find bucket volumes for nas-eco and san-eco

func (OntapAPIREST) VolumeListByPrefix

func (d OntapAPIREST) VolumeListByPrefix(ctx context.Context, prefix string) (Volumes, error)

func (OntapAPIREST) VolumeListBySnapshotParent

func (d OntapAPIREST) VolumeListBySnapshotParent(
	ctx context.Context, snapshotName, sourceVolume string,
) (VolumeNameList, error)

func (OntapAPIREST) VolumeModifyExportPolicy

func (d OntapAPIREST) VolumeModifyExportPolicy(ctx context.Context, volumeName, policyName string) error

func (OntapAPIREST) VolumeModifyUnixPermissions

func (d OntapAPIREST) VolumeModifyUnixPermissions(
	ctx context.Context, volumeNameInternal, volumeNameExternal, unixPermissions string,
) error

func (OntapAPIREST) VolumeMount

func (d OntapAPIREST) VolumeMount(ctx context.Context, name, junctionPath string) error

func (OntapAPIREST) VolumeRename

func (d OntapAPIREST) VolumeRename(ctx context.Context, originalName, newName string) error

func (OntapAPIREST) VolumeSetComment

func (d OntapAPIREST) VolumeSetComment(
	ctx context.Context, volumeNameInternal, volumeNameExternal, comment string,
) error

func (OntapAPIREST) VolumeSetQosPolicyGroupName

func (d OntapAPIREST) VolumeSetQosPolicyGroupName(ctx context.Context, name string, qos QosPolicyGroup) error

func (OntapAPIREST) VolumeSetSize

func (d OntapAPIREST) VolumeSetSize(ctx context.Context, name, newSize string) error

func (OntapAPIREST) VolumeSize

func (d OntapAPIREST) VolumeSize(ctx context.Context, volumeName string) (uint64, error)

func (OntapAPIREST) VolumeSnapshotCreate

func (d OntapAPIREST) VolumeSnapshotCreate(ctx context.Context, snapshotName, sourceVolume string) error

func (OntapAPIREST) VolumeSnapshotDelete

func (d OntapAPIREST) VolumeSnapshotDelete(ctx context.Context, snapshotName, sourceVolume string) error

func (OntapAPIREST) VolumeSnapshotList

func (d OntapAPIREST) VolumeSnapshotList(ctx context.Context, sourceVolume string) (Snapshots, error)

func (OntapAPIREST) VolumeUsedSize

func (d OntapAPIREST) VolumeUsedSize(ctx context.Context, volumeName string) (int, error)

type OntapAPIZAPI

type OntapAPIZAPI struct {
	// contains filtered or unexported fields
}

func NewOntapAPIZAPI

func NewOntapAPIZAPI(zapiClient *Client) (OntapAPIZAPI, error)

func NewOntapAPIZAPIFromZapiClientInterface

func NewOntapAPIZAPIFromZapiClientInterface(zapiClient ZapiClientInterface) (OntapAPIZAPI, error)

NewOntapAPIZAPIFromZapiClientInterface added for testing

func (OntapAPIZAPI) APIVersion

func (d OntapAPIZAPI) APIVersion(ctx context.Context) (string, error)

func (OntapAPIZAPI) EmsAutosupportLog

func (d OntapAPIZAPI) EmsAutosupportLog(
	ctx context.Context,
	driverName string,
	appVersion string,
	autoSupport bool,
	category string,
	computerName string,
	eventDescription string,
	eventID int,
	eventSource string,
	logLevel int,
)

EmsAutosupportLog generates an auto support message with the supplied parameters

func (OntapAPIZAPI) EnsureIgroupAdded

func (d OntapAPIZAPI) EnsureIgroupAdded(ctx context.Context, initiatorGroupName, initiator string) error

func (OntapAPIZAPI) EnsureLunMapped

func (d OntapAPIZAPI) EnsureLunMapped(
	ctx context.Context, initiatorGroupName, lunPath string, importNotManaged bool,
) (int, error)

func (OntapAPIZAPI) ExportPolicyCreate

func (d OntapAPIZAPI) ExportPolicyCreate(ctx context.Context, policy string) error

func (OntapAPIZAPI) ExportPolicyDestroy

func (d OntapAPIZAPI) ExportPolicyDestroy(ctx context.Context, policy string) error

func (OntapAPIZAPI) ExportPolicyExists

func (d OntapAPIZAPI) ExportPolicyExists(ctx context.Context, policyName string) (bool, error)

func (OntapAPIZAPI) ExportRuleCreate

func (d OntapAPIZAPI) ExportRuleCreate(ctx context.Context, policyName, desiredPolicyRule string) error

func (OntapAPIZAPI) ExportRuleDestroy

func (d OntapAPIZAPI) ExportRuleDestroy(ctx context.Context, policyName string, ruleIndex int) error

func (OntapAPIZAPI) ExportRuleList

func (d OntapAPIZAPI) ExportRuleList(ctx context.Context, policyName string) (map[string]int, error)

func (OntapAPIZAPI) FlexgroupCloneSplitStart

func (d OntapAPIZAPI) FlexgroupCloneSplitStart(ctx context.Context, cloneName string) error

func (OntapAPIZAPI) FlexgroupCreate

func (d OntapAPIZAPI) FlexgroupCreate(ctx context.Context, volume Volume) error

func (OntapAPIZAPI) FlexgroupDestroy

func (d OntapAPIZAPI) FlexgroupDestroy(ctx context.Context, volumeName string, force bool) error

func (OntapAPIZAPI) FlexgroupDisableSnapshotDirectoryAccess

func (d OntapAPIZAPI) FlexgroupDisableSnapshotDirectoryAccess(ctx context.Context, volumeName string) error

func (OntapAPIZAPI) FlexgroupExists

func (d OntapAPIZAPI) FlexgroupExists(ctx context.Context, volumeName string) (bool, error)

func (OntapAPIZAPI) FlexgroupInfo

func (d OntapAPIZAPI) FlexgroupInfo(ctx context.Context, volumeName string) (*Volume, error)

func (OntapAPIZAPI) FlexgroupListByPrefix

func (d OntapAPIZAPI) FlexgroupListByPrefix(ctx context.Context, prefix string) (Volumes, error)

func (OntapAPIZAPI) FlexgroupModifyExportPolicy

func (d OntapAPIZAPI) FlexgroupModifyExportPolicy(ctx context.Context, volumeName, policyName string) error

func (OntapAPIZAPI) FlexgroupModifyUnixPermissions

func (d OntapAPIZAPI) FlexgroupModifyUnixPermissions(
	ctx context.Context, volumeNameInternal, volumeNameExternal, unixPermissions string,
) error

func (OntapAPIZAPI) FlexgroupMount

func (d OntapAPIZAPI) FlexgroupMount(ctx context.Context, name, junctionPath string) error

func (OntapAPIZAPI) FlexgroupSetComment

func (d OntapAPIZAPI) FlexgroupSetComment(
	ctx context.Context, volumeNameInternal, volumeNameExternal, comment string,
) error

func (OntapAPIZAPI) FlexgroupSetQosPolicyGroupName

func (d OntapAPIZAPI) FlexgroupSetQosPolicyGroupName(ctx context.Context, name string, qos QosPolicyGroup) error

func (OntapAPIZAPI) FlexgroupSetSize

func (d OntapAPIZAPI) FlexgroupSetSize(ctx context.Context, name, newSize string) error

func (OntapAPIZAPI) FlexgroupSize

func (d OntapAPIZAPI) FlexgroupSize(_ context.Context, volumeName string) (uint64, error)

func (OntapAPIZAPI) FlexgroupSnapshotCreate

func (d OntapAPIZAPI) FlexgroupSnapshotCreate(ctx context.Context, snapshotName, sourceVolume string) error

func (OntapAPIZAPI) FlexgroupSnapshotDelete

func (d OntapAPIZAPI) FlexgroupSnapshotDelete(ctx context.Context, snapshotName, sourceVolume string) error

func (OntapAPIZAPI) FlexgroupSnapshotList

func (d OntapAPIZAPI) FlexgroupSnapshotList(ctx context.Context, sourceVolume string) (Snapshots, error)

func (OntapAPIZAPI) FlexgroupUnmount

func (d OntapAPIZAPI) FlexgroupUnmount(ctx context.Context, name string, force bool) error

func (OntapAPIZAPI) FlexgroupUsedSize

func (d OntapAPIZAPI) FlexgroupUsedSize(_ context.Context, volumeName string) (int, error)

func (OntapAPIZAPI) GetSLMDataLifs

func (d OntapAPIZAPI) GetSLMDataLifs(ctx context.Context, ips, reportingNodeNames []string) ([]string, error)

GetSLMDataLifs returns IP addresses whose node name matches reporting node names

func (OntapAPIZAPI) GetSVMAggregateAttributes

func (d OntapAPIZAPI) GetSVMAggregateAttributes(_ context.Context) (aggrList map[string]string, err error)

func (OntapAPIZAPI) GetSVMAggregateNames

func (d OntapAPIZAPI) GetSVMAggregateNames(_ context.Context) ([]string, error)

func (OntapAPIZAPI) GetSVMAggregateSpace

func (d OntapAPIZAPI) GetSVMAggregateSpace(ctx context.Context, aggregate string) ([]SVMAggregateSpace, error)

func (OntapAPIZAPI) GetSVMPeers

func (d OntapAPIZAPI) GetSVMPeers(ctx context.Context) ([]string, error)

func (OntapAPIZAPI) GetSVMUUID

func (d OntapAPIZAPI) GetSVMUUID() string

func (OntapAPIZAPI) IgroupCreate

func (d OntapAPIZAPI) IgroupCreate(ctx context.Context, initiatorGroupName, initiatorGroupType, osType string) error

func (OntapAPIZAPI) IgroupDestroy

func (d OntapAPIZAPI) IgroupDestroy(ctx context.Context, initiatorGroupName string) error

Same functionality as cleanIgroups from ontap_common.go

func (OntapAPIZAPI) IgroupGetByName

func (d OntapAPIZAPI) IgroupGetByName(ctx context.Context, initiatorGroupName string) (
	map[string]bool, error,
)

func (OntapAPIZAPI) IgroupListLUNsMapped

func (d OntapAPIZAPI) IgroupListLUNsMapped(ctx context.Context, initiatorGroupName string) ([]string, error)

IgroupListLUNsMapped returns a list of LUNs currently mapped to the given Igroup.

func (OntapAPIZAPI) IgroupRemove

func (d OntapAPIZAPI) IgroupRemove(ctx context.Context, initiatorGroupName, initiator string, force bool) error

func (OntapAPIZAPI) IsSVMDRCapable

func (d OntapAPIZAPI) IsSVMDRCapable(ctx context.Context) (bool, error)

func (OntapAPIZAPI) IscsiInitiatorGetDefaultAuth

func (d OntapAPIZAPI) IscsiInitiatorGetDefaultAuth(ctx context.Context) (IscsiInitiatorAuth, error)

func (OntapAPIZAPI) IscsiInitiatorSetDefaultAuth

func (d OntapAPIZAPI) IscsiInitiatorSetDefaultAuth(
	ctx context.Context, authType, userName, passphrase, outbountUserName, outboundPassphrase string,
) error

func (OntapAPIZAPI) IscsiInterfaceGet

func (d OntapAPIZAPI) IscsiInterfaceGet(ctx context.Context, svm string) ([]string, error)

func (OntapAPIZAPI) IscsiNodeGetNameRequest

func (d OntapAPIZAPI) IscsiNodeGetNameRequest(ctx context.Context) (string, error)

func (OntapAPIZAPI) JobScheduleExists

func (d OntapAPIZAPI) JobScheduleExists(ctx context.Context, replicationSchedule string) error

func (OntapAPIZAPI) LunCloneCreate

func (d OntapAPIZAPI) LunCloneCreate(ctx context.Context, flexvol, source, lunName string, qosPolicyGroup QosPolicyGroup) error

func (OntapAPIZAPI) LunCreate

func (d OntapAPIZAPI) LunCreate(ctx context.Context, lun Lun) error

func (OntapAPIZAPI) LunDestroy

func (d OntapAPIZAPI) LunDestroy(ctx context.Context, lunPath string) error

func (OntapAPIZAPI) LunGetByName

func (d OntapAPIZAPI) LunGetByName(ctx context.Context, name string) (*Lun, error)

func (OntapAPIZAPI) LunGetComment

func (d OntapAPIZAPI) LunGetComment(ctx context.Context, lunPath string) (string, bool, error)

func (OntapAPIZAPI) LunGetGeometry

func (d OntapAPIZAPI) LunGetGeometry(ctx context.Context, lunPath string) (uint64, error)

func (OntapAPIZAPI) LunList

func (d OntapAPIZAPI) LunList(ctx context.Context, pattern string) (Luns, error)

func (OntapAPIZAPI) LunListIgroupsMapped

func (d OntapAPIZAPI) LunListIgroupsMapped(ctx context.Context, lunPath string) ([]string, error)

LunListIgroupsMapped returns a list of igroups the LUN is currently mapped to.

func (OntapAPIZAPI) LunMapGetReportingNodes

func (d OntapAPIZAPI) LunMapGetReportingNodes(ctx context.Context, initiatorGroupName, lunPath string) (
	[]string, error,
)

func (OntapAPIZAPI) LunMapInfo

func (d OntapAPIZAPI) LunMapInfo(ctx context.Context, initiatorGroupName, lunPath string) (int, error)

func (OntapAPIZAPI) LunRename

func (d OntapAPIZAPI) LunRename(ctx context.Context, lunPath, newLunPath string) error

func (OntapAPIZAPI) LunSetAttribute

func (d OntapAPIZAPI) LunSetAttribute(ctx context.Context, lunPath, attribute, fstype, context, luks string) error

func (OntapAPIZAPI) LunSetQosPolicyGroup

func (d OntapAPIZAPI) LunSetQosPolicyGroup(ctx context.Context, lunPath string, qosPolicyGroup QosPolicyGroup) error

func (OntapAPIZAPI) LunSetSize

func (d OntapAPIZAPI) LunSetSize(ctx context.Context, lunPath, newSize string) (uint64, error)

func (OntapAPIZAPI) LunSize

func (d OntapAPIZAPI) LunSize(ctx context.Context, flexvolName string) (int, error)

func (OntapAPIZAPI) LunUnmap

func (d OntapAPIZAPI) LunUnmap(ctx context.Context, initiatorGroupName, lunPath string) error

func (OntapAPIZAPI) NetInterfaceGetDataLIFs

func (d OntapAPIZAPI) NetInterfaceGetDataLIFs(ctx context.Context, protocol string) ([]string, error)

func (OntapAPIZAPI) NodeListSerialNumbers

func (d OntapAPIZAPI) NodeListSerialNumbers(ctx context.Context) ([]string, error)

func (OntapAPIZAPI) ParseLunComment

func (d OntapAPIZAPI) ParseLunComment(ctx context.Context, commentJSON string) (map[string]string, error)

func (OntapAPIZAPI) QtreeCount

func (d OntapAPIZAPI) QtreeCount(ctx context.Context, volumeName string) (int, error)

func (OntapAPIZAPI) QtreeCreate

func (d OntapAPIZAPI) QtreeCreate(
	ctx context.Context, name, volumeName, unixPermissions, exportPolicy, securityStyle, qosPolicy string,
) error

func (OntapAPIZAPI) QtreeDestroyAsync

func (d OntapAPIZAPI) QtreeDestroyAsync(ctx context.Context, path string, force bool) error

func (OntapAPIZAPI) QtreeExists

func (d OntapAPIZAPI) QtreeExists(ctx context.Context, name, volumePrefix string) (bool, string, error)

func (OntapAPIZAPI) QtreeGetByName

func (d OntapAPIZAPI) QtreeGetByName(ctx context.Context, name, volumePrefix string) (*Qtree, error)

func (OntapAPIZAPI) QtreeListByPrefix

func (d OntapAPIZAPI) QtreeListByPrefix(ctx context.Context, prefix, volumePrefix string) (Qtrees, error)

func (OntapAPIZAPI) QtreeModifyExportPolicy

func (d OntapAPIZAPI) QtreeModifyExportPolicy(ctx context.Context, name, volumeName, newExportPolicyName string) error

func (OntapAPIZAPI) QtreeRename

func (d OntapAPIZAPI) QtreeRename(ctx context.Context, path, newPath string) error

func (OntapAPIZAPI) QuotaEntryList

func (d OntapAPIZAPI) QuotaEntryList(ctx context.Context, volumeName string) (QuotaEntries, error)

func (OntapAPIZAPI) QuotaGetEntry

func (d OntapAPIZAPI) QuotaGetEntry(ctx context.Context, volumeName, qtreeName, quotaType string) (*QuotaEntry, error)

func (OntapAPIZAPI) QuotaOff

func (d OntapAPIZAPI) QuotaOff(ctx context.Context, volumeName string) error

func (OntapAPIZAPI) QuotaOn

func (d OntapAPIZAPI) QuotaOn(ctx context.Context, volumeName string) error

func (OntapAPIZAPI) QuotaResize

func (d OntapAPIZAPI) QuotaResize(ctx context.Context, volumeName string) error

func (OntapAPIZAPI) QuotaSetEntry

func (d OntapAPIZAPI) QuotaSetEntry(ctx context.Context, qtreeName, volumeName, quotaType, diskLimit string) error

func (OntapAPIZAPI) QuotaStatus

func (d OntapAPIZAPI) QuotaStatus(ctx context.Context, volumeName string) (string, error)

func (OntapAPIZAPI) SVMName

func (d OntapAPIZAPI) SVMName() string

func (OntapAPIZAPI) SVMUUID

func (d OntapAPIZAPI) SVMUUID() string

func (OntapAPIZAPI) SetSVMUUID

func (d OntapAPIZAPI) SetSVMUUID(svmUUID string)

func (OntapAPIZAPI) SnapmirrorAbort

func (d OntapAPIZAPI) SnapmirrorAbort(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) error

func (OntapAPIZAPI) SnapmirrorBreak

func (d OntapAPIZAPI) SnapmirrorBreak(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName, snapshotName string,
) error

func (OntapAPIZAPI) SnapmirrorCreate

func (d OntapAPIZAPI) SnapmirrorCreate(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName, replicationPolicy, replicationSchedule string,
) error

func (OntapAPIZAPI) SnapmirrorDelete

func (d OntapAPIZAPI) SnapmirrorDelete(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) error

func (OntapAPIZAPI) SnapmirrorDeleteViaDestination

func (d OntapAPIZAPI) SnapmirrorDeleteViaDestination(localFlexvolName, localSVMName string) error

func (OntapAPIZAPI) SnapmirrorGet

func (d OntapAPIZAPI) SnapmirrorGet(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) (*Snapmirror, error)

func (OntapAPIZAPI) SnapmirrorInitialize

func (d OntapAPIZAPI) SnapmirrorInitialize(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) error

func (OntapAPIZAPI) SnapmirrorPolicyGet

func (d OntapAPIZAPI) SnapmirrorPolicyGet(ctx context.Context, replicationPolicy string) (*SnapmirrorPolicy, error)

func (OntapAPIZAPI) SnapmirrorQuiesce

func (d OntapAPIZAPI) SnapmirrorQuiesce(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) error

func (OntapAPIZAPI) SnapmirrorRelease

func (d OntapAPIZAPI) SnapmirrorRelease(sourceFlexvolName, sourceSVMName string) error

func (OntapAPIZAPI) SnapmirrorResync

func (d OntapAPIZAPI) SnapmirrorResync(
	ctx context.Context, localFlexvolName, localSVMName, remoteFlexvolName,
	remoteSVMName string,
) error

func (OntapAPIZAPI) SnapshotRestoreFlexgroup

func (d OntapAPIZAPI) SnapshotRestoreFlexgroup(ctx context.Context, snapshotName, sourceVolume string) error

func (OntapAPIZAPI) SnapshotRestoreVolume

func (d OntapAPIZAPI) SnapshotRestoreVolume(
	ctx context.Context, snapshotName, sourceVolume string,
) error

func (OntapAPIZAPI) SupportsFeature

func (d OntapAPIZAPI) SupportsFeature(ctx context.Context, feature Feature) bool

func (OntapAPIZAPI) TieringPolicyValue

func (d OntapAPIZAPI) TieringPolicyValue(ctx context.Context) string

func (OntapAPIZAPI) ValidateAPIVersion

func (d OntapAPIZAPI) ValidateAPIVersion(ctx context.Context) error

func (OntapAPIZAPI) VolumeCloneCreate

func (d OntapAPIZAPI) VolumeCloneCreate(ctx context.Context, cloneName, sourceName, snapshot string, async bool) error

func (OntapAPIZAPI) VolumeCloneSplitStart

func (d OntapAPIZAPI) VolumeCloneSplitStart(ctx context.Context, cloneName string) error

func (OntapAPIZAPI) VolumeCreate

func (d OntapAPIZAPI) VolumeCreate(ctx context.Context, volume Volume) error

func (OntapAPIZAPI) VolumeDestroy

func (d OntapAPIZAPI) VolumeDestroy(ctx context.Context, name string, force bool) error

func (OntapAPIZAPI) VolumeDisableSnapshotDirectoryAccess

func (d OntapAPIZAPI) VolumeDisableSnapshotDirectoryAccess(ctx context.Context, name string) error

func (OntapAPIZAPI) VolumeExists

func (d OntapAPIZAPI) VolumeExists(ctx context.Context, volumeName string) (bool, error)

func (OntapAPIZAPI) VolumeInfo

func (d OntapAPIZAPI) VolumeInfo(ctx context.Context, name string) (*Volume, error)

func (OntapAPIZAPI) VolumeListByAttrs

func (d OntapAPIZAPI) VolumeListByAttrs(ctx context.Context, volumeAttrs *Volume) (Volumes, error)

func (OntapAPIZAPI) VolumeListByPrefix

func (d OntapAPIZAPI) VolumeListByPrefix(ctx context.Context, prefix string) (Volumes, error)

func (OntapAPIZAPI) VolumeListBySnapshotParent

func (d OntapAPIZAPI) VolumeListBySnapshotParent(
	ctx context.Context, snapshotName, sourceVolume string,
) (VolumeNameList, error)

func (OntapAPIZAPI) VolumeModifyExportPolicy

func (d OntapAPIZAPI) VolumeModifyExportPolicy(ctx context.Context, volumeName, policyName string) error

func (OntapAPIZAPI) VolumeModifyUnixPermissions

func (d OntapAPIZAPI) VolumeModifyUnixPermissions(
	ctx context.Context, volumeNameInternal, volumeNameExternal, unixPermissions string,
) error

func (OntapAPIZAPI) VolumeMount

func (d OntapAPIZAPI) VolumeMount(ctx context.Context, name, junctionPath string) error

func (OntapAPIZAPI) VolumeRename

func (d OntapAPIZAPI) VolumeRename(ctx context.Context, originalName, newName string) error

func (OntapAPIZAPI) VolumeSetComment

func (d OntapAPIZAPI) VolumeSetComment(
	ctx context.Context, volumeNameInternal, volumeNameExternal, comment string,
) error

func (OntapAPIZAPI) VolumeSetQosPolicyGroupName

func (d OntapAPIZAPI) VolumeSetQosPolicyGroupName(ctx context.Context, name string, qos QosPolicyGroup) error

func (OntapAPIZAPI) VolumeSetSize

func (d OntapAPIZAPI) VolumeSetSize(ctx context.Context, name, newSize string) error

func (OntapAPIZAPI) VolumeSize

func (d OntapAPIZAPI) VolumeSize(_ context.Context, volumeName string) (uint64, error)

func (OntapAPIZAPI) VolumeSnapshotCreate

func (d OntapAPIZAPI) VolumeSnapshotCreate(ctx context.Context, snapshotName, sourceVolume string) error

func (OntapAPIZAPI) VolumeSnapshotDelete

func (d OntapAPIZAPI) VolumeSnapshotDelete(_ context.Context, snapshotName, sourceVolume string) error

func (OntapAPIZAPI) VolumeSnapshotList

func (d OntapAPIZAPI) VolumeSnapshotList(ctx context.Context, sourceVolume string) (Snapshots, error)

func (OntapAPIZAPI) VolumeUsedSize

func (d OntapAPIZAPI) VolumeUsedSize(_ context.Context, volumeName string) (int, error)

type ParamWrapper

type ParamWrapper struct {
	// contains filtered or unexported fields
}

ParamWrapper wraps a Param instance and overrides request parameters

func (*ParamWrapper) WriteToRequest

func (o *ParamWrapper) WriteToRequest(r runtime.ClientRequest, req strfmt.Registry) error

WriteToRequest uses composition to achieve collection pagination traversals * first, apply the original (wrapped) Param * then, apply any request values specified in the next link

type QosPolicyGroup

type QosPolicyGroup struct {
	Name string
	Kind QosPolicyGroupKindType
}

func NewQosPolicyGroup

func NewQosPolicyGroup(qosPolicy, adaptiveQosPolicy string) (QosPolicyGroup, error)

type QosPolicyGroupKindType

type QosPolicyGroupKindType int
const (
	InvalidQosPolicyGroupKind QosPolicyGroupKindType = iota
	QosPolicyGroupKind
	QosAdaptivePolicyGroupKind
)

type Qtree

type Qtree struct {
	ExportPolicy    string
	Name            string
	UnixPermissions string
	SecurityStyle   string
	Volume          string
	Vserver         string
}

type QtreeNameList

type QtreeNameList []string

type Qtrees

type Qtrees []*Qtree

type QuotaEntries

type QuotaEntries []*QuotaEntry

type QuotaEntry

type QuotaEntry struct {
	Target         string
	DiskLimitBytes int64
}

type Response

type Response interface {
	APIName() string
	Client() string
	Name() string
	Version() string
	Status() string
	Reason() string
	Errno() string
}

type RestClient

type RestClient struct {
	OntapVersion string
	// contains filtered or unexported fields
}

RestClient is the object to use for interacting with ONTAP controllers via the REST API

func NewRestClient

func NewRestClient(ctx context.Context, config ClientConfig, SVM string) (*RestClient, error)

NewRestClient is a factory method for creating a new instance

func (RestClient) AggregateList

func (c RestClient) AggregateList(ctx context.Context, pattern string) (*storage.AggregateCollectionGetOK, error)

AggregateList returns the names of all Aggregates whose names match the supplied pattern

func (RestClient) ClientConfig

func (c RestClient) ClientConfig() ClientConfig

func (RestClient) ClusterInfo

func (c RestClient) ClusterInfo(
	ctx context.Context,
) (*cluster.ClusterGetOK, error)

ClusterInfo returns information about the cluster

func (RestClient) EmsAutosupportLog

func (c RestClient) EmsAutosupportLog(
	ctx context.Context,
	appVersion string,
	autoSupport bool,
	category string,
	computerName string,
	eventDescription string,
	eventID int,
	eventSource string,
	logLevel int,
) error

EmsAutosupportLog generates an auto support message with the supplied parameters

func (RestClient) ExportPolicyCreate

func (c RestClient) ExportPolicyCreate(ctx context.Context, policy string) (*nas.ExportPolicyCreateCreated, error)

ExportPolicyCreate creates an export policy equivalent to filer::> vserver export-policy create

func (RestClient) ExportPolicyDestroy

func (c RestClient) ExportPolicyDestroy(ctx context.Context, policy string) (*nas.ExportPolicyDeleteOK, error)

func (RestClient) ExportPolicyGet

func (c RestClient) ExportPolicyGet(ctx context.Context, id int64) (*nas.ExportPolicyGetOK, error)

ExportPolicyGet gets the export policy with the specified uuid

func (RestClient) ExportPolicyGetByName

func (c RestClient) ExportPolicyGetByName(ctx context.Context, exportPolicyName string) (*models.ExportPolicy, error)

ExportPolicyGetByName gets the volume with the specified name

func (RestClient) ExportPolicyList

func (c RestClient) ExportPolicyList(ctx context.Context, pattern string) (*nas.ExportPolicyCollectionGetOK, error)

ExportPolicyList returns the names of all export polices whose names match the supplied pattern

func (RestClient) ExportRuleCreate

func (c RestClient) ExportRuleCreate(
	ctx context.Context, policy, clientMatch string, protocols, roSecFlavors, rwSecFlavors, suSecFlavors []string,
) (*nas.ExportRuleCreateCreated, error)

ExportRuleCreate creates a rule in an export policy equivalent to filer::> vserver export-policy rule create

func (RestClient) ExportRuleDestroy

func (c RestClient) ExportRuleDestroy(
	ctx context.Context, policy string, ruleIndex int,
) (*nas.ExportRuleDeleteOK, error)

ExportRuleDestroy deletes the rule at the given index in the given policy

func (RestClient) ExportRuleList

func (c RestClient) ExportRuleList(ctx context.Context, policy string) (*nas.ExportRuleCollectionGetOK, error)

ExportRuleList returns the export rules in an export policy equivalent to filer::> vserver export-policy rule show

func (RestClient) FlexGroupCreate

func (c RestClient) FlexGroupCreate(
	ctx context.Context, name string, size int, aggrs []string, spaceReserve, snapshotPolicy, unixPermissions,
	exportPolicy, securityStyle, tieringPolicy, comment string, qosPolicyGroup QosPolicyGroup, encrypt *bool,
	snapshotReserve int,
) error

FlexGroupCreate creates a FlexGroup with the specified options equivalent to filer::> volume create -vserver svm_name -volume fg_vol_name –auto-provision-as flexgroup -size fg_size -state online -type RW -policy default -unix-permissions ---rwxr-xr-x -space-guarantee none -snapshot-policy none -security-style unix -encrypt false

func (RestClient) FlexGroupDestroy

func (c RestClient) FlexGroupDestroy(ctx context.Context, name string) error

FlexGroupDestroy destroys a FlexGroup

func (RestClient) FlexGroupExists

func (c RestClient) FlexGroupExists(ctx context.Context, volumeName string) (bool, error)

FlexGroupExists tests for the existence of a FlexGroup

func (RestClient) FlexGroupGetAll

func (c RestClient) FlexGroupGetAll(ctx context.Context, pattern string) (*storage.VolumeCollectionGetOK, error)

FlexGroupGetAll returns all relevant details for all FlexGroups whose names match the supplied prefix

func (RestClient) FlexGroupGetByName

func (c RestClient) FlexGroupGetByName(ctx context.Context, volumeName string) (*models.Volume, error)

FlexGroupGetByName gets the flexgroup with the specified name

func (RestClient) FlexGroupModifyUnixPermissions

func (c RestClient) FlexGroupModifyUnixPermissions(ctx context.Context, volumeName, unixPermissions string) error

func (RestClient) FlexGroupMount

func (c RestClient) FlexGroupMount(ctx context.Context, volumeName, junctionPath string) error

FlexGroupMount mounts a flexgroup at the specified junction

func (RestClient) FlexGroupSetComment

func (c RestClient) FlexGroupSetComment(ctx context.Context, volumeName, newVolumeComment string) error

FlexGroupSetComment sets a flexgroup's comment to the supplied value

func (RestClient) FlexGroupSetSize

func (c RestClient) FlexGroupSetSize(ctx context.Context, volumeName, newSize string) error

FlexGroupSetSize sets the size of the specified FlexGroup

func (RestClient) FlexGroupSize

func (c RestClient) FlexGroupSize(ctx context.Context, volumeName string) (uint64, error)

FlexGroupSize retrieves the size of the specified flexgroup

func (RestClient) FlexGroupUsedSize

func (c RestClient) FlexGroupUsedSize(ctx context.Context, volumeName string) (int, error)

FlexGroupUsedSize retrieves the used space of the specified volume

func (RestClient) FlexGroupVolumeDisableSnapshotDirectoryAccess

func (c RestClient) FlexGroupVolumeDisableSnapshotDirectoryAccess(ctx context.Context, flexGroupVolumeName string) error

FlexGroupVolumeDisableSnapshotDirectoryAccess disables access to the ".snapshot" directory Disable '.snapshot' to allow official mysql container's chmod-in-init to work

func (RestClient) FlexgroupCloneSplitStart

func (c RestClient) FlexgroupCloneSplitStart(ctx context.Context, volumeName string) error

FlexgroupCloneSplitStart starts splitting the flexgroup clone

func (RestClient) FlexgroupModifyExportPolicy

func (c RestClient) FlexgroupModifyExportPolicy(ctx context.Context, volumeName, exportPolicyName string) error

func (RestClient) FlexgroupSetQosPolicyGroupName

func (c RestClient) FlexgroupSetQosPolicyGroupName(
	ctx context.Context, volumeName string, qosPolicyGroup QosPolicyGroup,
) error

FlexgroupSetQosPolicyGroupName note: we can't set adaptive policy groups directly during volume clone creation.

func (RestClient) FlexgroupUnmount

func (c RestClient) FlexgroupUnmount(ctx context.Context, volumeName string) error

FlexgroupUnmount unmounts the flexgroup

func (RestClient) IgroupAdd

func (c RestClient) IgroupAdd(ctx context.Context, initiatorGroupName, initiator string) error

IgroupAdd adds an initiator to an initiator group equivalent to filer::> lun igroup add -vserver iscsi_vs -igroup docker -initiator iqn.1993-08.org. debian:01:9031309bbebd

func (RestClient) IgroupCreate

func (c RestClient) IgroupCreate(ctx context.Context, initiatorGroupName, initiatorGroupType, osType string) error

IgroupCreate creates the specified initiator group equivalent to filer::> igroup create docker -vserver iscsi_vs -protocol iscsi -ostype linux

func (RestClient) IgroupDestroy

func (c RestClient) IgroupDestroy(ctx context.Context, initiatorGroupName string) error

IgroupDestroy destroys an initiator group

func (RestClient) IgroupGet

func (c RestClient) IgroupGet(ctx context.Context, uuid string) (*san.IgroupGetOK, error)

IgroupGet gets the igroup with the specified uuid

func (RestClient) IgroupGetByName

func (c RestClient) IgroupGetByName(ctx context.Context, initiatorGroupName string) (*models.Igroup, error)

IgroupGetByName gets the igroup with the specified name

func (RestClient) IgroupList

func (c RestClient) IgroupList(ctx context.Context, pattern string) (*san.IgroupCollectionGetOK, error)

IgroupList lists initiator groups

func (RestClient) IgroupRemove

func (c RestClient) IgroupRemove(ctx context.Context, initiatorGroupName, initiator string) error

IgroupRemove removes an initiator from an initiator group

func (RestClient) IsJobFinished

func (c RestClient) IsJobFinished(ctx context.Context, payload *models.JobLinkResponse) (bool, error)

IsJobFinished lookus up the supplied JobLinkResponse's UUID to see if it's reached a terminal state

func (RestClient) IscsiInitiatorGetDefaultAuth

func (c RestClient) IscsiInitiatorGetDefaultAuth(ctx context.Context) (*san.IscsiCredentialsCollectionGetOK, error)

IscsiInitiatorGetDefaultAuth returns the authorization details for the default initiator equivalent to filer::> vserver iscsi security show -vserver SVM -initiator-name default

func (RestClient) IscsiInitiatorSetDefaultAuth

func (c RestClient) IscsiInitiatorSetDefaultAuth(
	ctx context.Context, authType, userName, passphrase,
	outbountUserName, outboundPassphrase string,
) error

IscsiInitiatorSetDefaultAuth sets the authorization details for the default initiator

equivalent to filer::> vserver iscsi security modify -vserver SVM -initiator-name default \
                          -auth-type CHAP -user-name outboundUserName -outbound-user-name outboundPassphrase

func (RestClient) IscsiInterfaceGet

func (c RestClient) IscsiInterfaceGet(ctx context.Context, svm string) (*san.IscsiServiceCollectionGetOK,
	error,
)

IscsiInterfaceGet returns information about the vserver's iSCSI interfaces

func (RestClient) IscsiNodeGetName

func (c RestClient) IscsiNodeGetName(ctx context.Context) (*san.IscsiServiceGetOK,
	error,
)

IscsiNodeGetName returns information about the vserver's iSCSI node name

func (RestClient) JobGet

func (c RestClient) JobGet(ctx context.Context, jobUUID string) (*cluster.JobGetOK, error)

JobGet returns the job by ID

func (RestClient) LunCloneCreate

func (c RestClient) LunCloneCreate(
	ctx context.Context, lunPath, sourcePath string, sizeInBytes int64, osType string, qosPolicyGroup QosPolicyGroup,
) error

LunCloneCreate creates a LUN clone

func (RestClient) LunCreate

func (c RestClient) LunCreate(
	ctx context.Context, lunPath string, sizeInBytes int64, osType string, qosPolicyGroup QosPolicyGroup,
	spaceReserved, spaceAllocated bool,
) error

LunCreate creates a LUN

func (RestClient) LunDelete

func (c RestClient) LunDelete(
	ctx context.Context,
	lunUUID string,
) error

LunDelete deletes a LUN

func (RestClient) LunGet

func (c RestClient) LunGet(ctx context.Context, uuid string) (*san.LunGetOK, error)

LunGet gets the LUN with the specified uuid

func (RestClient) LunGetAttribute

func (c RestClient) LunGetAttribute(
	ctx context.Context,
	lunPath, attributeName string,
) (string, error)

LunGetAttribute gets an attribute by name for a given LUN.

func (RestClient) LunGetByName

func (c RestClient) LunGetByName(ctx context.Context, name string) (*models.Lun, error)

LunGetByName gets the LUN with the specified name

func (RestClient) LunGetComment

func (c RestClient) LunGetComment(
	ctx context.Context,
	lunPath string,
) (string, error)

LunGetComment gets the comment for a given LUN.

func (RestClient) LunList

func (c RestClient) LunList(ctx context.Context, pattern string) (*san.LunCollectionGetOK, error)

LunList finds LUNs with the specified pattern

func (RestClient) LunMap

func (c RestClient) LunMap(
	ctx context.Context,
	initiatorGroupName, lunPath string,
	lunID int,
) (*san.LunMapCreateCreated, error)

LunMap maps a LUN to an id in an initiator group equivalent to filer::> lun map -vserver iscsi_vs -path /vol/v/lun1 -igroup docker -lun-id 0

func (RestClient) LunMapGetReportingNodes

func (c RestClient) LunMapGetReportingNodes(
	ctx context.Context,
	initiatorGroupName, lunPath string,
) ([]string, error)

LunMapGetReportingNodes equivalent to filer::> lun mapping show -vserver iscsi_vs -path /vol/v/lun0 -igroup trident

func (RestClient) LunMapInfo

func (c RestClient) LunMapInfo(
	ctx context.Context,
	initiatorGroupName, lunPath string,
) (*san.LunMapCollectionGetOK, error)

LunMapInfo gets the LUN maping information for the specified LUN

func (RestClient) LunMapList

func (c RestClient) LunMapList(
	ctx context.Context,
	initiatorGroupName, lunPath string,
) (*san.LunMapCollectionGetOK, error)

LunMapList equivalent to the following filer::> lun mapping show -vserver iscsi_vs -path /vol/v/lun0 -igroup trident filer::> lun mapping show -vserver iscsi_vs -path /vol/v/lun0 -igroup * filer::> lun mapping show -vserver iscsi_vs -path * -igroup trident

func (RestClient) LunOptions

func (d RestClient) LunOptions(
	ctx context.Context,
) (*LunOptionsResult, error)

LunOptions gets the LUN options

func (RestClient) LunRename

func (c RestClient) LunRename(
	ctx context.Context,
	lunPath, newLunPath string,
) error

LunRename changes the name of a LUN

func (RestClient) LunSetAttribute

func (c RestClient) LunSetAttribute(
	ctx context.Context,
	lunPath, attributeName, attributeValue string,
) error

LunSetAttribute sets the attribute to the provided value for a given LUN.

func (RestClient) LunSetComment

func (c RestClient) LunSetComment(
	ctx context.Context,
	lunPath, comment string,
) error

LunSetComment sets the comment for a given LUN.

func (RestClient) LunSetQosPolicyGroup

func (c RestClient) LunSetQosPolicyGroup(
	ctx context.Context,
	lunPath, qosPolicyGroup string,
) error

LunSetComment sets the comment for a given LUN.

func (RestClient) LunSetSize

func (c RestClient) LunSetSize(
	ctx context.Context,
	lunPath, newSize string,
) (uint64, error)

LunSetSize sets the size for a given LUN.

func (RestClient) LunSize

func (c RestClient) LunSize(
	ctx context.Context,
	lunPath string,
) (int, error)

LunSize gets the size for a given LUN.

func (RestClient) LunUnmap

func (c RestClient) LunUnmap(
	ctx context.Context,
	initiatorGroupName, lunPath string,
) error

LunUnmap deletes the lun mapping for the given LUN path and igroup equivalent to filer::> lun mapping delete -vserver iscsi_vs -path /vol/v/lun0 -igroup group

func (RestClient) NetInterfaceGetDataLIFs

func (c RestClient) NetInterfaceGetDataLIFs(ctx context.Context, protocol string) ([]string, error)

func (RestClient) NetworkIPInterfacesList

func (c RestClient) NetworkIPInterfacesList(ctx context.Context) (*networking.NetworkIPInterfacesGetOK, error)

NetworkIPInterfacesList lists all IP interfaces

func (RestClient) NodeList

func (c RestClient) NodeList(ctx context.Context, pattern string) (*cluster.NodesGetOK, error)

ClusterInfo returns information about the cluster

func (RestClient) NodeListSerialNumbers

func (c RestClient) NodeListSerialNumbers(ctx context.Context) ([]string, error)

func (RestClient) PollJobStatus

func (c RestClient) PollJobStatus(ctx context.Context, payload *models.JobLinkResponse) error

PollJobStatus polls for the ONTAP job to complete, with backoff retry logic

func (RestClient) QtreeCount

func (c RestClient) QtreeCount(ctx context.Context, volumeName string) (int, error)

QtreeCount returns the number of Qtrees in the specified Flexvol, not including the Flexvol itself

func (RestClient) QtreeCreate

func (c RestClient) QtreeCreate(
	ctx context.Context, name, volumeName, unixPermissions, exportPolicy, securityStyle, qosPolicy string,
) error

QtreeCreate creates a qtree with the specified options equivalent to filer::> qtree create -vserver ndvp_vs -volume v -qtree q -export-policy default -unix-permissions ---rwxr-xr-x -security-style unix

func (RestClient) QtreeDestroyAsync

func (c RestClient) QtreeDestroyAsync(ctx context.Context, path string, force bool) error

QtreeDestroyAsync destroys a qtree in the background equivalent to filer::> volume qtree delete -foreground false

func (RestClient) QtreeExists

func (c RestClient) QtreeExists(ctx context.Context, name, volumePrefix string) (bool, string, error)

QtreeExists returns true if the named Qtree exists (and is unique in the matching Flexvols)

func (RestClient) QtreeGet

func (c RestClient) QtreeGet(ctx context.Context, name, volumePrefix string) (*models.Qtree, error)

QtreeGet returns all relevant details for a single qtree equivalent to filer::> volume qtree show

func (RestClient) QtreeGetAll

func (c RestClient) QtreeGetAll(ctx context.Context, volumePrefix string) (*storage.QtreeCollectionGetOK, error)

QtreeGetAll returns all relevant details for all qtrees whose Flexvol names match the supplied prefix equivalent to filer::> volume qtree show

func (RestClient) QtreeGetByName

func (c RestClient) QtreeGetByName(ctx context.Context, name, volumeName string) (*models.Qtree, error)

QtreeGetByName gets the qtree with the specified name in the specified volume

func (RestClient) QtreeGetByPath

func (c RestClient) QtreeGetByPath(ctx context.Context, path string) (*models.Qtree, error)

QtreeGetByPath gets the qtree with the specified path

func (RestClient) QtreeList

func (c RestClient) QtreeList(ctx context.Context, prefix, volumePrefix string) (*storage.QtreeCollectionGetOK, error)

QtreeList returns the names of all Qtrees whose names match the supplied prefix equivalent to filer::> volume qtree show

func (RestClient) QtreeModifyExportPolicy

func (c RestClient) QtreeModifyExportPolicy(ctx context.Context, name, volumeName, newExportPolicyName string) error

QtreeModifyExportPolicy modifies the export policy for the qtree

func (RestClient) QtreeRename

func (c RestClient) QtreeRename(ctx context.Context, path, newPath string) error

QtreeRename renames a qtree equivalent to filer::> volume qtree rename

func (RestClient) QuotaAddEntry

func (c RestClient) QuotaAddEntry(ctx context.Context, volumeName, qtreeName, quotaType, diskLimit string) error

QuotaAddEntry creates a quota rule with an optional hard disk limit equivalent to filer::> volume quota policy rule create

func (RestClient) QuotaEntryList

func (c RestClient) QuotaEntryList(ctx context.Context, volumeName string) (*storage.QuotaRuleCollectionGetOK, error)

QuotaEntryList returns the disk limit quotas for a Flexvol equivalent to filer::> volume quota policy rule show

func (RestClient) QuotaGetEntry

func (c RestClient) QuotaGetEntry(
	ctx context.Context, volumeName, qtreeName, quotaType string,
) (*models.QuotaRule, error)

QuotaGetEntry returns the disk limit for a single qtree equivalent to filer::> volume quota policy rule show

func (RestClient) QuotaOff

func (c RestClient) QuotaOff(ctx context.Context, volumeName string) error

QuotaOff disables quotas on a Flexvol equivalent to filer::> volume quota off

func (RestClient) QuotaOn

func (c RestClient) QuotaOn(ctx context.Context, volumeName string) error

QuotaOn enables quotas on a Flexvol equivalent to filer::> volume quota on

func (RestClient) QuotaSetEntry

func (c RestClient) QuotaSetEntry(ctx context.Context, qtreeName, volumeName, quotaType, diskLimit string) error

QuotaSetEntry updates (or creates) a quota rule with an optional hard disk limit equivalent to filer::> volume quota policy rule modify

func (RestClient) SVMGetAggregateNames

func (c RestClient) SVMGetAggregateNames(
	ctx context.Context,
) ([]string, error)

func (*RestClient) SVMName

func (c *RestClient) SVMName() string

func (*RestClient) SVMUUID

func (c *RestClient) SVMUUID() string

func (*RestClient) SetSVMName

func (c *RestClient) SetSVMName(svmName string)

func (*RestClient) SetSVMUUID

func (c *RestClient) SetSVMUUID(svmUUID string)

func (RestClient) SnapshotCreate

func (c RestClient) SnapshotCreate(
	ctx context.Context, volumeUUID, snapshotName string,
) (*storage.SnapshotCreateAccepted, error)

SnapshotCreate creates a snapshot

func (RestClient) SnapshotCreateAndWait

func (c RestClient) SnapshotCreateAndWait(ctx context.Context, volumeUUID, snapshotName string) error

SnapshotCreateAndWait creates a snapshot and waits on the job to complete

func (RestClient) SnapshotDelete

func (c RestClient) SnapshotDelete(
	ctx context.Context,
	volumeUUID, snapshotUUID string,
) (*storage.SnapshotDeleteAccepted, error)

SnapshotDelete deletes a snapshot

func (RestClient) SnapshotGet

func (c RestClient) SnapshotGet(ctx context.Context, volumeUUID, snapshotUUID string) (*storage.SnapshotGetOK, error)

SnapshotGet returns info on the snapshot

func (RestClient) SnapshotGetByName

func (c RestClient) SnapshotGetByName(ctx context.Context, volumeUUID, snapshotName string) (*models.Snapshot, error)

SnapshotGetByName finds the snapshot by name

func (RestClient) SnapshotList

func (c RestClient) SnapshotList(ctx context.Context, volumeUUID string) (*storage.SnapshotCollectionGetOK, error)

SnapshotList lists snapshots

func (RestClient) SnapshotListByName

func (c RestClient) SnapshotListByName(ctx context.Context, volumeUUID, snapshotName string) (
	*storage.SnapshotCollectionGetOK, error,
)

SnapshotListByName lists snapshots by name

func (RestClient) SnapshotRestoreFlexgroup

func (c RestClient) SnapshotRestoreFlexgroup(ctx context.Context, snapshotName, volumeName string) error

SnapshotRestoreFlexgroup restores a volume to a snapshot as a non-blocking operation

func (RestClient) SnapshotRestoreVolume

func (c RestClient) SnapshotRestoreVolume(ctx context.Context, snapshotName, volumeName string) error

SnapshotRestoreVolume restores a volume to a snapshot as a non-blocking operation

func (RestClient) SupportsFeature

func (c RestClient) SupportsFeature(ctx context.Context, feature Feature) bool

SupportsFeature returns true if the Ontap version supports the supplied feature

func (RestClient) SvmGet

func (c RestClient) SvmGet(ctx context.Context, uuid string) (*svm.SvmGetOK, error)

SvmGet gets the volume with the specified uuid

func (RestClient) SvmGetByName

func (c RestClient) SvmGetByName(ctx context.Context, svmName string) (*models.Svm, error)

SvmGetByName gets the volume with the specified name

func (RestClient) SvmList

func (c RestClient) SvmList(ctx context.Context, pattern string) (*svm.SvmCollectionGetOK, error)

SvmList returns the names of all SVMs whose names match the supplied pattern

func (RestClient) SystemGetOntapVersion

func (c RestClient) SystemGetOntapVersion(
	ctx context.Context,
) (string, error)

SystemGetOntapVersion gets the ONTAP version using the credentials, and caches & returns the result.

func (RestClient) TieringPolicyValue

func (c RestClient) TieringPolicyValue(
	ctx context.Context,
) string

func (RestClient) VolumeCloneCreate

func (c RestClient) VolumeCloneCreate(ctx context.Context, cloneName, sourceVolumeName, snapshotName string) (
	*storage.VolumeCreateAccepted, error,
)

VolumeCloneCreate creates a clone see also: https://library.netapp.com/ecmdocs/ECMLP2858435/html/resources/volume.html#creating-a-flexclone-and-specifying-its-properties-using-post

func (RestClient) VolumeCloneCreateAsync

func (c RestClient) VolumeCloneCreateAsync(ctx context.Context, cloneName, sourceVolumeName, snapshot string) error

VolumeCloneCreateAsync clones a volume from a snapshot

func (RestClient) VolumeCloneSplitStart

func (c RestClient) VolumeCloneSplitStart(ctx context.Context, volumeName string) error

VolumeCloneSplitStart starts splitting theflexvol clone

func (RestClient) VolumeCreate

func (c RestClient) VolumeCreate(
	ctx context.Context, name, aggregateName, size, spaceReserve, snapshotPolicy, unixPermissions,
	exportPolicy, securityStyle, tieringPolicy, comment string, qosPolicyGroup QosPolicyGroup, encrypt *bool,
	snapshotReserve int,
) error

VolumeCreate creates a volume with the specified options equivalent to filer::> volume create -vserver iscsi_vs -volume v -aggregate aggr1 -size 1g -state online -type RW -policy default -unix-permissions ---rwxr-xr-x -space-guarantee none -snapshot-policy none -security-style unix -encrypt false

func (RestClient) VolumeDestroy

func (c RestClient) VolumeDestroy(ctx context.Context, name string) error

VolumeDestroy destroys a flexvol

func (RestClient) VolumeDisableSnapshotDirectoryAccess

func (c RestClient) VolumeDisableSnapshotDirectoryAccess(ctx context.Context, volumeName string) error

VolumeDisableSnapshotDirectoryAccess disables access to the ".snapshot" directory Disable '.snapshot' to allow official mysql container's chmod-in-init to work

func (RestClient) VolumeExists

func (c RestClient) VolumeExists(ctx context.Context, volumeName string) (bool, error)

VolumeExists tests for the existence of a flexvol

func (RestClient) VolumeGetByName

func (c RestClient) VolumeGetByName(ctx context.Context, volumeName string) (*models.Volume, error)

VolumeGetByName gets the flexvol with the specified name

func (RestClient) VolumeList

func (c RestClient) VolumeList(ctx context.Context, pattern string) (*storage.VolumeCollectionGetOK, error)

VolumeList returns the names of all Flexvols whose names match the supplied pattern

func (RestClient) VolumeListAllBackedBySnapshot

func (c RestClient) VolumeListAllBackedBySnapshot(ctx context.Context, volumeName, snapshotName string) ([]string,
	error,
)

VolumeListAllBackedBySnapshot returns the names of all FlexVols backed by the specified snapshot

func (RestClient) VolumeListByAttrs

func (c RestClient) VolumeListByAttrs(ctx context.Context, volumeAttrs *Volume) (Volumes, error)

VolumeListByAttrs is used to find bucket volumes for nas-eco and san-eco

func (RestClient) VolumeModifyExportPolicy

func (c RestClient) VolumeModifyExportPolicy(
	ctx context.Context,
	volumeName, exportPolicyName string,
) error

func (RestClient) VolumeModifyUnixPermissions

func (c RestClient) VolumeModifyUnixPermissions(ctx context.Context, volumeName, unixPermissions string) error

func (RestClient) VolumeMount

func (c RestClient) VolumeMount(
	ctx context.Context,
	volumeName, junctionPath string,
) error

VolumeMount mounts a flexvol at the specified junction

func (RestClient) VolumeRename

func (c RestClient) VolumeRename(
	ctx context.Context,
	volumeName, newVolumeName string,
) error

VolumeRename changes the name of a flexvol

func (RestClient) VolumeSetComment

func (c RestClient) VolumeSetComment(ctx context.Context, volumeName, newVolumeComment string) error

VolumeSetComment sets a flexvol's comment to the supplied value equivalent to filer::> volume modify -vserver iscsi_vs -volume v -comment newVolumeComment

func (RestClient) VolumeSetQosPolicyGroupName

func (c RestClient) VolumeSetQosPolicyGroupName(
	ctx context.Context, volumeName string, qosPolicyGroup QosPolicyGroup,
) error

VolumeSetQosPolicyGroupName sets the QoS Policy Group for volume clones since we can't set adaptive policy groups directly during volume clone creation.

func (RestClient) VolumeSetSize

func (c RestClient) VolumeSetSize(ctx context.Context, volumeName, newSize string) error

VolumeSetSize sets the size of the specified flexvol

func (RestClient) VolumeSize

func (c RestClient) VolumeSize(
	ctx context.Context, volumeName string,
) (uint64, error)

VolumeSize retrieves the size of the specified flexvol

func (RestClient) VolumeUsedSize

func (c RestClient) VolumeUsedSize(ctx context.Context, volumeName string) (int, error)

VolumeUsedSize retrieves the used bytes of the specified volume

type RestClientInterface

type RestClientInterface interface {
	ClientConfig() ClientConfig
	SetSVMUUID(svmUUID string)
	SVMUUID() string
	SetSVMName(svmName string)
	SVMName() string
	// SupportsFeature returns true if the Ontap version supports the supplied feature
	SupportsFeature(ctx context.Context, feature Feature) bool
	// VolumeList returns the names of all Flexvols whose names match the supplied pattern
	VolumeList(ctx context.Context, pattern string) (*storage.VolumeCollectionGetOK, error)
	// VolumeListByAttrs is used to find bucket volumes for nas-eco and san-eco
	VolumeListByAttrs(ctx context.Context, volumeAttrs *Volume) (Volumes, error)
	// VolumeCreate creates a volume with the specified options
	// equivalent to filer::> volume create -vserver iscsi_vs -volume v -aggregate aggr1 -size 1g -state online -type RW
	// -policy default -unix-permissions ---rwxr-xr-x -space-guarantee none -snapshot-policy none -security-style unix
	// -encrypt false
	VolumeCreate(ctx context.Context, name, aggregateName, size, spaceReserve, snapshotPolicy, unixPermissions, exportPolicy, securityStyle, tieringPolicy, comment string, qosPolicyGroup QosPolicyGroup, encrypt *bool, snapshotReserve int) error
	// VolumeExists tests for the existence of a flexvol
	VolumeExists(ctx context.Context, volumeName string) (bool, error)
	// VolumeGetByName gets the flexvol with the specified name
	VolumeGetByName(ctx context.Context, volumeName string) (*models.Volume, error)
	// VolumeMount mounts a flexvol at the specified junction
	VolumeMount(ctx context.Context, volumeName, junctionPath string) error
	// VolumeRename changes the name of a flexvol
	VolumeRename(ctx context.Context, volumeName, newVolumeName string) error
	VolumeModifyExportPolicy(ctx context.Context, volumeName, exportPolicyName string) error
	// VolumeSize retrieves the size of the specified flexvol
	VolumeSize(ctx context.Context, volumeName string) (uint64, error)
	// VolumeUsedSize retrieves the used bytes of the specified volume
	VolumeUsedSize(ctx context.Context, volumeName string) (int, error)
	// VolumeSetSize sets the size of the specified flexvol
	VolumeSetSize(ctx context.Context, volumeName, newSize string) error
	VolumeModifyUnixPermissions(ctx context.Context, volumeName, unixPermissions string) error
	// VolumeSetComment sets a flexvol's comment to the supplied value
	// equivalent to filer::> volume modify -vserver iscsi_vs -volume v -comment newVolumeComment
	VolumeSetComment(ctx context.Context, volumeName, newVolumeComment string) error
	// VolumeSetQosPolicyGroupName sets the QoS Policy Group for volume clones since
	// we can't set adaptive policy groups directly during volume clone creation.
	VolumeSetQosPolicyGroupName(ctx context.Context, volumeName string, qosPolicyGroup QosPolicyGroup) error
	// VolumeCloneSplitStart starts splitting theflexvol clone
	VolumeCloneSplitStart(ctx context.Context, volumeName string) error
	// VolumeDestroy destroys a flexvol
	VolumeDestroy(ctx context.Context, name string) error
	// SnapshotCreate creates a snapshot
	SnapshotCreate(ctx context.Context, volumeUUID, snapshotName string) (*storage.SnapshotCreateAccepted, error)
	// SnapshotCreateAndWait creates a snapshot and waits on the job to complete
	SnapshotCreateAndWait(ctx context.Context, volumeUUID, snapshotName string) error
	// SnapshotList lists snapshots
	SnapshotList(ctx context.Context, volumeUUID string) (*storage.SnapshotCollectionGetOK, error)
	// SnapshotListByName lists snapshots by name
	SnapshotListByName(ctx context.Context, volumeUUID, snapshotName string) (*storage.SnapshotCollectionGetOK, error)
	// SnapshotGet returns info on the snapshot
	SnapshotGet(ctx context.Context, volumeUUID, snapshotUUID string) (*storage.SnapshotGetOK, error)
	// SnapshotGetByName finds the snapshot by name
	SnapshotGetByName(ctx context.Context, volumeUUID, snapshotName string) (*models.Snapshot, error)
	// SnapshotDelete deletes a snapshot
	SnapshotDelete(ctx context.Context, volumeUUID, snapshotUUID string) (*storage.SnapshotDeleteAccepted, error)
	// SnapshotRestoreVolume restores a volume to a snapshot as a non-blocking operation
	SnapshotRestoreVolume(ctx context.Context, snapshotName, volumeName string) error
	// SnapshotRestoreFlexgroup restores a volume to a snapshot as a non-blocking operation
	SnapshotRestoreFlexgroup(ctx context.Context, snapshotName, volumeName string) error
	// VolumeDisableSnapshotDirectoryAccess disables access to the ".snapshot" directory
	// Disable '.snapshot' to allow official mysql container's chmod-in-init to work
	VolumeDisableSnapshotDirectoryAccess(ctx context.Context, volumeName string) error
	// VolumeListAllBackedBySnapshot returns the names of all FlexVols backed by the specified snapshot
	VolumeListAllBackedBySnapshot(ctx context.Context, volumeName, snapshotName string) ([]string, error)
	// VolumeCloneCreate creates a clone
	// see also: https://library.netapp.com/ecmdocs/ECMLP2858435/html/resources/volume.html#creating-a-flexclone-and-specifying-its-properties-using-post
	VolumeCloneCreate(ctx context.Context, cloneName, sourceVolumeName, snapshotName string) (*storage.VolumeCreateAccepted, error)
	// VolumeCloneCreateAsync clones a volume from a snapshot
	VolumeCloneCreateAsync(ctx context.Context, cloneName, sourceVolumeName, snapshot string) error
	// IscsiInitiatorGetDefaultAuth returns the authorization details for the default initiator
	// equivalent to filer::> vserver iscsi security show -vserver SVM -initiator-name default
	IscsiInitiatorGetDefaultAuth(ctx context.Context) (*san.IscsiCredentialsCollectionGetOK, error)
	// IscsiInterfaceGet returns information about the vserver's  iSCSI interfaces
	IscsiInterfaceGet(ctx context.Context, svm string) (*san.IscsiServiceCollectionGetOK, error)
	// IscsiInitiatorSetDefaultAuth sets the authorization details for the default initiator
	//
	//	equivalent to filer::> vserver iscsi security modify -vserver SVM -initiator-name default \
	//	                          -auth-type CHAP -user-name outboundUserName -outbound-user-name outboundPassphrase
	IscsiInitiatorSetDefaultAuth(ctx context.Context, authType, userName, passphrase, outbountUserName, outboundPassphrase string) error
	// IscsiNodeGetName returns information about the vserver's iSCSI node name
	IscsiNodeGetName(ctx context.Context) (*san.IscsiServiceGetOK, error)
	// IgroupCreate creates the specified initiator group
	// equivalent to filer::> igroup create docker -vserver iscsi_vs -protocol iscsi -ostype linux
	IgroupCreate(ctx context.Context, initiatorGroupName, initiatorGroupType, osType string) error
	// IgroupAdd adds an initiator to an initiator group
	// equivalent to filer::> lun igroup add -vserver iscsi_vs -igroup docker -initiator iqn.1993-08.org.
	// debian:01:9031309bbebd
	IgroupAdd(ctx context.Context, initiatorGroupName, initiator string) error
	// IgroupRemove removes an initiator from an initiator group
	IgroupRemove(ctx context.Context, initiatorGroupName, initiator string) error
	// IgroupDestroy destroys an initiator group
	IgroupDestroy(ctx context.Context, initiatorGroupName string) error
	// IgroupList lists initiator groups
	IgroupList(ctx context.Context, pattern string) (*san.IgroupCollectionGetOK, error)
	// IgroupGet gets the igroup with the specified uuid
	IgroupGet(ctx context.Context, uuid string) (*san.IgroupGetOK, error)
	// IgroupGetByName gets the igroup with the specified name
	IgroupGetByName(ctx context.Context, initiatorGroupName string) (*models.Igroup, error)
	// LunOptions gets the LUN options
	LunOptions(ctx context.Context) (*LunOptionsResult, error)
	// LunCloneCreate creates a LUN clone
	LunCloneCreate(ctx context.Context, lunPath, sourcePath string, sizeInBytes int64, osType string, qosPolicyGroup QosPolicyGroup) error
	// LunCreate creates a LUN
	LunCreate(ctx context.Context, lunPath string, sizeInBytes int64, osType string, qosPolicyGroup QosPolicyGroup, spaceReserved, spaceAllocated bool) error
	// LunGet gets the LUN with the specified uuid
	LunGet(ctx context.Context, uuid string) (*san.LunGetOK, error)
	// LunGetByName gets the LUN with the specified name
	LunGetByName(ctx context.Context, name string) (*models.Lun, error)
	// LunList finds LUNs with the specified pattern
	LunList(ctx context.Context, pattern string) (*san.LunCollectionGetOK, error)
	// LunDelete deletes a LUN
	LunDelete(ctx context.Context, lunUUID string) error
	// TODO: Change this for LUN Attributes when available
	// LunGetComment gets the comment for a given LUN.
	// This is in place of the fstype and context attributes from ZAPI
	LunGetComment(ctx context.Context, lunPath string) (string, error)
	// LunSetComment sets the comment for a given LUN.
	// This is in place of the fstype and context attributes from ZAPI
	LunSetComment(ctx context.Context, lunPath, comment string) error
	// LunGetAttribute gets an attribute by name for a given LUN.
	LunGetAttribute(ctx context.Context, lunPath, attributeName string) (string, error)
	// LunSetAttribute sets the attribute to the provided value for a given LUN.
	LunSetAttribute(ctx context.Context, lunPath, attributeName, attributeValue string) error
	// LunSetComment sets the comment for a given LUN.
	LunSetQosPolicyGroup(ctx context.Context, lunPath, qosPolicyGroup string) error
	// LunRename changes the name of a LUN
	LunRename(ctx context.Context, lunPath, newLunPath string) error
	// LunMapInfo gets the LUN maping information for the specified LUN
	LunMapInfo(ctx context.Context, initiatorGroupName, lunPath string) (*san.LunMapCollectionGetOK, error)
	// LunUnmap deletes the lun mapping for the given LUN path and igroup
	// equivalent to filer::> lun mapping delete -vserver iscsi_vs -path /vol/v/lun0 -igroup group
	LunUnmap(ctx context.Context, initiatorGroupName, lunPath string) error
	// LunMap maps a LUN to an id in an initiator group
	// equivalent to filer::> lun map -vserver iscsi_vs -path /vol/v/lun1 -igroup docker -lun-id 0
	LunMap(ctx context.Context, initiatorGroupName, lunPath string, lunID int) (*san.LunMapCreateCreated, error)
	// LunMapList equivalent to the following
	// filer::> lun mapping show -vserver iscsi_vs -path /vol/v/lun0 -igroup trident
	// filer::> lun mapping show -vserver iscsi_vs -path /vol/v/lun0 -igroup *
	// filer::> lun mapping show -vserver iscsi_vs -path *           -igroup trident
	LunMapList(ctx context.Context, initiatorGroupName, lunPath string) (*san.LunMapCollectionGetOK, error)
	// LunMapGetReportingNodes
	// equivalent to filer::> lun mapping show -vserver iscsi_vs -path /vol/v/lun0 -igroup trident
	LunMapGetReportingNodes(ctx context.Context, initiatorGroupName, lunPath string) ([]string, error)
	// LunSize gets the size for a given LUN.
	LunSize(ctx context.Context, lunPath string) (int, error)
	// LunSetSize sets the size for a given LUN.
	LunSetSize(ctx context.Context, lunPath, newSize string) (uint64, error)
	// NetworkIPInterfacesList lists all IP interfaces
	NetworkIPInterfacesList(ctx context.Context) (*networking.NetworkIPInterfacesGetOK, error)
	NetInterfaceGetDataLIFs(ctx context.Context, protocol string) ([]string, error)
	// JobGet returns the job by ID
	JobGet(ctx context.Context, jobUUID string) (*cluster.JobGetOK, error)
	// IsJobFinished lookus up the supplied JobLinkResponse's UUID to see if it's reached a terminal state
	IsJobFinished(ctx context.Context, payload *models.JobLinkResponse) (bool, error)
	// PollJobStatus polls for the ONTAP job to complete, with backoff retry logic
	PollJobStatus(ctx context.Context, payload *models.JobLinkResponse) error
	// AggregateList returns the names of all Aggregates whose names match the supplied pattern
	AggregateList(ctx context.Context, pattern string) (*storage.AggregateCollectionGetOK, error)
	// SvmGet gets the volume with the specified uuid
	SvmGet(ctx context.Context, uuid string) (*svm.SvmGetOK, error)
	// SvmList returns the names of all SVMs whose names match the supplied pattern
	SvmList(ctx context.Context, pattern string) (*svm.SvmCollectionGetOK, error)
	// SvmGetByName gets the volume with the specified name
	SvmGetByName(ctx context.Context, svmName string) (*models.Svm, error)
	SVMGetAggregateNames(ctx context.Context) ([]string, error)
	// ClusterInfo returns information about the cluster
	ClusterInfo(ctx context.Context) (*cluster.ClusterGetOK, error)
	// SystemGetOntapVersion gets the ONTAP version using the credentials, and caches & returns the result.
	SystemGetOntapVersion(ctx context.Context) (string, error)
	// ClusterInfo returns information about the cluster
	NodeList(ctx context.Context, pattern string) (*cluster.NodesGetOK, error)
	NodeListSerialNumbers(ctx context.Context) ([]string, error)
	// EmsAutosupportLog generates an auto support message with the supplied parameters
	EmsAutosupportLog(ctx context.Context, appVersion string, autoSupport bool, category string, computerName string, eventDescription string, eventID int, eventSource string, logLevel int) error
	TieringPolicyValue(ctx context.Context) string
	// ExportPolicyCreate creates an export policy
	// equivalent to filer::> vserver export-policy create
	ExportPolicyCreate(ctx context.Context, policy string) (*nas.ExportPolicyCreateCreated, error)
	// ExportPolicyGet gets the export policy with the specified uuid
	ExportPolicyGet(ctx context.Context, id int64) (*nas.ExportPolicyGetOK, error)
	// ExportPolicyList returns the names of all export polices whose names match the supplied pattern
	ExportPolicyList(ctx context.Context, pattern string) (*nas.ExportPolicyCollectionGetOK, error)
	// ExportPolicyGetByName gets the volume with the specified name
	ExportPolicyGetByName(ctx context.Context, exportPolicyName string) (*models.ExportPolicy, error)
	ExportPolicyDestroy(ctx context.Context, policy string) (*nas.ExportPolicyDeleteOK, error)
	// ExportRuleList returns the export rules in an export policy
	// equivalent to filer::> vserver export-policy rule show
	ExportRuleList(ctx context.Context, policy string) (*nas.ExportRuleCollectionGetOK, error)
	// ExportRuleCreate creates a rule in an export policy
	// equivalent to filer::> vserver export-policy rule create
	ExportRuleCreate(ctx context.Context, policy, clientMatch string, protocols, roSecFlavors, rwSecFlavors, suSecFlavors []string) (*nas.ExportRuleCreateCreated, error)
	// ExportRuleDestroy deletes the rule at the given index in the given policy
	ExportRuleDestroy(ctx context.Context, policy string, ruleIndex int) (*nas.ExportRuleDeleteOK, error)
	// FlexGroupCreate creates a FlexGroup with the specified options
	// equivalent to filer::> volume create -vserver svm_name -volume fg_vol_name –auto-provision-as flexgroup -size fg_size
	// -state online -type RW -policy default -unix-permissions ---rwxr-xr-x -space-guarantee none -snapshot-policy none
	// -security-style unix -encrypt false
	FlexGroupCreate(ctx context.Context, name string, size int, aggrs []string, spaceReserve, snapshotPolicy, unixPermissions, exportPolicy, securityStyle, tieringPolicy, comment string, qosPolicyGroup QosPolicyGroup, encrypt *bool, snapshotReserve int) error
	// FlexgroupCloneSplitStart starts splitting the flexgroup clone
	FlexgroupCloneSplitStart(ctx context.Context, volumeName string) error
	// FlexGroupDestroy destroys a FlexGroup
	FlexGroupDestroy(ctx context.Context, name string) error
	// FlexGroupExists tests for the existence of a FlexGroup
	FlexGroupExists(ctx context.Context, volumeName string) (bool, error)
	// FlexGroupSize retrieves the size of the specified flexgroup
	FlexGroupSize(ctx context.Context, volumeName string) (uint64, error)
	// FlexGroupUsedSize retrieves the used space of the specified volume
	FlexGroupUsedSize(ctx context.Context, volumeName string) (int, error)
	// FlexGroupSetSize sets the size of the specified FlexGroup
	FlexGroupSetSize(ctx context.Context, volumeName, newSize string) error
	// FlexgroupSetQosPolicyGroupName note: we can't set adaptive policy groups directly during volume clone creation.
	FlexgroupSetQosPolicyGroupName(ctx context.Context, volumeName string, qosPolicyGroup QosPolicyGroup) error
	// FlexGroupVolumeDisableSnapshotDirectoryAccess disables access to the ".snapshot" directory
	// Disable '.snapshot' to allow official mysql container's chmod-in-init to work
	FlexGroupVolumeDisableSnapshotDirectoryAccess(ctx context.Context, name string) error
	FlexGroupModifyUnixPermissions(ctx context.Context, volumeName, unixPermissions string) error
	// FlexGroupSetComment sets a flexgroup's comment to the supplied value
	FlexGroupSetComment(ctx context.Context, volumeName, newVolumeComment string) error
	// FlexGroupGetByName gets the flexgroup with the specified name
	FlexGroupGetByName(ctx context.Context, volumeName string) (*models.Volume, error)
	// FlexGroupGetAll returns all relevant details for all FlexGroups whose names match the supplied prefix
	FlexGroupGetAll(ctx context.Context, pattern string) (*storage.VolumeCollectionGetOK, error)
	// FlexGroupMount mounts a flexgroup at the specified junction
	FlexGroupMount(ctx context.Context, volumeName, junctionPath string) error
	// FlexgroupUnmount unmounts the flexgroup
	FlexgroupUnmount(ctx context.Context, volumeName string) error
	FlexgroupModifyExportPolicy(ctx context.Context, volumeName, exportPolicyName string) error
	// QtreeCreate creates a qtree with the specified options
	// equivalent to filer::> qtree create -vserver ndvp_vs -volume v -qtree q -export-policy default -unix-permissions ---rwxr-xr-x -security-style unix
	QtreeCreate(ctx context.Context, name, volumeName, unixPermissions, exportPolicy, securityStyle, qosPolicy string) error
	// QtreeRename renames a qtree
	// equivalent to filer::> volume qtree rename
	QtreeRename(ctx context.Context, path, newPath string) error
	// QtreeDestroyAsync destroys a qtree in the background
	// equivalent to filer::> volume qtree delete -foreground false
	QtreeDestroyAsync(ctx context.Context, path string, force bool) error
	// QtreeList returns the names of all Qtrees whose names match the supplied prefix
	// equivalent to filer::> volume qtree show
	QtreeList(ctx context.Context, prefix, volumePrefix string) (*storage.QtreeCollectionGetOK, error)
	// QtreeGetByPath gets the qtree with the specified path
	QtreeGetByPath(ctx context.Context, path string) (*models.Qtree, error)
	// QtreeGetByName gets the qtree with the specified name in the specified volume
	QtreeGetByName(ctx context.Context, name, volumeName string) (*models.Qtree, error)
	// QtreeCount returns the number of Qtrees in the specified Flexvol, not including the Flexvol itself
	QtreeCount(ctx context.Context, volumeName string) (int, error)
	// QtreeExists returns true if the named Qtree exists (and is unique in the matching Flexvols)
	QtreeExists(ctx context.Context, name, volumePrefix string) (bool, string, error)
	// QtreeGet returns all relevant details for a single qtree
	// equivalent to filer::> volume qtree show
	QtreeGet(ctx context.Context, name, volumePrefix string) (*models.Qtree, error)
	// QtreeGetAll returns all relevant details for all qtrees whose Flexvol names match the supplied prefix
	// equivalent to filer::> volume qtree show
	QtreeGetAll(ctx context.Context, volumePrefix string) (*storage.QtreeCollectionGetOK, error)
	// QtreeModifyExportPolicy modifies the export policy for the qtree
	QtreeModifyExportPolicy(ctx context.Context, name, volumeName, newExportPolicyName string) error
	// QuotaOn enables quotas on a Flexvol
	// equivalent to filer::> volume quota on
	QuotaOn(ctx context.Context, volumeName string) error
	// QuotaOff disables quotas on a Flexvol
	// equivalent to filer::> volume quota off
	QuotaOff(ctx context.Context, volumeName string) error
	// QuotaSetEntry updates (or creates) a quota rule with an optional hard disk limit
	// equivalent to filer::> volume quota policy rule modify
	QuotaSetEntry(ctx context.Context, qtreeName, volumeName, quotaType, diskLimit string) error
	// QuotaAddEntry creates a quota rule with an optional hard disk limit
	// equivalent to filer::> volume quota policy rule create
	QuotaAddEntry(ctx context.Context, volumeName, qtreeName, quotaType, diskLimit string) error
	// QuotaGetEntry returns the disk limit for a single qtree
	// equivalent to filer::> volume quota policy rule show
	QuotaGetEntry(ctx context.Context, volumeName, qtreeName, quotaType string) (*models.QuotaRule, error)
	// QuotaEntryList returns the disk limit quotas for a Flexvol
	// equivalent to filer::> volume quota policy rule show
	QuotaEntryList(ctx context.Context, volumeName string) (*storage.QuotaRuleCollectionGetOK, error)
}

RestClientInterface ...

type RestError

type RestError struct {
	// contains filtered or unexported fields
}

RestError encapsulates the status, reason, and errno values from a REST invocation, and it provides helper methods for detecting common error conditions.

func NewRestErrorFromPayload

func NewRestErrorFromPayload(payload *models.Job) RestError

func (RestError) Code

func (e RestError) Code() string

func (RestError) Error

func (e RestError) Error() string

func (RestError) IsFailure

func (e RestError) IsFailure() bool

func (RestError) IsSnapshotBusy

func (e RestError) IsSnapshotBusy() bool

func (RestError) IsSuccess

func (e RestError) IsSuccess() bool

func (RestError) Message

func (e RestError) Message() string

func (RestError) State

func (e RestError) State() string

type SVMAggregateSpace

type SVMAggregateSpace struct {
	// contains filtered or unexported fields
}

func NewSVMAggregateSpace

func NewSVMAggregateSpace(size, used, footprint int64) SVMAggregateSpace

func (SVMAggregateSpace) Footprint

func (o SVMAggregateSpace) Footprint() int64

func (SVMAggregateSpace) Size

func (o SVMAggregateSpace) Size() int64

func (SVMAggregateSpace) Used

func (o SVMAggregateSpace) Used() int64

type Snapmirror

type Snapmirror struct {
	State               SnapmirrorState
	RelationshipStatus  SnapmirrorStatus
	LastTransferType    string
	IsHealthy           bool
	UnhealthyReason     string
	ReplicationPolicy   string
	ReplicationSchedule string
}

type SnapmirrorPolicy

type SnapmirrorPolicy struct {
	Type  SnapmirrorPolicyType
	Rules map[string]struct{}
}

type SnapmirrorPolicyType

type SnapmirrorPolicyType string

func (SnapmirrorPolicyType) IsSnapmirrorPolicyTypeAsync

func (s SnapmirrorPolicyType) IsSnapmirrorPolicyTypeAsync() bool

func (SnapmirrorPolicyType) IsSnapmirrorPolicyTypeSync

func (s SnapmirrorPolicyType) IsSnapmirrorPolicyTypeSync() bool

type SnapmirrorState

type SnapmirrorState string

func (SnapmirrorState) IsUninitialized

func (s SnapmirrorState) IsUninitialized() bool

type SnapmirrorStatus

type SnapmirrorStatus string

func (SnapmirrorStatus) IsAborting

func (s SnapmirrorStatus) IsAborting() bool

func (SnapmirrorStatus) IsBreaking

func (s SnapmirrorStatus) IsBreaking() bool

func (SnapmirrorStatus) IsIdle

func (s SnapmirrorStatus) IsIdle() bool

type Snapshot

type Snapshot struct {
	CreateTime string
	Name       string
}

type Snapshots

type Snapshots []Snapshot

type Volume

type Volume struct {
	AccessType        string
	Aggregates        []string
	Comment           string
	Encrypt           *bool
	ExportPolicy      string
	JunctionPath      string
	Name              string
	Qos               QosPolicyGroup
	SecurityStyle     string
	Size              string
	SnapshotDir       bool
	SnapshotPolicy    string
	SnapshotReserve   int
	SnapshotSpaceUsed int
	SpaceReserve      string
	TieringPolicy     string
	UnixPermissions   string
	UUID              string
	DPVolume          bool
}

func VolumeInfoFromRestAttrsHelper

func VolumeInfoFromRestAttrsHelper(volumeGetResponse *models.Volume) (*Volume, error)

func VolumeInfoFromZapiAttrsHelper

func VolumeInfoFromZapiAttrsHelper(volumeGetResponse *azgo.VolumeAttributesType) (*Volume, error)

type VolumeNameList

type VolumeNameList []string

type Volumes

type Volumes []*Volume

type ZapiClientInterface

type ZapiClientInterface interface {
	ClientConfig() ClientConfig
	SetSVMUUID(svmUUID string)
	SVMUUID() string
	SetSVMMCC(mcc bool)
	SVMMCC() bool
	SVMName() string
	// GetClonedZapiRunner returns a clone of the ZapiRunner configured on this driver.
	GetClonedZapiRunner() *azgo.ZapiRunner
	// GetNontunneledZapiRunner returns a clone of the ZapiRunner configured on this driver with the SVM field cleared so ZAPI calls
	// made with the resulting runner aren't tunneled.  Note that the calls could still go directly to either a cluster or
	// vserver management LIF.
	GetNontunneledZapiRunner() *azgo.ZapiRunner
	// SupportsFeature returns true if the Ontapi version supports the supplied feature
	SupportsFeature(ctx context.Context, feature Feature) bool
	// IgroupCreate creates the specified initiator group
	// equivalent to filer::> igroup create docker -vserver iscsi_vs -protocol iscsi -ostype linux
	IgroupCreate(initiatorGroupName, initiatorGroupType, osType string) (*azgo.IgroupCreateResponse, error)
	// IgroupAdd adds an initiator to an initiator group
	// equivalent to filer::> igroup add -vserver iscsi_vs -igroup docker -initiator iqn.1993-08.org.debian:01:9031309bbebd
	IgroupAdd(initiatorGroupName, initiator string) (*azgo.IgroupAddResponse, error)
	// IgroupRemove removes an initiator from an initiator group
	IgroupRemove(initiatorGroupName, initiator string, force bool) (*azgo.IgroupRemoveResponse, error)
	// IgroupDestroy destroys an initiator group
	IgroupDestroy(initiatorGroupName string) (*azgo.IgroupDestroyResponse, error)
	// IgroupList lists initiator groups
	IgroupList() (*azgo.IgroupGetIterResponse, error)
	// IgroupGet gets a specified initiator group
	IgroupGet(initiatorGroupName string) (*azgo.InitiatorGroupInfoType, error)
	// LunCreate creates a lun with the specified attributes
	// equivalent to filer::> lun create -vserver iscsi_vs -path /vol/v/lun1 -size 1g -ostype linux -space-reserve disabled -space-allocation enabled
	LunCreate(lunPath string, sizeInBytes int, osType string, qosPolicyGroup QosPolicyGroup, spaceReserved bool, spaceAllocated bool) (*azgo.LunCreateBySizeResponse, error)
	// LunCloneCreate clones a LUN from a snapshot
	LunCloneCreate(volumeName, sourceLun, destinationLun string, qosPolicyGroup QosPolicyGroup) (*azgo.CloneCreateResponse, error)
	// LunSetQosPolicyGroup sets the qos policy group or adaptive qos policy group on a lun; does not unset policy groups
	LunSetQosPolicyGroup(lunPath string, qosPolicyGroup QosPolicyGroup) (*azgo.LunSetQosPolicyGroupResponse, error)
	// LunGetSerialNumber returns the serial# for a lun
	LunGetSerialNumber(lunPath string) (*azgo.LunGetSerialNumberResponse, error)
	// LunMapsGetByLun returns a list of LUN map details for a given LUN path
	// equivalent to filer::> lun mapping show -vserver iscsi_vs -path /vol/v/lun0
	LunMapsGetByLun(lunPath string) (*azgo.LunMapGetIterResponse, error)
	// LunMapsGetByIgroup returns a list of LUN map details for a given igroup
	// equivalent to filer::> lun mapping show -vserver iscsi_vs -igroup trident
	LunMapsGetByIgroup(initiatorGroupName string) (*azgo.LunMapGetIterResponse, error)
	// LunMapGet returns a list of LUN map details
	// equivalent to filer::> lun mapping show -vserver iscsi_vs -path /vol/v/lun0 -igroup trident
	LunMapGet(initiatorGroupName, lunPath string) (*azgo.LunMapGetIterResponse, error)
	// LunMap maps a lun to an id in an initiator group
	// equivalent to filer::> lun map -vserver iscsi_vs -path /vol/v/lun1 -igroup docker -lun-id 0
	LunMap(initiatorGroupName, lunPath string, lunID int) (*azgo.LunMapResponse, error)
	// LunMapAutoID maps a LUN in an initiator group, allowing ONTAP to choose an available LUN ID
	// equivalent to filer::> lun map -vserver iscsi_vs -path /vol/v/lun1 -igroup docker
	LunMapAutoID(initiatorGroupName, lunPath string) (*azgo.LunMapResponse, error)
	LunMapIfNotMapped(ctx context.Context, initiatorGroupName, lunPath string, importNotManaged bool) (int, error)
	// LunMapListInfo returns lun mapping information for the specified lun
	// equivalent to filer::> lun mapped show -vserver iscsi_vs -path /vol/v/lun0
	LunMapListInfo(lunPath string) (*azgo.LunMapListInfoResponse, error)
	// LunOffline offlines a lun
	// equivalent to filer::> lun offline -vserver iscsi_vs -path /vol/v/lun0
	LunOffline(lunPath string) (*azgo.LunOfflineResponse, error)
	// LunOnline onlines a lun
	// equivalent to filer::> lun online -vserver iscsi_vs -path /vol/v/lun0
	LunOnline(lunPath string) (*azgo.LunOnlineResponse, error)
	// LunDestroy destroys a LUN
	// equivalent to filer::> lun destroy -vserver iscsi_vs -path /vol/v/lun0
	LunDestroy(lunPath string) (*azgo.LunDestroyResponse, error)
	// LunSetAttribute sets a named attribute for a given LUN.
	LunSetAttribute(lunPath, name, value string) (*azgo.LunSetAttributeResponse, error)
	// LunGetAttribute gets a named attribute for a given LUN.
	LunGetAttribute(lunPath, name string) (*azgo.LunGetAttributeResponse, error)
	// LunGet returns all relevant details for a single LUN
	// equivalent to filer::> lun show
	LunGet(path string) (*azgo.LunInfoType, error)
	LunGetGeometry(path string) (*azgo.LunGetGeometryResponse, error)
	LunResize(path string, sizeBytes int) (uint64, error)
	// LunGetAll returns all relevant details for all LUNs whose paths match the supplied pattern
	// equivalent to filer::> lun show -path /vol/trident_*/*
	LunGetAll(pathPattern string) (*azgo.LunGetIterResponse, error)
	// LunGetAllForVolume returns all relevant details for all LUNs in the supplied Volume
	// equivalent to filer::> lun show -volume trident_CEwDWXQRPz
	LunGetAllForVolume(volumeName string) (*azgo.LunGetIterResponse, error)
	// LunGetAllForVserver returns all relevant details for all LUNs in the supplied SVM
	// equivalent to filer::> lun show -vserver trident_CEwDWXQRPz
	LunGetAllForVserver(vserverName string) (*azgo.LunGetIterResponse, error)
	// LunCount returns the number of LUNs that exist in a given volume
	LunCount(ctx context.Context, volume string) (int, error)
	// LunRename changes the name of a LUN
	LunRename(path, newPath string) (*azgo.LunMoveResponse, error)
	// LunUnmap deletes the lun mapping for the given LUN path and igroup
	// equivalent to filer::> lun mapping delete -vserver iscsi_vs -path /vol/v/lun0 -igroup group
	LunUnmap(initiatorGroupName, lunPath string) (*azgo.LunUnmapResponse, error)
	// LunSize retrieves the size of the specified volume, does not work with economy driver
	LunSize(flexvolName string) (int, error)
	// FlexGroupCreate creates a FlexGroup with the specified options
	// equivalent to filer::> volume create -vserver svm_name -volume fg_vol_name –auto-provision-as flexgroup -size fg_size  -state online -type RW -policy default -unix-permissions ---rwxr-xr-x -space-guarantee none -snapshot-policy none -security-style unix -encrypt false
	FlexGroupCreate(ctx context.Context, name string, size int, aggrs []azgo.AggrNameType, spaceReserve, snapshotPolicy, unixPermissions, exportPolicy, securityStyle, tieringPolicy, comment string, qosPolicyGroup QosPolicyGroup, encrypt *bool, snapshotReserve int) (*azgo.VolumeCreateAsyncResponse, error)
	// FlexGroupDestroy destroys a FlexGroup
	FlexGroupDestroy(ctx context.Context, name string, force bool) (*azgo.VolumeDestroyAsyncResponse, error)
	// FlexGroupExists tests for the existence of a FlexGroup
	FlexGroupExists(ctx context.Context, name string) (bool, error)
	// FlexGroupUsedSize retrieves the used space of the specified volume
	FlexGroupUsedSize(name string) (int, error)
	// FlexGroupSize retrieves the size of the specified volume
	FlexGroupSize(name string) (int, error)
	// FlexGroupSetSize sets the size of the specified FlexGroup
	FlexGroupSetSize(ctx context.Context, name, newSize string) (*azgo.VolumeSizeAsyncResponse, error)
	// FlexGroupVolumeDisableSnapshotDirectoryAccess disables access to the ".snapshot" directory
	// Disable '.snapshot' to allow official mysql container's chmod-in-init to work
	FlexGroupVolumeDisableSnapshotDirectoryAccess(ctx context.Context, name string) (*azgo.VolumeModifyIterAsyncResponse, error)
	FlexGroupModifyUnixPermissions(ctx context.Context, volumeName, unixPermissions string) (*azgo.VolumeModifyIterAsyncResponse, error)
	// FlexGroupSetComment sets a flexgroup's comment to the supplied value
	FlexGroupSetComment(ctx context.Context, volumeName, newVolumeComment string) (*azgo.VolumeModifyIterAsyncResponse, error)
	// FlexGroupGet returns all relevant details for a single FlexGroup
	FlexGroupGet(name string) (*azgo.VolumeAttributesType, error)
	// FlexGroupGetAll returns all relevant details for all FlexGroups whose names match the supplied prefix
	FlexGroupGetAll(prefix string) (*azgo.VolumeGetIterResponse, error)
	// WaitForAsyncResponse handles waiting for an AsyncResponse to return successfully or return an error.
	WaitForAsyncResponse(ctx context.Context, zapiResult interface{}, maxWaitTime time.Duration) error
	// JobGetIterStatus returns the current job status for Async requests.
	JobGetIterStatus(jobId int) (*azgo.JobGetIterResponse, error)
	// VolumeCreate creates a volume with the specified options
	// equivalent to filer::> volume create -vserver iscsi_vs -volume v -aggregate aggr1 -size 1g -state online -type RW -policy default -unix-permissions ---rwxr-xr-x -space-guarantee none -snapshot-policy none -security-style unix -encrypt false
	VolumeCreate(ctx context.Context, name, aggregateName, size, spaceReserve, snapshotPolicy, unixPermissions, exportPolicy, securityStyle, tieringPolicy, comment string, qosPolicyGroup QosPolicyGroup, encrypt *bool, snapshotReserve int, dpVolume bool) (*azgo.VolumeCreateResponse, error)
	VolumeModifyExportPolicy(volumeName, exportPolicyName string) (*azgo.VolumeModifyIterResponse, error)
	VolumeModifyUnixPermissions(volumeName, unixPermissions string) (*azgo.VolumeModifyIterResponse, error)
	// VolumeCloneCreate clones a volume from a snapshot
	VolumeCloneCreate(name, source, snapshot string) (*azgo.VolumeCloneCreateResponse, error)
	// VolumeCloneCreateAsync clones a volume from a snapshot
	VolumeCloneCreateAsync(name, source, snapshot string) (*azgo.VolumeCloneCreateAsyncResponse, error)
	// VolumeCloneSplitStart splits a cloned volume from its parent
	VolumeCloneSplitStart(name string) (*azgo.VolumeCloneSplitStartResponse, error)
	// VolumeDisableSnapshotDirectoryAccess disables access to the ".snapshot" directory
	// Disable '.snapshot' to allow official mysql container's chmod-in-init to work
	VolumeDisableSnapshotDirectoryAccess(name string) (*azgo.VolumeModifyIterResponse, error)
	// Use this to set the QoS Policy Group for volume clones since
	// we can't set adaptive policy groups directly during volume clone creation.
	VolumeSetQosPolicyGroupName(name string, qosPolicyGroup QosPolicyGroup) (*azgo.VolumeModifyIterResponse, error)
	// VolumeExists tests for the existence of a Flexvol
	VolumeExists(ctx context.Context, name string) (bool, error)
	// VolumeUsedSize retrieves the used bytes of the specified volume
	VolumeUsedSize(name string) (int, error)
	// VolumeSize retrieves the size of the specified volume
	VolumeSize(name string) (int, error)
	// VolumeSetSize sets the size of the specified volume
	VolumeSetSize(name, newSize string) (*azgo.VolumeSizeResponse, error)
	// VolumeMount mounts a volume at the specified junction
	VolumeMount(name, junctionPath string) (*azgo.VolumeMountResponse, error)
	// VolumeUnmount unmounts a volume from the specified junction
	VolumeUnmount(name string, force bool) (*azgo.VolumeUnmountResponse, error)
	// VolumeOffline offlines a volume
	VolumeOffline(name string) (*azgo.VolumeOfflineResponse, error)
	// VolumeDestroy destroys a volume
	VolumeDestroy(name string, force bool) (*azgo.VolumeDestroyResponse, error)
	// VolumeGet returns all relevant details for a single Flexvol
	// equivalent to filer::> volume show
	VolumeGet(name string) (*azgo.VolumeAttributesType, error)
	// VolumeGetType returns the volume type such as RW or DP
	VolumeGetType(name string) (string, error)
	// VolumeGetAll returns all relevant details for all FlexVols whose names match the supplied prefix
	// equivalent to filer::> volume show
	VolumeGetAll(prefix string) (response *azgo.VolumeGetIterResponse, err error)
	// VolumeList returns the names of all Flexvols whose names match the supplied prefix
	VolumeList(prefix string) (*azgo.VolumeGetIterResponse, error)
	// VolumeListByAttrs returns the names of all Flexvols matching the specified attributes
	VolumeListByAttrs(prefix, aggregate, spaceReserve, snapshotPolicy, tieringPolicy string, snapshotDir bool, encrypt *bool, snapReserve int) (*azgo.VolumeGetIterResponse, error)
	// VolumeListAllBackedBySnapshot returns the names of all FlexVols backed by the specified snapshot
	VolumeListAllBackedBySnapshot(ctx context.Context, volumeName, snapshotName string) ([]string, error)
	// VolumeRename changes the name of a FlexVol (but not a FlexGroup!)
	VolumeRename(volumeName, newVolumeName string) (*azgo.VolumeRenameResponse, error)
	// VolumeSetComment sets a volume's comment to the supplied value
	// equivalent to filer::> volume modify -vserver iscsi_vs -volume v -comment newVolumeComment
	VolumeSetComment(ctx context.Context, volumeName, newVolumeComment string) (*azgo.VolumeModifyIterResponse, error)
	// QtreeCreate creates a qtree with the specified options
	// equivalent to filer::> qtree create -vserver ndvp_vs -volume v -qtree q -export-policy default -unix-permissions ---rwxr-xr-x -security-style unix
	QtreeCreate(name, volumeName, unixPermissions, exportPolicy, securityStyle, qosPolicy string) (*azgo.QtreeCreateResponse, error)
	// QtreeRename renames a qtree
	// equivalent to filer::> volume qtree rename
	QtreeRename(path, newPath string) (*azgo.QtreeRenameResponse, error)
	// QtreeDestroyAsync destroys a qtree in the background
	// equivalent to filer::> volume qtree delete -foreground false
	QtreeDestroyAsync(path string, force bool) (*azgo.QtreeDeleteAsyncResponse, error)
	// QtreeList returns the names of all Qtrees whose names match the supplied prefix
	// equivalent to filer::> volume qtree show
	QtreeList(prefix, volumePrefix string) (*azgo.QtreeListIterResponse, error)
	// QtreeCount returns the number of Qtrees in the specified Flexvol, not including the Flexvol itself
	QtreeCount(ctx context.Context, volume string) (int, error)
	// QtreeExists returns true if the named Qtree exists (and is unique in the matching Flexvols)
	QtreeExists(ctx context.Context, name, volumePrefix string) (bool, string, error)
	// QtreeGet returns all relevant details for a single qtree
	// equivalent to filer::> volume qtree show
	QtreeGet(name, volumePrefix string) (*azgo.QtreeInfoType, error)
	// QtreeGetAll returns all relevant details for all qtrees whose Flexvol names match the supplied prefix
	// equivalent to filer::> volume qtree show
	QtreeGetAll(volumePrefix string) (*azgo.QtreeListIterResponse, error)
	QtreeModifyExportPolicy(name, volumeName, exportPolicy string) (*azgo.QtreeModifyResponse, error)
	// QuotaOn enables quotas on a Flexvol
	// equivalent to filer::> volume quota on
	QuotaOn(volume string) (*azgo.QuotaOnResponse, error)
	// QuotaOff disables quotas on a Flexvol
	// equivalent to filer::> volume quota off
	QuotaOff(volume string) (*azgo.QuotaOffResponse, error)
	// QuotaResize resizes quotas on a Flexvol
	// equivalent to filer::> volume quota resize
	QuotaResize(volume string) (*azgo.QuotaResizeResponse, error)
	// QuotaStatus returns the quota status for a Flexvol
	// equivalent to filer::> volume quota show
	QuotaStatus(volume string) (*azgo.QuotaStatusResponse, error)
	// QuotaSetEntry creates a new quota rule with an optional hard disk limit
	// equivalent to filer::> volume quota policy rule create
	QuotaSetEntry(qtreeName, volumeName, quotaTarget, quotaType, diskLimit string) (*azgo.QuotaSetEntryResponse, error)
	// QuotaEntryGet returns the disk limit for a single qtree
	// equivalent to filer::> volume quota policy rule show
	QuotaGetEntry(target, quotaType string) (*azgo.QuotaEntryType, error)
	// QuotaEntryList returns the disk limit quotas for a Flexvol
	// equivalent to filer::> volume quota policy rule show
	QuotaEntryList(volume string) (*azgo.QuotaListEntriesIterResponse, error)
	// ExportPolicyCreate creates an export policy
	// equivalent to filer::> vserver export-policy create
	ExportPolicyCreate(policy string) (*azgo.ExportPolicyCreateResponse, error)
	ExportPolicyGet(policy string) (*azgo.ExportPolicyGetResponse, error)
	ExportPolicyDestroy(policy string) (*azgo.ExportPolicyDestroyResponse, error)
	// ExportRuleCreate creates a rule in an export policy
	// equivalent to filer::> vserver export-policy rule create
	ExportRuleCreate(policy, clientMatch string, protocols, roSecFlavors, rwSecFlavors, suSecFlavors []string) (*azgo.ExportRuleCreateResponse, error)
	// ExportRuleGetIterRequest returns the export rules in an export policy
	// equivalent to filer::> vserver export-policy rule show
	ExportRuleGetIterRequest(policy string) (*azgo.ExportRuleGetIterResponse, error)
	// ExportRuleDestroy deletes the rule at the given index in the given policy
	ExportRuleDestroy(policy string, ruleIndex int) (*azgo.ExportRuleDestroyResponse, error)
	// SnapshotCreate creates a snapshot of a volume
	SnapshotCreate(snapshotName, volumeName string) (*azgo.SnapshotCreateResponse, error)
	// SnapshotList returns the list of snapshots associated with a volume
	SnapshotList(volumeName string) (*azgo.SnapshotGetIterResponse, error)
	// SnapshotRestoreVolume restores a volume to a snapshot as a non-blocking operation
	SnapshotRestoreVolume(snapshotName, volumeName string) (*azgo.SnapshotRestoreVolumeResponse, error)
	// DeleteSnapshot deletes a snapshot of a volume
	SnapshotDelete(snapshotName, volumeName string) (*azgo.SnapshotDeleteResponse, error)
	// IscsiServiceGetIterRequest returns information about an iSCSI target
	IscsiServiceGetIterRequest() (*azgo.IscsiServiceGetIterResponse, error)
	// IscsiNodeGetNameRequest gets the IQN of the vserver
	IscsiNodeGetNameRequest() (*azgo.IscsiNodeGetNameResponse, error)
	// IscsiInterfaceGetIterRequest returns information about the vserver's iSCSI interfaces
	IscsiInterfaceGetIterRequest() (*azgo.IscsiInterfaceGetIterResponse, error)
	// VserverGetIterRequest returns the vservers on the system
	// equivalent to filer::> vserver show
	VserverGetIterRequest() (*azgo.VserverGetIterResponse, error)
	// VserverGetIterAdminRequest returns vservers of type "admin" on the system.
	// equivalent to filer::> vserver show -type admin
	VserverGetIterAdminRequest() (*azgo.VserverGetIterResponse, error)
	// VserverGetRequest returns vserver to which it is sent
	// equivalent to filer::> vserver show
	VserverGetRequest() (*azgo.VserverGetResponse, error)
	// SVMGetAggregateNames returns an array of names of the aggregates assigned to the configured vserver.
	// The vserver-get-iter API works with either cluster or vserver scope, so the ZAPI runner may or may not
	// be configured for tunneling; using the query parameter ensures we address only the configured vserver.
	SVMGetAggregateNames() ([]string, error)
	// VserverShowAggrGetIterRequest returns the aggregates on the vserver.  Requires ONTAP 9 or later.
	// equivalent to filer::> vserver show-aggregates
	VserverShowAggrGetIterRequest() (*azgo.VserverShowAggrGetIterResponse, error)
	// AggrSpaceGetIterRequest returns the aggregates on the system
	// equivalent to filer::> storage aggregate show-space -aggregate-name aggregate
	AggrSpaceGetIterRequest(aggregateName string) (*azgo.AggrSpaceGetIterResponse, error)
	// AggregateCommitmentPercentage returns the allocated capacity percentage for an aggregate
	// See also;  https://practical-admin.com/blog/netapp-powershell-toolkit-aggregate-overcommitment-report/
	AggregateCommitment(ctx context.Context, aggregate string) (*AggregateCommitment, error)
	// SnapmirrorGetIterRequest returns the snapmirror operations on the destination cluster
	// equivalent to filer::> snapmirror show
	SnapmirrorGetIterRequest(relGroupType string) (*azgo.SnapmirrorGetIterResponse, error)
	// SnapmirrorGetDestinationIterRequest returns the snapmirror operations on the source cluster
	// equivalent to filer::> snapmirror list-destinations
	SnapmirrorGetDestinationIterRequest(relGroupType string) (*azgo.SnapmirrorGetDestinationIterResponse, error)
	// GetPeeredVservers returns a list of vservers peered with the vserver for this backend
	GetPeeredVservers(ctx context.Context) ([]string, error)
	// IsVserverDRDestination identifies if the Vserver is a destination vserver of Snapmirror relationship (SVM-DR) or not
	IsVserverDRDestination(ctx context.Context) (bool, error)
	// IsVserverDRSource identifies if the Vserver is a source vserver of Snapmirror relationship (SVM-DR) or not
	IsVserverDRSource(ctx context.Context) (bool, error)
	SnapmirrorGet(localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string) (*azgo.SnapmirrorGetResponse, error)
	SnapmirrorCreate(localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName, repPolicy, repSchedule string) (*azgo.SnapmirrorCreateResponse, error)
	SnapmirrorInitialize(localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string) (*azgo.SnapmirrorInitializeResponse, error)
	SnapmirrorResync(localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string) (*azgo.SnapmirrorResyncResponse, error)
	SnapmirrorBreak(localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName, snapshotName string) (*azgo.SnapmirrorBreakResponse, error)
	SnapmirrorQuiesce(localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string) (*azgo.SnapmirrorQuiesceResponse, error)
	SnapmirrorAbort(localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string) (*azgo.SnapmirrorAbortResponse, error)
	// SnapmirrorRelease removes all local snapmirror relationship metadata from the source vserver
	// Intended to be used on the source vserver
	SnapmirrorRelease(sourceFlexvolName, sourceSVMName string) error
	// Intended to be from the destination vserver
	SnapmirrorDeleteViaDestination(localFlexvolName, localSVMName string) (*azgo.SnapmirrorDestroyResponse, error)
	// Intended to be from the destination vserver
	SnapmirrorDelete(localFlexvolName, localSVMName, remoteFlexvolName, remoteSVMName string) (*azgo.SnapmirrorDestroyResponse, error)
	IsVserverDRCapable(ctx context.Context) (bool, error)
	SnapmirrorPolicyExists(ctx context.Context, policyName string) (bool, error)
	SnapmirrorPolicyGet(ctx context.Context, policyName string) (*azgo.SnapmirrorPolicyInfoType, error)
	JobScheduleExists(ctx context.Context, jobName string) (bool, error)
	// NetInterfaceGet returns the list of network interfaces with associated metadata
	// equivalent to filer::> net interface list, but only those LIFs that are operational
	NetInterfaceGet() (*azgo.NetInterfaceGetIterResponse, error)
	NetInterfaceGetDataLIFsNode(ctx context.Context, ip string) (string, error)
	NetInterfaceGetDataLIFs(ctx context.Context, protocol string) ([]string, error)
	// SystemGetVersion returns the system version
	// equivalent to filer::> version
	SystemGetVersion() (*azgo.SystemGetVersionResponse, error)
	// SystemGetOntapiVersion gets the ONTAPI version using the credentials, and caches & returns the result.
	SystemGetOntapiVersion(ctx context.Context) (string, error)
	NodeListSerialNumbers(ctx context.Context) ([]string, error)
	// EmsAutosupportLog generates an auto support message with the supplied parameters
	EmsAutosupportLog(appVersion string, autoSupport bool, category string, computerName string, eventDescription string, eventID int, eventSource string, logLevel int) (*azgo.EmsAutosupportLogResponse, error)
	TieringPolicyValue(ctx context.Context) string
	// IscsiInitiatorAddAuth creates and sets the authorization details for a single initiator
	//
	//	equivalent to filer::> vserver iscsi security create -vserver SVM -initiator-name iqn.1993-08.org.debian:01:9031309bbebd \
	//	                         -auth-type CHAP -user-name outboundUserName -outbound-user-name outboundPassphrase
	IscsiInitiatorAddAuth(initiator, authType, userName, passphrase, outboundUserName, outboundPassphrase string) (*azgo.IscsiInitiatorAddAuthResponse, error)
	// IscsiInitiatorAuthGetIter returns the authorization details for all non-default initiators for the Client's SVM
	// equivalent to filer::> vserver iscsi security show -vserver SVM
	IscsiInitiatorAuthGetIter() ([]azgo.IscsiSecurityEntryInfoType, error)
	// IscsiInitiatorDeleteAuth deletes the authorization details for a single initiator
	// equivalent to filer::> vserver iscsi security delete -vserver SVM -initiator-name iqn.1993-08.org.debian:01:9031309bbebd
	IscsiInitiatorDeleteAuth(initiator string) (*azgo.IscsiInitiatorDeleteAuthResponse, error)
	// IscsiInitiatorGetAuth returns the authorization details for a single initiator
	// equivalent to filer::> vserver iscsi security show -vserver SVM -initiator-name iqn.1993-08.org.debian:01:9031309bbebd
	//
	//	or filer::> vserver iscsi security show -vserver SVM -initiator-name default
	IscsiInitiatorGetAuth(initiator string) (*azgo.IscsiInitiatorGetAuthResponse, error)
	// IscsiInitiatorGetDefaultAuth returns the authorization details for the default initiator
	// equivalent to filer::> vserver iscsi security show -vserver SVM -initiator-name default
	IscsiInitiatorGetDefaultAuth() (*azgo.IscsiInitiatorGetDefaultAuthResponse, error)
	// IscsiInitiatorGetIter returns the initiator details for all non-default initiators for the Client's SVM
	// equivalent to filer::> vserver iscsi initiator show -vserver SVM
	IscsiInitiatorGetIter() ([]azgo.IscsiInitiatorListEntryInfoType, error)
	// IscsiInitiatorModifyCHAPParams modifies the authorization details for a single initiator
	//
	//	equivalent to filer::> vserver iscsi security modify -vserver SVM -initiator-name iqn.1993-08.org.debian:01:9031309bbebd \
	//	                         -user-name outboundUserName -outbound-user-name outboundPassphrase
	IscsiInitiatorModifyCHAPParams(initiator, userName, passphrase, outboundUserName, outboundPassphrase string) (*azgo.IscsiInitiatorModifyChapParamsResponse, error)
	// IscsiInitiatorSetDefaultAuth sets the authorization details for the default initiator
	//
	//	equivalent to filer::> vserver iscsi security modify -vserver SVM -initiator-name default \
	//	                          -auth-type CHAP -user-name outboundUserName -outbound-user-name outboundPassphrase
	IscsiInitiatorSetDefaultAuth(authType, userName, passphrase, outboundUserName, outboundPassphrase string) (*azgo.IscsiInitiatorSetDefaultAuthResponse, error)
}

ZapiClientInterface ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL