v1

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

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 CreateIsiVolume

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

CreateIsiVolume makes a new volume 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 DeleteIsiVolume

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

DeleteIsiVolume removes a volume from the cluster

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 GetIsiExports

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

GetIsiExports queries a list of all exports on the cluster

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 GetIsiVolumes

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

GetIsiVolumes queries a list of all volumes on the cluster

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) (err error)

SetIsiQuotaHardThreshold sets the hard threshold of a quota for a directory

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

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"`
	Enforced                  bool          `json:"enforced"`
	Id                        string        `json:"id"`
	IncludeSnapshots          bool          `json:"include_snapshots"`
	Linked                    interface{}   `json:"linked"`
	Notifications             string        `json:"notifications"`
	Path                      string        `json:"path"`
	Persona                   interface{}   `json:"persona"`
	Ready                     bool          `json:"ready"`
	Thresholds                isiThresholds `json:"thresholds"`
	ThresholdsIncludeOverhead bool          `json:"thresholds_include_overhead"`
	Type                      string        `json:"type"`
	Usage                     struct {
		Inodes   int64 `json:"inodes"`
		Logical  int64 `json:"logical"`
		Physical int64 `json:"physical"`
	} `json:"usage"`
}

func GetIsiQuota

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

GetIsiQuota queries the quota for a directory

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"`
}

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

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)

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

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