Documentation ¶
Index ¶
- Constants
- func GetError(zapiResult interface{}, errorIn error) (errorOut error)
- func NewZapiResultValue(zapiResult interface{}) reflect.Value
- type AggregateCommitment
- type Client
- func (d Client) AggrSpaceGetIterRequest(aggregateName string) (*azgo.AggrSpaceGetIterResponse, error)
- func (d Client) AggregateCommitment(aggregate string) (*AggregateCommitment, error)
- func (d Client) EmsAutosupportLog(appVersion string, autoSupport bool, category string, computerName string, ...) (*azgo.EmsAutosupportLogResponse, error)
- func (d Client) ExportPolicyCreate(policy string) (*azgo.ExportPolicyCreateResponse, error)
- func (d Client) ExportRuleCreate(policy, clientMatch string, ...) (*azgo.ExportRuleCreateResponse, error)
- func (d Client) ExportRuleGetIterRequest(policy string) (*azgo.ExportRuleGetIterResponse, error)
- func (d Client) FlexGroupCreate(name string, size int, aggrs []azgo.AggrNameType, ...) (*azgo.VolumeCreateAsyncResponse, error)
- func (d Client) FlexGroupDestroy(name string, force bool) (*azgo.VolumeDestroyAsyncResponse, error)
- func (d Client) FlexGroupExists(name string) (bool, error)
- func (d Client) FlexGroupGet(name string) (*azgo.VolumeAttributesType, error)
- func (d Client) FlexGroupGetAll(prefix string) (*azgo.VolumeGetIterResponse, error)
- func (d Client) FlexGroupSetSize(name, newSize string) (*azgo.VolumeSizeAsyncResponse, error)
- func (d Client) FlexGroupSize(name string) (int, error)
- func (d Client) FlexGroupVolumeDisableSnapshotDirectoryAccess(name string) (*azgo.VolumeModifyIterAsyncResponse, error)
- func (d Client) GetClonedZapiRunner() *azgo.ZapiRunner
- func (d Client) GetNontunneledZapiRunner() *azgo.ZapiRunner
- func (d Client) IgroupAdd(initiatorGroupName, initiator string) (*azgo.IgroupAddResponse, error)
- func (d Client) IgroupCreate(initiatorGroupName, initiatorGroupType, osType string) (*azgo.IgroupCreateResponse, error)
- func (d Client) IgroupDestroy(initiatorGroupName string) (*azgo.IgroupDestroyResponse, error)
- func (d Client) IgroupList() (*azgo.IgroupGetIterResponse, error)
- func (d Client) IgroupRemove(initiatorGroupName, initiator string, force bool) (*azgo.IgroupRemoveResponse, error)
- func (d Client) IscsiInterfaceGetIterRequest() (*azgo.IscsiInterfaceGetIterResponse, error)
- func (d Client) IscsiNodeGetNameRequest() (*azgo.IscsiNodeGetNameResponse, error)
- func (d Client) IscsiServiceGetIterRequest() (*azgo.IscsiServiceGetIterResponse, error)
- func (d Client) JobGetIterStatus(jobId int) (*azgo.JobGetIterResponse, error)
- func (d Client) LunCloneCreate(volumeName, sourceLun, destinationLun string) (*azgo.CloneCreateResponse, error)
- func (d Client) LunCount(volume string) (int, error)
- func (d Client) LunCreate(lunPath string, sizeInBytes int, osType string, spaceReserved bool, ...) (*azgo.LunCreateBySizeResponse, error)
- func (d Client) LunDestroy(lunPath string) (*azgo.LunDestroyResponse, error)
- func (d Client) LunGet(path string) (*azgo.LunInfoType, error)
- func (d Client) LunGetAll(pathPattern string) (*azgo.LunGetIterResponse, error)
- func (d Client) LunGetAllForVolume(volumeName string) (*azgo.LunGetIterResponse, error)
- func (d Client) LunGetAttribute(lunPath, name string) (*azgo.LunGetAttributeResponse, error)
- func (d Client) LunGetGeometry(path string) (*azgo.LunGetGeometryResponse, error)
- func (d Client) LunGetSerialNumber(lunPath string) (*azgo.LunGetSerialNumberResponse, error)
- func (d Client) LunMap(initiatorGroupName, lunPath string, lunID int) (*azgo.LunMapResponse, error)
- func (d Client) LunMapAutoID(initiatorGroupName, lunPath string) (*azgo.LunMapResponse, error)
- func (d Client) LunMapIfNotMapped(initiatorGroupName, lunPath string) (int, error)
- func (d Client) LunMapListInfo(lunPath string) (*azgo.LunMapListInfoResponse, error)
- func (d Client) LunOffline(lunPath string) (*azgo.LunOfflineResponse, error)
- func (d Client) LunOnline(lunPath string) (*azgo.LunOnlineResponse, error)
- func (d Client) LunResize(path string, sizeBytes int) (uint64, error)
- func (d Client) LunSetAttribute(lunPath, name, value string) (*azgo.LunSetAttributeResponse, error)
- func (d Client) NetInterfaceGet() (*azgo.NetInterfaceGetIterResponse, error)
- func (d Client) NetInterfaceGetDataLIFs(protocol string) ([]string, error)
- func (d Client) NodeListSerialNumbers() ([]string, error)
- func (d Client) QtreeCount(volume string) (int, error)
- func (d Client) QtreeCreate(name, volumeName, unixPermissions, exportPolicy, securityStyle string) (*azgo.QtreeCreateResponse, error)
- func (d Client) QtreeDestroyAsync(path string, force bool) (*azgo.QtreeDeleteAsyncResponse, error)
- func (d Client) QtreeExists(name, volumePrefix string) (bool, string, error)
- func (d Client) QtreeGet(name, volumePrefix string) (*azgo.QtreeInfoType, error)
- func (d Client) QtreeGetAll(volumePrefix string) (*azgo.QtreeListIterResponse, error)
- func (d Client) QtreeList(prefix, volumePrefix string) (*azgo.QtreeListIterResponse, error)
- func (d Client) QtreeRename(path, newPath string) (*azgo.QtreeRenameResponse, error)
- func (d Client) QuotaEntryList(volume string) (*azgo.QuotaListEntriesIterResponse, error)
- func (d Client) QuotaGetEntry(target string) (*azgo.QuotaEntryType, error)
- func (d Client) QuotaOff(volume string) (*azgo.QuotaOffResponse, error)
- func (d Client) QuotaOn(volume string) (*azgo.QuotaOnResponse, error)
- func (d Client) QuotaResize(volume string) (*azgo.QuotaResizeResponse, error)
- func (d Client) QuotaSetEntry(qtreeName, volumeName, quotaTarget, quotaType, diskLimit string) (*azgo.QuotaSetEntryResponse, error)
- func (d Client) QuotaStatus(volume string) (*azgo.QuotaStatusResponse, error)
- func (d Client) SnapshotCreate(snapshotName, volumeName string) (*azgo.SnapshotCreateResponse, error)
- func (d Client) SnapshotDelete(snapshotName, volumeName string) (*azgo.SnapshotDeleteResponse, error)
- func (d Client) SnapshotList(volumeName string) (*azgo.SnapshotGetIterResponse, error)
- func (d Client) SnapshotRestoreVolume(snapshotName, volumeName string) (*azgo.SnapshotRestoreVolumeResponse, error)
- func (d Client) SupportsFeature(feature feature) bool
- func (d Client) SystemGetOntapiVersion() (string, error)
- func (d Client) SystemGetVersion() (*azgo.SystemGetVersionResponse, error)
- func (d Client) VolumeCloneCreate(name, source, snapshot string) (*azgo.VolumeCloneCreateResponse, error)
- func (d Client) VolumeCloneSplitStart(name string) (*azgo.VolumeCloneSplitStartResponse, error)
- func (d Client) VolumeCreate(...) (*azgo.VolumeCreateResponse, error)
- func (d Client) VolumeDestroy(name string, force bool) (*azgo.VolumeDestroyResponse, error)
- func (d Client) VolumeDisableSnapshotDirectoryAccess(name string) (*azgo.VolumeModifyIterResponse, error)
- func (d Client) VolumeExists(name string) (bool, error)
- func (d Client) VolumeGet(name string) (*azgo.VolumeAttributesType, error)
- func (d Client) VolumeGetAll(prefix string) (response *azgo.VolumeGetIterResponse, err error)
- func (d Client) VolumeList(prefix string) (*azgo.VolumeGetIterResponse, error)
- func (d Client) VolumeListAllBackedBySnapshot(volumeName, snapshotName string) ([]string, error)
- func (d Client) VolumeListByAttrs(prefix, aggregate, spaceReserve, snapshotPolicy string, snapshotDir bool, ...) (*azgo.VolumeGetIterResponse, error)
- func (d Client) VolumeMount(name, junctionPath string) (*azgo.VolumeMountResponse, error)
- func (d Client) VolumeOffline(name string) (*azgo.VolumeOfflineResponse, error)
- func (d Client) VolumeRename(volumeName, newVolumeName string) (*azgo.VolumeRenameResponse, error)
- func (d Client) VolumeSetSize(name, newSize string) (*azgo.VolumeSizeResponse, error)
- func (d Client) VolumeSize(name string) (int, error)
- func (d Client) VolumeUnmount(name string, force bool) (*azgo.VolumeUnmountResponse, error)
- func (d Client) VserverGetAggregateNames() ([]string, error)
- func (d Client) VserverGetIterAdminRequest() (*azgo.VserverGetIterResponse, error)
- func (d Client) VserverGetIterRequest() (*azgo.VserverGetIterResponse, error)
- func (d Client) VserverGetRequest() (*azgo.VserverGetResponse, error)
- func (d Client) VserverShowAggrGetIterRequest() (*azgo.VserverShowAggrGetIterResponse, error)
- type ClientConfig
- type ZapiAsyncResult
- type ZapiError
- func (e ZapiError) Code() string
- func (e ZapiError) Error() string
- func (e ZapiError) IsFailedToLoadJobError() bool
- func (e ZapiError) IsPassed() bool
- func (e ZapiError) IsPrivilegeError() bool
- func (e ZapiError) IsScopeError() bool
- func (e ZapiError) Reason() string
- func (e ZapiError) Status() string
Constants ¶
const ( MinimumONTAPIVersion feature = "MINIMUM_ONTAPI_VERSION" NetAppFlexGroups feature = "NETAPP_FLEXGROUPS" NetAppFabricPoolFlexVol feature = "NETAPP_FABRICPOOL_FLEXVOL" NetAppFabricPoolFlexGroup feature = "NETAPP_FABRICPOOL_FLEXGROUP" LunGeometrySkip feature = "LUN_GEOMETRY_SKIP" )
Define new version-specific feature constants here
const (
NumericalValueNotSet = -1
)
Variables ¶
This section is empty.
Functions ¶
func GetError ¶
GetError accepts both an error and the Response value from an AZGO invocation. If error is non-nil, it is returned as is. Otherwise, the Response value is probed for an error returned by ZAPI; if one is found, a ZapiError error object is returned. If no failures are detected, the method returns nil. The interface passed in may either be a Response object, or the always-embedded Result object where the error info exists.
func NewZapiResultValue ¶
NewZapiResultValue obtains the Result from an AZGO Response object and returns the Result
Types ¶
type AggregateCommitment ¶
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 Client ¶
type Client struct { SVMUUID string // contains filtered or unexported fields }
Client is the object to use for interacting with ONTAP controllers
func NewClient ¶
func NewClient(config ClientConfig) *Client
NewClient is a factory method for creating a new instance
func (Client) AggrSpaceGetIterRequest ¶
func (d 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 (d Client) AggregateCommitment(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) EmsAutosupportLog ¶
func (d 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 (d Client) ExportPolicyCreate(policy string) (*azgo.ExportPolicyCreateResponse, error)
ExportPolicyCreate creates an export policy equivalent to filer::> vserver export-policy create
func (Client) ExportRuleCreate ¶
func (d 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) ExportRuleGetIterRequest ¶
func (d 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 (d Client) FlexGroupCreate( name string, size int, aggrs []azgo.AggrNameType, spaceReserve, snapshotPolicy, unixPermissions, exportPolicy, securityStyle string, 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 ¶
FlexGroupDestroy destroys a FlexGroup
func (Client) FlexGroupExists ¶
FlexGroupExists tests for the existence of a FlexGroup
func (Client) FlexGroupGet ¶
func (d Client) FlexGroupGet(name string) (*azgo.VolumeAttributesType, error)
FlexGroupGet returns all relevant details for a single FlexGroup
func (Client) FlexGroupGetAll ¶
func (d Client) FlexGroupGetAll(prefix string) (*azgo.VolumeGetIterResponse, error)
FlexGroupGetAll returns all relevant details for all FlexGroups whose names match the supplied prefix
func (Client) FlexGroupSetSize ¶
func (d Client) FlexGroupSetSize(name, newSize string) (*azgo.VolumeSizeAsyncResponse, error)
FlexGroupSetSize sets the size of the specified FlexGroup
func (Client) FlexGroupSize ¶
FlexGroupSize retrieves the size of the specified volume
func (Client) FlexGroupVolumeDisableSnapshotDirectoryAccess ¶
func (d Client) FlexGroupVolumeDisableSnapshotDirectoryAccess(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 (d Client) GetClonedZapiRunner() *azgo.ZapiRunner
GetClonedZapiRunner returns a clone of the ZapiRunner configured on this driver.
func (Client) GetNontunneledZapiRunner ¶
func (d 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) IgroupAdd ¶
func (d 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 (d 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 (d Client) IgroupDestroy(initiatorGroupName string) (*azgo.IgroupDestroyResponse, error)
IgroupDestroy destroys an initiator group
func (Client) IgroupList ¶
func (d Client) IgroupList() (*azgo.IgroupGetIterResponse, error)
IgroupList lists initiator groups
func (Client) IgroupRemove ¶
func (d Client) IgroupRemove(initiatorGroupName, initiator string, force bool) (*azgo.IgroupRemoveResponse, error)
IgroupRemove removes an initiator from an initiator group
func (Client) IscsiInterfaceGetIterRequest ¶
func (d Client) IscsiInterfaceGetIterRequest() (*azgo.IscsiInterfaceGetIterResponse, error)
IscsiInterfaceGetIterRequest returns information about the vserver's iSCSI interfaces
func (Client) IscsiNodeGetNameRequest ¶
func (d Client) IscsiNodeGetNameRequest() (*azgo.IscsiNodeGetNameResponse, error)
IscsiNodeGetNameRequest gets the IQN of the vserver
func (Client) IscsiServiceGetIterRequest ¶
func (d Client) IscsiServiceGetIterRequest() (*azgo.IscsiServiceGetIterResponse, error)
IscsiServiceGetIterRequest returns information about an iSCSI target
func (Client) JobGetIterStatus ¶
func (d Client) JobGetIterStatus(jobId int) (*azgo.JobGetIterResponse, error)
JobGetIterStatus returns the current job status for Async requests.
func (Client) LunCloneCreate ¶
func (d Client) LunCloneCreate(volumeName, sourceLun, destinationLun string) (*azgo.CloneCreateResponse, error)
LunCloneCreate clones a LUN from a snapshot
func (Client) LunCreate ¶
func (d Client) LunCreate(lunPath string, sizeInBytes int, osType string, 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 (d 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 (d 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 (d 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 (d 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) LunGetAttribute ¶
func (d Client) LunGetAttribute(lunPath, name string) (*azgo.LunGetAttributeResponse, error)
LunGetAttribute gets a named attribute for a given LUN.
func (Client) LunGetGeometry ¶
func (d Client) LunGetGeometry(path string) (*azgo.LunGetGeometryResponse, error)
func (Client) LunGetSerialNumber ¶
func (d Client) LunGetSerialNumber(lunPath string) (*azgo.LunGetSerialNumberResponse, error)
LunGetSerialNumber returns the serial# for a lun
func (Client) LunMap ¶
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 (d 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) LunMapIfNotMapped ¶
func (Client) LunMapListInfo ¶
func (d 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) LunOffline ¶
func (d 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 (d 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) LunSetAttribute ¶
func (d Client) LunSetAttribute(lunPath, name, value string) (*azgo.LunSetAttributeResponse, error)
LunSetAttribute sets a named attribute for a given LUN.
func (Client) NetInterfaceGet ¶
func (d Client) NetInterfaceGet() (*azgo.NetInterfaceGetIterResponse, error)
NetInterfaceGet returns the list of network interfaces with associated metadata equivalent to filer::> net interface list
func (Client) NetInterfaceGetDataLIFs ¶
func (Client) NodeListSerialNumbers ¶
func (Client) QtreeCount ¶
QtreeCount returns the number of Qtrees in the specified Flexvol, not including the Flexvol itself
func (Client) QtreeCreate ¶
func (d Client) QtreeCreate(name, volumeName, unixPermissions, exportPolicy, securityStyle 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 ¶
QtreeDestroyAsync destroys a qtree in the background equivalent to filer::> volume qtree delete -foreground false
func (Client) QtreeExists ¶
QtreeExists returns true if the named Qtree exists (and is unique in the matching Flexvols)
func (Client) QtreeGet ¶
func (d 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 (d 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 (d 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) QtreeRename ¶
func (d Client) QtreeRename(path, newPath string) (*azgo.QtreeRenameResponse, error)
QtreeRename renames a qtree equivalent to filer::> volume qtree rename
func (Client) QuotaEntryList ¶
func (d 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 (d Client) QuotaGetEntry(target 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 (d Client) QuotaOff(volume string) (*azgo.QuotaOffResponse, error)
QuotaOff disables quotas on a Flexvol equivalent to filer::> volume quota off
func (Client) QuotaOn ¶
func (d Client) QuotaOn(volume string) (*azgo.QuotaOnResponse, error)
QuotaOn enables quotas on a Flexvol equivalent to filer::> volume quota on
func (Client) QuotaResize ¶
func (d Client) QuotaResize(volume string) (*azgo.QuotaResizeResponse, error)
QuotaResize resizes quotas on a Flexvol equivalent to filer::> volume quota resize
func (Client) QuotaSetEntry ¶
func (d 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 (d Client) QuotaStatus(volume string) (*azgo.QuotaStatusResponse, error)
QuotaStatus returns the quota status for a Flexvol equivalent to filer::> volume quota show
func (Client) SnapshotCreate ¶
func (d Client) SnapshotCreate(snapshotName, volumeName string) (*azgo.SnapshotCreateResponse, error)
SnapshotCreate creates a snapshot of a volume
func (Client) SnapshotDelete ¶
func (d Client) SnapshotDelete(snapshotName, volumeName string) (*azgo.SnapshotDeleteResponse, error)
DeleteSnapshot deletes a snapshot of a volume
func (Client) SnapshotList ¶
func (d Client) SnapshotList(volumeName string) (*azgo.SnapshotGetIterResponse, error)
SnapshotList returns the list of snapshots associated with a volume
func (Client) SnapshotRestoreVolume ¶
func (d Client) SnapshotRestoreVolume(snapshotName, volumeName string) (*azgo.SnapshotRestoreVolumeResponse, error)
SnapshotRestoreVolume restores a volume to a snapshot
func (Client) SupportsFeature ¶
SupportsFeature returns true if the Ontapi version supports the supplied feature
func (Client) SystemGetOntapiVersion ¶
SystemGetOntapiVersion gets the ONTAPI version using the credentials, and caches & returns the result.
func (Client) SystemGetVersion ¶
func (d Client) SystemGetVersion() (*azgo.SystemGetVersionResponse, error)
SystemGetVersion returns the system version equivalent to filer::> version
func (Client) VolumeCloneCreate ¶
func (d Client) VolumeCloneCreate(name, source, snapshot string) (*azgo.VolumeCloneCreateResponse, error)
VolumeCloneCreate clones a volume from a snapshot
func (Client) VolumeCloneSplitStart ¶
func (d Client) VolumeCloneSplitStart(name string) (*azgo.VolumeCloneSplitStartResponse, error)
VolumeCloneSplitStart splits a cloned volume from its parent
func (Client) VolumeCreate ¶
func (d Client) VolumeCreate( name, aggregateName, size, spaceReserve, snapshotPolicy, unixPermissions, exportPolicy, securityStyle string, encrypt bool, snapshotReserve int, ) (*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 ¶
VolumeDestroy destroys a volume
func (Client) VolumeDisableSnapshotDirectoryAccess ¶
func (d 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 ¶
VolumeExists tests for the existence of a Flexvol
func (Client) VolumeGet ¶
func (d 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 (d 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) VolumeList ¶
func (d Client) VolumeList(prefix string) (*azgo.VolumeGetIterResponse, error)
VolumeList returns the names of all Flexvols whose names match the supplied prefix
func (Client) VolumeListAllBackedBySnapshot ¶
VolumeListAllBackedBySnapshot returns the names of all FlexVols backed by the specified snapshot
func (Client) VolumeListByAttrs ¶
func (d Client) VolumeListByAttrs( prefix, aggregate, spaceReserve, snapshotPolicy string, snapshotDir bool, encrypt bool, ) (*azgo.VolumeGetIterResponse, error)
VolumeListByAttrs returns the names of all Flexvols matching the specified attributes
func (Client) VolumeMount ¶
func (d Client) VolumeMount(name, junctionPath string) (*azgo.VolumeMountResponse, error)
VolumeMount mounts a volume at the specified junction
func (Client) VolumeOffline ¶
func (d Client) VolumeOffline(name string) (*azgo.VolumeOfflineResponse, error)
VolumeOffline offlines a volume
func (Client) VolumeRename ¶
func (d Client) VolumeRename(volumeName, newVolumeName string) (*azgo.VolumeRenameResponse, error)
VolumeRename changes the name of a FlexVol (but not a FlexGroup!)
func (Client) VolumeSetSize ¶
func (d Client) VolumeSetSize(name, newSize string) (*azgo.VolumeSizeResponse, error)
VolumeSetSize sets the size of the specified volume
func (Client) VolumeSize ¶
VolumeSize retrieves the size of the specified volume
func (Client) VolumeUnmount ¶
VolumeUnmount unmounts a volume from the specified junction
func (Client) VserverGetAggregateNames ¶
VserverGetAggregateNames 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) VserverGetIterAdminRequest ¶
func (d 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 (d Client) VserverGetIterRequest() (*azgo.VserverGetIterResponse, error)
VserverGetIterRequest returns the vservers on the system equivalent to filer::> vserver show
func (Client) VserverGetRequest ¶
func (d Client) VserverGetRequest() (*azgo.VserverGetResponse, error)
VserverGetRequest returns vserver to which it is sent equivalent to filer::> vserver show
func (Client) VserverShowAggrGetIterRequest ¶
func (d Client) VserverShowAggrGetIterRequest() (*azgo.VserverShowAggrGetIterResponse, error)
VserverShowAggrGetIterRequest returns the aggregates on the vserver. Requires ONTAP 9 or later. equivalent to filer::> vserver show-aggregates
type ClientConfig ¶
type ClientConfig struct { ManagementLIF string SVM string Username string Password string DriverContext tridentconfig.DriverContext ContextBasedZapiRecords int DebugTraceFlags map[string]bool }
ClientConfig holds the configuration data for Client objects
type ZapiAsyncResult ¶
type ZapiAsyncResult struct {
// contains filtered or unexported fields
}
ZapiAsyncResult encap
func NewZapiAsyncResult ¶
func NewZapiAsyncResult(zapiResult interface{}) (result ZapiAsyncResult, err error)
NewZapiAsyncResult accepts the Response value from any AZGO Async Request, extracts the status, jobId, and errorCode values and returns a ZapiAsyncResult.
type ZapiError ¶
type ZapiError struct {
// contains filtered or unexported fields
}
ZapiError encapsulates the status, reason, and errno values from a ZAPI invocation, and it provides helper methods for detecting common error conditions.
func NewZapiError ¶
func NewZapiError(zapiResult interface{}) (err ZapiError)
NewZapiError accepts the Response value from any AZGO call, extracts the status, reason, and errno values, and returns a ZapiError. The interface passed in may either be a Response object, or the always-embedded Result object where the error info exists.