Documentation
¶
Overview ¶
Note: The bulk of this was taken from the goextremio package.
Index ¶
- Variables
- type AclRequest
- type Error
- type ExportClientList
- type ExportPathList
- type IsiExport
- type IsiQuota
- type IsiQuotaReq
- type IsiSnapshot
- type IsiUpdateQuotaReq
- type IsiVolume
- type Ownership
- type PapiConnection
- func (papi *PapiConnection) CopyIsiSnapshot(sourceSnapshotName, sourceVolume, destinationName string) (resp *IsiVolume, err error)
- func (papi *PapiConnection) CopyIsiVolume(sourceName, destinationName string) (resp *getIsiVolumesResp, err error)
- func (papi *PapiConnection) CreateIsiSnapshot(path, name string) (resp *IsiSnapshot, err error)
- func (papi *PapiConnection) CreateIsiVolume(name string) (resp *getIsiVolumesResp, err error)
- func (papi *PapiConnection) DeleteIsiQuota(path string) (err error)
- func (papi *PapiConnection) DeleteIsiVolume(name string) (resp *getIsiVolumesResp, err error)
- func (papi *PapiConnection) Export(path string) (err error)
- func (papi *PapiConnection) GetIsiExports() (resp *getIsiExportsResp, err error)
- func (papi *PapiConnection) GetIsiQuota(path string) (quota *IsiQuota, err error)
- func (papi *PapiConnection) GetIsiSnapshot(id int64) (*IsiSnapshot, error)
- func (papi *PapiConnection) GetIsiSnapshots() (resp *getIsiSnapshotsResp, err error)
- func (papi *PapiConnection) GetIsiVolume(name string) (resp *getIsiVolumeAttributesResp, err error)
- func (papi *PapiConnection) GetIsiVolumes() (resp *getIsiVolumesResp, err error)
- func (papi *PapiConnection) RemoveIsiSnapshot(id int64) error
- func (papi *PapiConnection) SetExportClients(Id int, clients []string) (err error)
- func (papi *PapiConnection) SetIsiQuotaHardThreshold(path string, size int64) (err error)
- func (papi *PapiConnection) Unexport(Id int) (err error)
- func (papi *PapiConnection) UpdateIsiQuotaHardThreshold(path string, size int64) (err error)
- type PapiError
- type SnapshotPath
- type VolumeName
Constants ¶
This section is empty.
Variables ¶
var ( NamespacePath = "namespace" VolumesPath = "/ifs/volumes" ExportsPath = "platform/1/protocols/nfs/exports" QuotaPath = "platform/1/quota/quotas" SnapshotsPath = "platform/1/snapshot/snapshots" VolumeSnapshotsPath = "/ifs/.snapshot" )
Functions ¶
This section is empty.
Types ¶
type AclRequest ¶
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"`
}
type IsiQuotaReq ¶
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
type IsiUpdateQuotaReq ¶
type PapiConnection ¶
type PapiConnection struct {
VolumePath string
// contains filtered or unexported fields
}
func New ¶
func New(endpoint string, insecure bool, username, group, password, volumePath string) (*PapiConnection, error)
Create a new HTTP connection
func (*PapiConnection) CopyIsiSnapshot ¶
func (papi *PapiConnection) CopyIsiSnapshot(sourceSnapshotName, sourceVolume, destinationName string) (resp *IsiVolume, err error)
CopyIsiSnaphost copies all files/directories in a snapshot to a new directory
func (*PapiConnection) CopyIsiVolume ¶
func (papi *PapiConnection) CopyIsiVolume(sourceName, destinationName string) (resp *getIsiVolumesResp, err error)
CopyIsiVolume creates a new volume on the cluster based on an existing volume
func (*PapiConnection) CreateIsiSnapshot ¶
func (papi *PapiConnection) CreateIsiSnapshot(path, name string) (resp *IsiSnapshot, err error)
CreateIsiSnapshot makes a new snapshot on the cluster
func (*PapiConnection) CreateIsiVolume ¶
func (papi *PapiConnection) CreateIsiVolume(name string) (resp *getIsiVolumesResp, err error)
CreateIsiVolume makes a new volume on the cluster
func (*PapiConnection) DeleteIsiQuota ¶
func (papi *PapiConnection) DeleteIsiQuota(path string) (err error)
DeleteIsiQuota removes the quota for a directory
func (*PapiConnection) DeleteIsiVolume ¶
func (papi *PapiConnection) DeleteIsiVolume(name string) (resp *getIsiVolumesResp, err error)
DeleteIsiVolume removes a volume from the cluster
func (*PapiConnection) Export ¶
func (papi *PapiConnection) Export(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 (*PapiConnection) GetIsiExports ¶
func (papi *PapiConnection) GetIsiExports() (resp *getIsiExportsResp, err error)
GetIsiExports queries a list of all exports on the cluster
func (*PapiConnection) GetIsiQuota ¶
func (papi *PapiConnection) GetIsiQuota(path string) (quota *IsiQuota, err error)
GetIsiQuota queries the quota for a directory
func (*PapiConnection) GetIsiSnapshot ¶
func (papi *PapiConnection) GetIsiSnapshot(id int64) (*IsiSnapshot, error)
GetIsiSnapshot queries an individual snapshot on the cluster
func (*PapiConnection) GetIsiSnapshots ¶
func (papi *PapiConnection) GetIsiSnapshots() (resp *getIsiSnapshotsResp, err error)
GetIsiSnapshots queries a list of all snapshots on the cluster
func (*PapiConnection) GetIsiVolume ¶
func (papi *PapiConnection) GetIsiVolume(name string) (resp *getIsiVolumeAttributesResp, err error)
GetIsiVolume queries the attributes of a volume on the cluster
func (*PapiConnection) GetIsiVolumes ¶
func (papi *PapiConnection) GetIsiVolumes() (resp *getIsiVolumesResp, err error)
GetIsiVolumes queries a list of all volumes on the cluster
func (*PapiConnection) RemoveIsiSnapshot ¶
func (papi *PapiConnection) RemoveIsiSnapshot(id int64) error
RemoveIsiSnapshot deletes a snapshot from the cluster
func (*PapiConnection) SetExportClients ¶
func (papi *PapiConnection) SetExportClients(Id int, clients []string) (err error)
SetExportClients limits access to an NFS export on the cluster to a specific client address.
func (*PapiConnection) SetIsiQuotaHardThreshold ¶
func (papi *PapiConnection) SetIsiQuotaHardThreshold(path string, size int64) (err error)
SetIsiQuotaHardThreshold sets the hard threshold of a quota for a directory
func (*PapiConnection) Unexport ¶
func (papi *PapiConnection) Unexport(Id int) (err error)
Unexport disables the NFS export on the cluster that points to the volumes directory.
func (*PapiConnection) UpdateIsiQuotaHardThreshold ¶
func (papi *PapiConnection) UpdateIsiQuotaHardThreshold(path string, size int64) (err error)
UpdateIsiQuotaHardThreshold modifies the hard threshold of a quota for a directory
type PapiError ¶
type PapiError struct {
Code string `json:"code"`
Field string `json:"field"`
Message string `json:"message"`
}
Isi PAPI error JSON structs
type SnapshotPath ¶
Isi PAPI snapshot path JSON struct