Documentation
¶
Overview ¶
Package iquota provides a Go client for the Isilon OneFS API and command line tools for reporting SmartQuotas
Index ¶
- Constants
- type Client
- func (c *Client) FetchAllOverQuota(path string) (*QuotaResponse, error)
- func (c *Client) FetchGroupQuota(path, group string) (*QuotaResponse, error)
- func (c *Client) FetchQuota(path, qtype, persona string, resolveNames, exceededOnly bool) (*QuotaResponse, error)
- func (c *Client) FetchQuotaResume(resume string) (*QuotaResponse, error)
- func (c *Client) FetchUserQuota(path, user string) (*QuotaResponse, error)
- func (c *Client) NewSession() (string, error)
- func (c *Client) Url(resource string) string
- type IsiError
- type Persona
- type Quota
- type QuotaParams
- type QuotaResponse
- type QuotaRestResponse
- type Threshold
- type Usage
Constants ¶
View Source
const ( SERVICE_PLATFORM = "platform" SERVICE_NAMESPACE = "namespace" RESOURCE_SESSION = "/session/1/session" )
View Source
const ( RESOURCE_QUOTAS = "/platform/1/quota/quotas" QUOTA_TYPE_DIRECTORY = "directory" QUOTA_TYPE_USER = "user" QUOTA_TYPE_GROUP = "group" QUOTA_TYPE_DEFAULT_USER = "default-user" QUOTA_TYPE_DEFAULT_GROUP = "default-group" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
OneFS Client
func (*Client) FetchAllOverQuota ¶ added in v0.0.3
func (c *Client) FetchAllOverQuota(path string) (*QuotaResponse, error)
Fetch all quotas that have exceeded one or more of their thresholds
func (*Client) FetchGroupQuota ¶
func (c *Client) FetchGroupQuota(path, group string) (*QuotaResponse, error)
Fetch Group Quota
func (*Client) FetchQuota ¶
func (c *Client) FetchQuota(path, qtype, persona string, resolveNames, exceededOnly bool) (*QuotaResponse, error)
Fetch Quota
func (*Client) FetchQuotaResume ¶ added in v0.0.3
func (c *Client) FetchQuotaResume(resume string) (*QuotaResponse, error)
Continue fetching quotas from the previous request (
func (*Client) FetchUserQuota ¶
func (c *Client) FetchUserQuota(path, user string) (*QuotaResponse, error)
Fetch User Quota
func (*Client) NewSession ¶
Authenticate to OneFS API and create a session for multiple requests over a period of time.
type Persona ¶
type Persona struct { // "Serialized form (e.g. 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', 'SID:S-1-1'). Id string `json:"id"` // Persona name, must be combined with type Name string `json:"name"` // Type of persona when using name "user", "group", "wellknown" Type string `json:"type"` }
A persona consists of either a 'type' and 'name' or a 'ID'.
type Quota ¶
type Quota struct { // If true, SMB shares using the quota directory see the quota thresholds // as share size Container bool `json:"container"` // True if the quota provides enforcement, otherwise a accounting quota Enforced bool `json:"enforced"` // The system ID given to the quota Id string `json:"id"` // If true, quota governs snapshot data as well as head data IncludeSnapshots bool `json:"include_snapshots"` // Summary of notifications: 'custom' indicates one or more notification // rules available from the notifications sub-resource; 'default' indicates // system default rules are used; 'disabled' indicates that no // notifications will be used for this quota. Notifications string `json:"notifications"` // For user and group quotas, true if the quota is linked and controlled by // a parent default-* quota. Linked quotas cannot be modified until they // are unlinked Linked bool `json:"linked"` // The /ifs path governed Path string `json:"path"` // True if the accounting is accurate on the quota. If false, this quota // is waiting on completion of a QuotaScan job Ready bool `json:"ready"` // If true, thresholds apply to data plus filesystem overhead required to // store the data (i.e. 'physical' usage) ThresholdsIncludeOverhead bool `json:"thresholds_include_overhead"` // The type of quota "directory", "user", "group", "default-user", // "default-group" Type string `json:"type"` // Nested types Persona *Persona `json:"persona"` Threshold *Threshold `json:"thresholds"` Usage *Usage `json:"usage"` }
Isilon SmartQuota
type QuotaParams ¶
type QuotaResponse ¶
type QuotaResponse struct { // List of errors Errors []*IsiError `json:"errors"` // List of Quotas Quotas []*Quota `json:"quotas"` // Continue returning results from previous call using this token (token // should come from the previous call, resume cannot be used with other // options). Resume string `json:"resume"` }
Response returned from Quota endpoint
type QuotaRestResponse ¶
type Threshold ¶
type Threshold struct { // Usage bytes at which notifications will be sent but writes will not be denied Advisory int `json:"advisory"` // True if the advisory threshold has been hit AdvisoryExceeded bool `json:"advisory_exceeded"` // Time at which advisory threshold was hit AdvisoryLast_exceeded int `json:"advisory_last_exceeded"` // Usage bytes at which further writes will be denied Hard int `json:"hard"` // True if the hard threshold has been hit HardExceeded bool `json:"hard_exceeded"` // Time at which hard threshold was hit HardLastExceeded int `json:"hard_last_exceeded"` // Usage bytes at which notifications will be sent and soft grace time will be started Soft int `json:"soft"` // True if the soft threshold has been hit SoftExceeded bool `json:"soft_exceeded"` // Time in seconds after which the soft threshold has been hit before writes will be denied SoftGrace int `json:"soft_grace"` // Time at which soft threshold was hit SoftLastExceeded int `json:"soft_last_exceeded"` }
Quota thresholds
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
ipanfs
cache panfs user and group quotas
|
cache panfs user and group quotas |
iquota
display quota usage and limits
|
display quota usage and limits |
iquota-server
Proxy server to handle requests to Isilon OneFS API for smart quota reporting
|
Proxy server to handle requests to Isilon OneFS API for smart quota reporting |
Click to show internal directories.
Click to hide internal directories.