APIs in Category: quota
Cluster-Mode API version 1.15

 
quota-list-entries-iter
quota-report-iter
quota-status-iter
The quota APIs are divided into two groups: management and editing. The management functions are: report, status, turning on, and turning off, while the editing functions are: list, add, delete, modify, and set.

For unclustered volumes, the file /etc/quotas is manipulated by the editing functions; therefore changes to /etc/quotas will affect the results of the APIs. For more information on quotas, please see na_quota(1) and na_quotas(5).

For clustered volumes, the quota rules configured in the quota policies are manipulated by the editing functions; changes to these quota rules in the quota policies will affect the results of the APIs. Multiple quota policies can be defined for each vserver through the CLI. Each vserver can then be assigned a quota policy; the quota rules defined in that quota policy is used for quota on/resize operations for volumes in that vserver.

A quota is uniquely identifed by the type, target, volume, and qtree. There are three types: user, group, and tree. For example: a user quota is specified by type = user, target = zapi, volume = vol0, and qtree = /vol/vol0/lab. A group quota is specified by type = group, target = eng, volume = engvol, and qtree = "". Finally, a qtree quota is specifed by type = tree, target = /vol/engvol/bio, volume = engvol, and qtree = "". Default quotas are specified as an asterisk, "*", for the target. For example, a default user quota is specified by type = user, target = *, volume = vol1, and qtree = /vol/vol1/elvis.

Because of possible large amount of information returned by quota reports and quota lists, it is highly recommended to use the quota report and quota list iterator APIs. For unclustered volumes, there are three iterator APIs for both quota report and quota list: -start, -next, and -end. For clustered volumes only iterator APIs are available for quota report and quota lists.

NetApp Manage ONTAP
 
quota-list-entries-iter [top]

Iterate over the list of quota rules in the cluster.
Input Name Range Type Description
desired-attributes quota-entry
optional
Specify the attributes that should be returned in the quota-entry object. If not present, all attributes for which information is available will be returned. If present, only the desired attributes for which information is available will be returned.
max-records [1..100] integer
optional
The maximum number of records to return in this response. Default: 100
query quota-entry
optional
A query that specifies which quota rules need to be returned. A query could be specified on any number of attributes in the quota-entry object. All quota entry objects matching this query up to 'max-records' will be returned.
tag string
optional
Specify the tag from the previous iteration. It is usually not specified for the first iteration. For subsequent iterations, copy the value from the 'next-tag' obtained from the previous iteration.
 
Output Name Range Type Description
attributes-list quota-entry[]
optional
The list of attributes of quota entry objects.
next-tag string
optional
Tag for the next iteration. Not present when there are no more quota entry objects to return.
num-records [0..100] integer
The number of records returned in this response.
 Errno  Description
 EINTERNALERROR

 
quota-report-iter [top]
Iterate over the quota report in the cluster.
Input Name Range Type Description
desired-attributes quota
optional
Specify the attributes that should be returned in the quota report object. If not present, all attributes for which information is available will be returned. If present, only the desired attributes for which information is available will be returned.
max-records [1..100] integer
optional
The maximum number of records to return in this response. Default: 100
path string
optional
A path (including a /vol/ prefix). If specified, the report will contain only quotas that apply to the specified path name.
query quota
optional
A query that specifies which quota report needs to be returned. A query could be specified on any number of attributes in the quota report object. All quota report objects matching this query up to 'max-records' will be returned.
tag string
optional
Specify the tag from the previous iteration. It is usually not specified for the first iteration. For subsequent iterations, copy the value from the 'next-tag' obtained from the previous iteration.
 
Output Name Range Type Description
attributes-list quota[]
optional
The list of attributes of quota report objects.
next-tag string
optional
Tag for the next iteration. Not present when there are no more quota report objects to return.
num-records [0..100] integer
The number of records returned in this response.
 Errno  Description
 EINTERNALERROR

 
quota-status-iter [top]
Iterate over quota status for all volumes in the cluster
Input Name Range Type Description
desired-attributes quota-status-attributes
optional
Specify the attributes that should be returned in the quota status object. If not present, all attributes for which information is available will be returned. If present, only the desired attributes for which information is available will be returned.
max-records [1..100] integer
optional
The maximum number of records to return in this response. Default: 100
query quota-status-attributes
optional
A query that specifies which quota status attributes need to be returned. A query could be specified on any number of attributes in the quota status object. All quota status objects matching this query up to 'max-records' will be returned.
tag string
optional
Specify the tag from the previous iteration. It is usually not specified for the first iteration. For subsequent iterations, copy the value from the 'next-tag' obtained from the previous iteration.
 
Output Name Range Type Description
attributes-list quota-status-attributes[]
optional
The list of attributes of quota status objects.
next-tag string
optional
Tag for the next iteration. Not present when there are no more quota status objects to return.
num-records [0..100] integer
The number of records returned in this response.
 Errno  Description
 EINTERNALERROR

 
Element definition: quota [top]
Information about a single quota.
Name Range Type Description
disk-limit string
Maximum amount of disk space, in kilobytes, allowed for the quota target (hard disk space limit). The value is "-" if the limit is unlimited.
disk-used string
Current amount of disk space, in kilobytes, used by the quota target. The value is "-" if the limit is unlimited.
file-limit string
Maximum number of files allowed for the quota target (hard files limit). The value is "-" if the limit is unlimited.
files-used string
Current number of files used by the quota target. The value is "-" if the limit is unlimited.
quota-target string
For an explicit quota, this value is a fully qualified quota target which is the quota target specified in the /etc/quotas file and the domain in the QUOTA_TARGET_DOMAIN directive is in effect. See na_quotas(5) for more information. Mulitple targets are comma separated. For a derived quota, the field is blank.
quota-type string
The type of quota: user, group, or tree.
quota-users quota-user[]
A list of quota users and group.
soft-disk-limit string
Soft disk space limit, in kilobytes, for the quota target. The value is "-" if the limit is unlimited.
soft-file-limit string
Soft file limit, in number of files, for the quota target. The value is "-" if the limit is unlimited.
threshold string
Disk space threshold, in kilobytes, for the quota target. The value is "-" if the limit is unlimited.
tree string
Name of the qtree to which the quota is applied.
volume string
Name of the volume to which the quota is applied.
vserver string
optional
The vserver name in which the volume belongs, for which the quota is applicable

 
Element definition: quota-entry [top]
Information about a single quota rule.
Name Range Type Description
disk-limit string
optional
Maximum amount of disk space, in kilobytes, allowed for the quota target (hard disk space limit). The value is "-" if the limit is unlimited.
file-limit string
optional
Maximum number of files allowed for the quota target (hard files limit). The value is "-" if the limit is unlimited.
perform-user-mapping boolean
optional
If the value is true, user mapping will be performed for this rule.
policy string
optional
The quota policy to which the rule belongs.
qtree string
optional
Name of the qtree for the quota. It can be the qtree name or "" if no qtree. If there is an error in the quota entry, this value might not present. For tree rules, this field will be "".
quota-error quota-error
optional
This value is only present if there is an error, and gives complete details for an error for a specific quota entry.
quota-target string
optional
The quota target of the type specified. The value will be one of: <name>, <number>, or <path name>. Mulitple targets can be specified by a comma-separated list. Quota directives in /etc/quotas are used to form the quota target. If there is an error in the quota entry, this value might not present. For explicit tree rules, this field will indicate the qtree name in the format "/vol/< volume name >/ < qtree name >".
quota-type string
optional
The type of quota rule. Possible values are "user", "group", or "tree". If there is an error in the quota entry, this value might not present.
soft-disk-limit string
optional
Soft disk space limit, in kilobytes, for the quota target. The value is "-" if the limit is unlimited.
soft-file-limit string
optional
Soft file limit, in number of files, for the quota target. The value is "-" if the limit is unlimited.
threshold string
optional
Disk space threshold, in kilobytes, for the quota target. The value is "-" if the limit is unlimited.
volume string
optional
Name of the volume for the quota. If there is an error in the quota entry, this value might not present.
vserver string
optional
The vserver name.

 
Element definition: quota-status-attributes [top]
Attributes of quota status
Name Range Type Description
percent-complete integer
optional
The percentage complete for an "on" or "resize" operation. This is present when the status is "resizing" or "initializing".
quota-error-msgs quota-error-msg[]
optional
Collection of quota errors including the value of the reason tag above. Since the quota parser does not stop when a parsing error occurs, this tag returns all the errors from the quota parser. If not present, there are no errors.
reason quota-error-msg
optional
The last quota error message. If not present, there are no errors.
status string
Primary status of quotas on the indicated volume; Possible values: "on", "off", "resizing" and "initializing".
substatus string
Minor quota status on the indicated volume. This status is only valid when primary status is "resizing" or "initializing". Possible values are: "scanning", "etc_scanning", "setup", "queue_scan", "done", "transferring_rules", "finishing", "corrupt", and "none".
volume string
Name of the volume to which the quota is applied.
vserver string
The vserver name in which the volume belongs, for which the quota is applicable

 
Element definition: quota-error [top]
Information about a single quota error.
Name Range Type Description
detail string
More details about the error.
errno integer
The error number.
reason string
A human-readable concise reason for the error.

 
Element definition: quota-error-msg [top]
Information about the single quota error.
[none]

 
Element definition: quota-user [top]
Information about a quota user or group.
Name Range Type Description
quota-user-id string
The id of the user. The quota-user-type determines the format. For uid and gid, the format is an integer. For sid, the format is the usual "S-*" style.
quota-user-name string
Name of the user, group, or sid.
quota-user-type string
The type of quota user. There are two possible values: sid (for Windows users), uid (for UNIX users), and gid (for UNIX groups).