Documentation
¶
Index ¶
- Constants
- func DeleteFilesystem(ctx context.Context, token *Token, hRef string) (bool, int, error)
- func DeleteLun(ctx context.Context, token *Token, pool, project, lun string) (bool, int, error)
- func DeleteSnapshot(ctx context.Context, token *Token, href string) (bool, int, error)
- func GetInitiatorGroupList(ctx context.Context, token *Token, pool, project, lun string) ([]string, error)
- func GetPools(ctx context.Context, token *Token) (*[]Pool, error)
- func GetServices(ctx context.Context, token *Token) (*[]Service, error)
- func GetSnapshotDependents(ctx context.Context, token *Token, href string) (*[]Dependent, error)
- func InitREST(name string, certLocation string, secure bool) error
- func MakeRequest(ctx context.Context, token *Token, method, url string, reqbody interface{}, ...) (interface{}, int, error)
- func SetInitiatorGroupList(ctx context.Context, token *Token, pool, project, lun, group string) (int, error)
- type Dependent
- type Filesystem
- func CloneFileSystemSnapshot(ctx context.Context, token *Token, hRef string, ...) (*Filesystem, int, error)
- func CreateFilesystem(ctx context.Context, token *Token, fsname string, volSize int64, ...) (*Filesystem, int, error)
- func GetFilesystem(ctx context.Context, token *Token, pool, project, filesystem string) (*Filesystem, int, error)
- func GetFilesystems(ctx context.Context, token *Token, pool, project string) ([]Filesystem, error)
- func ModifyFilesystem(ctx context.Context, token *Token, href string, ...) (*Filesystem, int, error)
- type Lun
- func CloneLunSnapshot(ctx context.Context, token *Token, hRef string, ...) (*Lun, int, error)
- func CreateLUN(ctx context.Context, token *Token, lunName string, volSize int64, ...) (*utils.VolumeId, *Lun, int, error)
- func GetLun(ctx context.Context, token *Token, pool, project, lun string) (*Lun, int, error)
- func GetLuns(ctx context.Context, token *Token, pool, project string) ([]Lun, error)
- type LunInitiatorGrps
- type LunJson
- type Luns
- type Pool
- type Project
- type ProjectJSON
- type Property
- type Schema
- type SchemaList
- type Service
- type Snapshot
- type Target
- type TargetGroup
- type Token
Constants ¶
View Source
const ( DefaultBlockSize int = 8192 DevicePathKey string = "devicePath" MaskAll string = "com.sun.ms.vss.hg.maskAll" )
Variables ¶
This section is empty.
Functions ¶
func DeleteFilesystem ¶
func DeleteSnapshot ¶
Issues a request to the appliance to delete a snapshot. The source of the snapshot, LUN or filesystem, is determine by the HREF passed in.
func GetInitiatorGroupList ¶
func GetSnapshotDependents ¶
Returns the clones depending on a snapshot.
Types ¶
type Filesystem ¶
type Filesystem struct {
MountPoint string `json:"mountpoint"`
CreationTime string `json:"creation"`
RootUser string `json:"root_user"`
RootGroup string `json:"root_group"`
RootPermissions string `json:"root_permissions"`
RestrictChown bool `json:"rstchown"`
SpaceData int64 `json:"space_data"`
CanonicalName string `json:"canonical_name"`
RecordSize int64 `json:"recordsize"`
SpaceAvailable int64 `json:"space_available"`
Quota int64 `json:"quota"`
UTF8Only bool `json:"utf8only"`
MaxBlockSize int64 `json:"maxblocksize"`
Atime bool `json:"atime"`
ReadOnly bool `json:"readonly"`
Pool string `json:"pool"`
Name string `json:"name"`
SpaceTotal int64 `json:"space_total"`
SpaceUnused int64 `json:"space_unused_res"`
Project string `json:"project"`
Href string `json:"href"`
}
func CloneFileSystemSnapshot ¶
func CreateFilesystem ¶
func GetFilesystem ¶
func GetFilesystems ¶
Returns the List of filesystems associated with the pool and project passed in. To get a system wide List of file systems, the pool AND the project must be 'nil'
func ModifyFilesystem ¶
type Lun ¶
type Lun struct {
SpaceData float64 `json:"space_data"`
CanonicalName string `json:"canonical_name"`
VolumeSize float64 `json:"volsize"`
VolumeBlockSize int64 `json:"volblocksize"`
Pool string `json:"pool"`
Project string `json:"project"`
Name string `json:"name"`
Href string `json:"href"`
AssignedNumber []int32 `json:"assignednumber"`
InitiatorGroup []string `json:"initiatorgroup"`
TargetGroup string `json:"targetgroup"`
}
func CloneLunSnapshot ¶
type LunInitiatorGrps ¶
type LunInitiatorGrps struct {
InitiatorGroup []string `json:"initiatorgroup"`
}
type Pool ¶
type Pool struct {
Status string `json:"status"`
Name string `json:"name"`
Usage struct {
Available int64 `json:"available"`
UsageSnapshots int64 `json:"usage_snapshots"`
UsageMetasize int64 `json:"usage_metasize"`
Used int64 `json:"used"`
UsageChildReservation int64 `json:"usage_child_reservation"`
UsageReplication int64 `json:"usage_replication"`
UsageReservation int64 `json:"usage_reservation"`
Free int64 `json:"free"`
UsageTotal int64 `json:"usage_total"`
UsageMetaused int64 `json:"usage_metaused"`
Total int64 `json:"total"`
UsageData int64 `json:"usage_data"`
} `json:"usage"`
HRef string `json:"href"`
ASN string `json:"asn"`
}
type Project ¶
type Project struct {
Name string `json:"name"`
Pool string `json:"pool"`
SpaceAvailable int64 `json:"space_available"`
}
func GetProject ¶
type ProjectJSON ¶
type ProjectJSON struct {
Project Project `json:"project"`
}
type Schema ¶
type Schema struct {
Type string `json:"type"`
Description string `json:"description"`
Property string `json:"property"`
Href string `json:"href,omitempty"`
}
func CreateProperty ¶
type SchemaList ¶
type SchemaList struct {
Schema []Schema `json:"schema"`
}
This type is to help deserialize from a ZFSSA response, not used internally
type Snapshot ¶
type Snapshot struct {
Name string `json:"name"`
NumClones int `json:"numclones"`
Creation string `json:"creation"`
Collection string `json:"collection"`
Project string `json:"project"`
CanonicalName string `json:"canonical_name"`
SpaceUnique int64 `json:"space_unique"`
SpaceData int64 `json:"space_data"`
Type string `json:"type"`
ID string `json:"id"`
Pool string `json:"pool"`
Href string `json:"href"`
}
func CreateSnapshot ¶
Issues a request to the appliance to create a snapshot. The source of the snapshot, LUN or filesystem, is determine by the HREF passed in.
func GetSnapshot ¶
Issues a request to the appliance asking for the detailed information of a snapshot.
type TargetGroup ¶
func GetTargetGroup ¶
Click to show internal directories.
Click to hide internal directories.