v1

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Copyright (c) 2022 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2022 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2022 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2022 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2019 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2019 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2022 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyIsiVolume

func CopyIsiVolume(
	ctx context.Context,
	client api.Client,
	sourceName, destinationName string) (resp *getIsiVolumesResp, err error)

CopyIsiVolume creates a new volume on the cluster based on an existing volume

func CopyIsiVolumeWithIsiPath

func CopyIsiVolumeWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, sourceName, destinationName string) (resp *getIsiVolumesResp, err error)

CopyIsiVolumeWithIsiPath creates a new volume with isiPath on the cluster based on an existing volume

func CreateIsiQuota

func CreateIsiQuota(
	ctx context.Context,
	client api.Client,
	path string, container bool, size int64) (string, error)

CreateIsiQuota creates a hard directory quota on given path

func CreateIsiVolume

func CreateIsiVolume(
	ctx context.Context,
	client api.Client,
	name string) (resp *getIsiVolumesResp, err error)

CreateIsiVolume makes a new volume on the cluster

func CreateIsiVolumeWithACL

func CreateIsiVolumeWithACL(
	ctx context.Context,
	client api.Client,
	name, ACL string) (resp *getIsiVolumesResp, err error)

CreateIsiVolumeWithACL makes a new volume on the cluster with the specified permissions

func CreateIsiVolumeWithACLAndIsiPath

func CreateIsiVolumeWithACLAndIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, name, ACL string) (resp *getIsiVolumesResp, err error)

CreateIsiVolumeWithACLAndIsiPath makes a new volume on the cluster with the specified permissions and isiPath

func CreateIsiVolumeWithACLAndIsiPathMetaData added in v1.4.0

func CreateIsiVolumeWithACLAndIsiPathMetaData(
	ctx context.Context,
	client api.Client,
	isiPath, name, ACL string, metadata map[string]string) (resp *getIsiVolumesResp, err error)

CreateIsiVolumeWithACLAndIsiPathMetadata makes a new volume on the cluster with the specified permissions and isiPath

func CreateIsiVolumeWithIsiPath

func CreateIsiVolumeWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, name, isiVolumePathPermissions string) (resp *getIsiVolumesResp, err error)

CreateIsiVolumeWithIsiPath makes a new volume with isiPath on the cluster

func CreateIsiVolumeWithIsiPathMetaData added in v1.4.0

func CreateIsiVolumeWithIsiPathMetaData(
	ctx context.Context,
	client api.Client,
	isiPath, name, isiVolumePathPermissions string, metadata map[string]string) (resp *getIsiVolumesResp, err error)

CreateIsiVolumeWithIsiPathMetaData makes a new volume with isiPath on the cluster

func DeleteIsiQuota

func DeleteIsiQuota(
	ctx context.Context,
	client api.Client,
	path string) (err error)

DeleteIsiQuota removes the quota for a directory

func DeleteIsiQuotaByID

func DeleteIsiQuotaByID(
	ctx context.Context,
	client api.Client,
	id string) (err error)

DeleteIsiQuotaByID removes the quota for a directory by quota id

func DeleteIsiQuotaByIDWithZone

func DeleteIsiQuotaByIDWithZone(
	ctx context.Context,
	client api.Client,
	id, zone string) (err error)

DeleteIsiQuotaByIDWithZone removes the quota for a directory by quota id with access zone

func DeleteIsiVolume

func DeleteIsiVolume(
	ctx context.Context,
	client api.Client,
	name string) (resp *getIsiVolumesResp, err error)

DeleteIsiVolume removes a volume from the cluster

func DeleteIsiVolumeWithIsiPath

func DeleteIsiVolumeWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, name string) (resp *getIsiVolumesResp, err error)

DeleteIsiVolumeWithIsiPath removes a volume from the cluster with isiPath

func Export

func Export(
	ctx context.Context,
	client api.Client,
	path string) (err error)

Export enables an NFS export on the cluster to access the volumes. Return the path to the export so other processes can mount the volume directory

func GetAbsoluteSnapshotPath

func GetAbsoluteSnapshotPath(c api.Client, snapshotName, volumeName string) string

GetAbsoluteSnapshotPath get the absolute path of a snapshot

func GetIsiExports

func GetIsiExports(
	ctx context.Context,
	client api.Client) (resp *getIsiExportsResp, err error)

GetIsiExports queries a list of all exports on the cluster

func GetIsiSnapshotFolderWithSize

func GetIsiSnapshotFolderWithSize(
	ctx context.Context,
	client api.Client,
	isiPath, name, volume string) (resp *getIsiVolumeSizeResp, err error)

GetIsiSnapshotFolderWithSize lists size of all the children files and subfolders in a sanpshot directory

func GetIsiSnapshots

func GetIsiSnapshots(
	ctx context.Context,
	client api.Client) (resp *getIsiSnapshotsResp, err error)

GetIsiSnapshots queries a list of all snapshots on the cluster

func GetIsiVolume

func GetIsiVolume(
	ctx context.Context,
	client api.Client,
	name string) (resp *getIsiVolumeAttributesResp, err error)

GetIsiVolume queries the attributes of a volume on the cluster

func GetIsiVolumeWithIsiPath

func GetIsiVolumeWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, name string) (resp *getIsiVolumeAttributesResp, err error)

GetIsiVolumeWithIsiPath queries the attributes of a volume with isiPath on the cluster

func GetIsiVolumeWithSize

func GetIsiVolumeWithSize(
	ctx context.Context,
	client api.Client,
	isiPath, name string) (resp *getIsiVolumeSizeResp, err error)

GetIsiVolumeWithSize lists size of all the children files and subfolders in a directory

func GetIsiVolumeWithoutMetadata

func GetIsiVolumeWithoutMetadata(
	ctx context.Context,
	client api.Client,
	name string) (err error)

GetIsiVolumeWithoutMetadata is used to check whether a volume exists thus the url does not append the metadata parameter.

func GetIsiVolumeWithoutMetadataWithIsiPath

func GetIsiVolumeWithoutMetadataWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, name string) (err error)

GetIsiVolumeWithoutMetadataWithIsiPath is used to check whether a volume exists with isiPath thus the url does not append the metadata parameter.

func GetIsiVolumes

func GetIsiVolumes(
	ctx context.Context,
	client api.Client) (resp *getIsiVolumesResp, err error)

GetIsiVolumes queries a list of all volumes on the cluster

func GetRealNamespacePathWithIsiPath

func GetRealNamespacePathWithIsiPath(isiPath string) string

GetRealNamespacePathWithIsiPath gets the real namespace path by the combination of namespace and isiPath

func GetRealVolumeSnapshotPathWithIsiPath

func GetRealVolumeSnapshotPathWithIsiPath(isiPath string, name string) string

GetRealVolumeSnapshotPathWithIsiPath gets the real volume snapshot path by using the isiPath in the parameter rather than use the default one in the client object

func RemoveIsiSnapshot

func RemoveIsiSnapshot(
	ctx context.Context,
	client api.Client,
	id int64) error

RemoveIsiSnapshot deletes a snapshot from the cluster

func SetExportClients

func SetExportClients(
	ctx context.Context,
	client api.Client,
	Id int, clients []string) (err error)

SetExportClients limits access to an NFS export on the cluster to a specific client address.

func SetIsiQuotaHardThreshold

func SetIsiQuotaHardThreshold(
	ctx context.Context,
	client api.Client,
	path string, size int64) (string, error)

SetIsiQuotaHardThreshold sets the hard threshold of a quota for a directory This is really just CreateIsiQuota() with container set to false

func Unexport

func Unexport(
	ctx context.Context,
	client api.Client,
	Id int) (err error)

Unexport disables the NFS export on the cluster that points to the volumes directory.

func UpdateIsiQuotaHardThreshold

func UpdateIsiQuotaHardThreshold(
	ctx context.Context,
	client api.Client,
	path string, size int64) (err error)

UpdateIsiQuotaHardThreshold modifies the hard threshold of a quota for a directory

func UpdateIsiQuotaHardThresholdByID added in v1.2.0

func UpdateIsiQuotaHardThresholdByID(
	ctx context.Context,
	client api.Client,
	ID string, size int64) (err error)

UpdateIsiQuotaHardThresholdByID modifies the hard threshold of a quota for a directory

Types

type AclRequest

type AclRequest struct {
	Authoritative string     `json:"authoritative"`
	Action        string     `json:"action"`
	Owner         *Ownership `json:"owner"`
	Group         *Ownership `json:"group,omitempty"`
}

type ExportClientList

type ExportClientList struct {
	Clients []string `json:"clients"`
}

Isi PAPI export clients JSON struct

type ExportPathList

type ExportPathList struct {
	Paths  []string `json:"paths"`
	MapAll struct {
		User   string   `json:"user"`
		Groups []string `json:"groups,omitempty"`
	} `json:"map_all"`
}

Isi PAPI export path JSON struct

type IsiExport

type IsiExport struct {
	Id      int      `json:"id"`
	Paths   []string `json:"paths"`
	Clients []string `json:"clients"`
}

Isi PAPI export attributes JSON structs

type IsiQuota

type IsiQuota struct {
	Container                 bool          `json:"container,omitempty"`
	Enforced                  bool          `json:"enforced,omitempty"`
	Id                        string        `json:"id"`
	IncludeSnapshots          bool          `json:"include_snapshots,omitempty"`
	Linked                    interface{}   `json:"linked,omitempty"`
	Notifications             string        `json:"notifications,omitempty"`
	Path                      string        `json:"path,omitempty"`
	Persona                   interface{}   `json:"persona,omitempty"`
	Ready                     bool          `json:"ready,omitempty"`
	Thresholds                isiThresholds `json:"thresholds,omitempty"`
	ThresholdsIncludeOverhead bool          `json:"thresholds_include_overhead,omitempty"`
	Type                      string        `json:"type,omitempty"`
	Usage                     struct {
		Inodes   int64 `json:"inodes"`
		Logical  int64 `json:"logical"`
		Physical int64 `json:"physical"`
	} `json:"usage"`
}

func GetAllIsiQuota added in v1.9.0

func GetAllIsiQuota(
	ctx context.Context,
	client api.Client) (quotas []*IsiQuota, err error)

GetAllIsiQuota queries all quotas on the cluster

func GetIsiQuota

func GetIsiQuota(
	ctx context.Context,
	client api.Client,
	path string) (quota *IsiQuota, err error)

GetIsiQuota queries the quota for a directory

func GetIsiQuotaByID added in v1.2.0

func GetIsiQuotaByID(
	ctx context.Context,
	client api.Client,
	ID string) (quota *IsiQuota, err error)

GetIsiQuotaByID get the Quota instance by ID

type IsiQuotaListRespResume added in v1.9.0

type IsiQuotaListRespResume struct {
	Quotas []*IsiQuota `json:"quotas,omitempty"`
	Resume string      `json:"resume,omitempty"`
}

func GetIsiQuotaWithResume added in v1.9.0

func GetIsiQuotaWithResume(
	ctx context.Context,
	client api.Client, resume string) (quotas *IsiQuotaListRespResume, err error)

GetIsiQuotaWithResume queries the next page quotas based on resume token

type IsiQuotaReq

type IsiQuotaReq struct {
	Enforced                  bool             `json:"enforced"`
	IncludeSnapshots          bool             `json:"include_snapshots"`
	Path                      string           `json:"path"`
	Thresholds                isiThresholdsReq `json:"thresholds"`
	ThresholdsIncludeOverhead bool             `json:"thresholds_include_overhead"`
	Type                      string           `json:"type"`
	Container                 bool             `json:"container"`
}

type IsiSnapshot

type IsiSnapshot struct {
	Created       int64   `json:"created"`
	Expires       int64   `json:"expires"`
	HasLocks      bool    `json:"has_locks"`
	Id            int64   `json:"id"`
	Name          string  `json:"name"`
	Path          string  `json:"path"`
	PctFilesystem float64 `json:"pct_filesystem"`
	PctReserve    float64 `json:"pct_reserve"`
	Schedule      string  `json:"schedule"`
	ShadowBytes   int64   `json:"shadow_bytes"`
	Size          int64   `json:"size"`
	State         string  `json:"state"`
	TargetId      int64   `json:"target_it"`
	TargetName    string  `json:"target_name"`
}

Isi PAPI snapshot JSON struct

func CreateIsiSnapshot

func CreateIsiSnapshot(
	ctx context.Context,
	client api.Client,
	path, name string) (resp *IsiSnapshot, err error)

CreateIsiSnapshot makes a new snapshot on the cluster

func GetIsiSnapshot

func GetIsiSnapshot(
	ctx context.Context,
	client api.Client,
	id int64) (*IsiSnapshot, error)

GetIsiSnapshot queries an individual snapshot on the cluster

func GetIsiSnapshotByIdentity

func GetIsiSnapshotByIdentity(
	ctx context.Context,
	client api.Client,
	identity string) (*IsiSnapshot, error)

GetIsiSnapshotByIdentity queries an individual snapshot on the cluster parm identity string: snapshot id or name

type IsiUpdateQuotaReq

type IsiUpdateQuotaReq struct {
	Enforced                  bool             `json:"enforced"`
	Thresholds                isiThresholdsReq `json:"thresholds"`
	ThresholdsIncludeOverhead bool             `json:"thresholds_include_overhead"`
}

type IsiVolume

type IsiVolume struct {
	Name         string `json:"name"`
	AttributeMap []struct {
		Name  string      `json:"name"`
		Value interface{} `json:"value"`
	} `json:"attrs"`
}

func CopyIsiSnapshot

func CopyIsiSnapshot(
	ctx context.Context,
	client api.Client,
	sourceSnapshotName, sourceVolume, destinationName string) (resp *IsiVolume, err error)

CopyIsiSnapshot copies all files/directories in a snapshot to a new directory

func CopyIsiSnapshotWithIsiPath

func CopyIsiSnapshotWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, snapshotSourceVolumeIsiPath, sourceSnapshotName, sourceVolume, destinationName string) (resp *IsiVolume, err error)

CopyIsiSnapshotWithIsiPath copies all files/directories in a snapshot in under the defined isiPath to a new directory

type IsiZone

type IsiZone struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Path string `json:"path"`
}

IsiZone contains information of an access zone

func GetZoneByName

func GetZoneByName(ctx context.Context,
	client api.Client,
	name string) (*IsiZone, error)

GetZoneByName returns a specific access zone which matches the name parsed in

type Ownership

type Ownership struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

Isi PAPI Volume ACL JSON structs

type SnapshotPath

type SnapshotPath struct {
	Path string `json:"path"`
	Name string `json:"name,omitempty"`
}

Isi PAPI snapshot path JSON struct

type VolumeName

type VolumeName struct {
	Name string `json:"name"`
}

Isi PAPI volume JSON structs

Jump to

Keyboard shortcuts

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