APIs in Category: lun
API version 6.1

 
lun-iter

NetApp Manage ONTAP
 
lun-iter [top]

Iterate over a list of lun objects.
Input Name Range Type Description
max-records integer
optional
The maximum number of records per return batch the caller wants to receive. The server may return smaller batch sizes based on performance constraints. If this field is not provided, then the server will return default number of records based on server performance.
resource-filter resource-key
optional
Resource by which to filter the result set. Any resource-filters specified in the first call must be included in subsequent calls. The allowed object types for this argument are:
  • resource-group
  • cluster
  • vserver
  • aggregate
  • volume
  • qtree
  • lun
If resource-filter identifies a lun, that single lun will be returned. If resource-filter resolves to more than one lun, all of them will be returned. If no resource-filter is provided, all luns will be listed.
tag string
optional
Specify the tag from the last call. It is not specified for the first call. For subsequent calls, copy values from the 'next-tag' obtained from the previous call. Any resource-filters specified in the first call must be included in subsequent calls.
 
Output Name Range Type Description
next-tag string
optional
Tag for the next call. Not present when there are no more objects to return.
num-records integer
The number of records returned in this call.
records lun-info[]
optional
The list of records.
 Errno  Description
 EOBJECTNOTFOUND
 EOBJECTAMBIGUOUS
 EINVALIDINPUTERROR

 
Element definition: lun-info [top]
Information about a lun.
Name Range Type Description
alignment string
Alignment of the LUN. Possible values:
  • aligned
  • misaligned
  • partial_writes
  • indeterminite
comment string
User-specified comment for the LUN. This field is unavailable when the LUN is in a snapshot or while the LUN fenced for a restore operation.
igroups igroup-reference[]
optional
list of igroups to which the LUN is mapped to. Returns emtpy array incase the LUN is not mapped to any igroup.
is-lun-space-reserved boolean
Indicates if the space for LUN is reserved the containing volume.
is-space-alloc-enabled boolean
Whether or not the LUN has space allocation enabled. This field is unavailable when the LUN is in a snapshot or while fenced for a restore operation.
lun-class string
The class of the LUN. Possible values:
  • regular - The LUN is intended for normal blocks access
  • protocol_endpoint - The LUN is a VMware vvol protocol endpoint
  • vvol - The LUN is a VMware vvol data LUN
lun-path obj-name
Path name of the lun including the volume or qtree where the lun exists. The name will be similar to myvol/mylun or myvol/myqtree/mylun.
lun-size [0..2^63-1] integer
Lun size in bytes.
lun-status obj-status
Current status of the lun based on all events
lun-used-space [0..2^63-1] integer
Number of bytes used by the LUN.
mapped boolean
Whether or not the LUN is mapped to any initiators. "true" if mapped, "false" otherwise. This field is not applicable to LUNs where the lun-class attribute is set to 'vvol'.
multiprotocol-type string
The image type of the lun. This value determines the proper alignment settings for the desired host filesystem layout. Possible values:
  • aix - The LUN will be used to store an AIX filesystem.
  • hpux - The LUN will be used to store an HP-UX filesystem.
  • hyper_v - The LUN will be used to store Hyper-V VHDs (Virtual Hard Disks).
  • image - The default type indicating no assumptions will be made about the data stored in the LUN.
  • linux - The LUN will be used to store a Linux filesystem with no partition table.
  • netware - The LUN will be used to store a Netware filesystem.
  • openvms - The LUN will be used to store an OpenVMS filesystem.
  • solaris - The LUN will be used to store a Solaris filesystem, in a single slice partition.
  • solaris_efi - The LUN will be used to store a Solaris filesystem with an EFI partition table.
  • vmware - The LUN will be used to store a VMware Virtual Machine File System (VMFS) containing Virtual Machine Disk Files (VMDKs).
  • windows - The LUN will be used to store a Windows filesystem with a Master Boot Record (MBR) partition table.
  • windows_2008 - The LUN will be used to store a Windows filesystem with a Master Boot Record(MBR) partition table on Windows 2008 or later.
  • windows_gpt - The LUN will be used to store a Windows filesystem with a GUID Partition Table (GPT).
qtree-name obj-name
optional
Name of qtree on which the lun resides. Present in the output only if the lun resides on a qtree. The name is any simple name such as myqtree.
qtree-resource-key resource-key
Resource key of the Qtree to which the lun belongs.
resource-key resource-key
Resource key of this lun.
serial-number string
Serial number of the LUN. The serial number is a 12-character string formed of upper and lower-case letters, numbers, slashes (/), and hyphen (-) characters.
volume-name obj-name
optional
Name of volume on which the lun resides. The name is any simple name such as myvol. volume-name is not returned if the lun belongs to a qtree and the authenticated admin does not have the required capability.
volume-resource-key resource-key
Resource key of the Volume to which the lun belongs.
vserver-name obj-name
Name of the vserver on which the lun resides. Always present in the output. The name is any simple name such as myvserver.
vserver-resource-key resource-key
Resource key of the Vserver to which the lun belongs.

 
Element definition: resource-key [top]
A self-describing string identifier for a managed resource.
[none]

 
Element definition: igroup-reference [top]
Name and Id of an igroup.
Name Range Type Description
igroup-mapping-id obj-id
ID of the mapping of this igroup to the corresponding LUN.
igroup-name obj-name
Name of the igroup.
igroup-resource-key resource-key
Resource key of the igroup.

 
Element definition: obj-name [top]
Name of an object. This typedef is an alias for the built in ZAPI type string. An object name must conform to the following format:
  • It must contain between 1 and 64 characters.
  • It may start with any character and may contain any combination of characters, except that it may not consist solely of decimal digits ('0' through '9').
  • In some contexts, a name may be the empty string (""), which is interpreted as a null value, e.g., a reference to no object at all.
The behavior of a ZAPI when it encounters an error involving an obj-name input element depends on how the ZAPI uses the input element. Here are the general rules:
  • If the input name element is used to create a new object with the given name, or rename an existing object to that name, and the name does not conform to the above format, then the ZAPI fails with error code EINVALIDINPUT. Note that because EINVALIDINPUT is such a common error code, ZAPI specifications are not required to document cases when they may return it.
  • If the input name element is used to refer to an existing object with that name, and there is no object with that name, then the ZAPI fails with error code EOBJECTNOTFOUND. Generally the ZAPI specification documents cases when it may return this error code.
A ZAPI may deviate from these general rules, for example, it may return more specific error codes. In such cases, the ZAPI specification must document its behavior.

If an input name element is used to refer to an existing object, then the ZAPI specification must specify which object type (e.g. cluster, vserver, volume etc.) is allowed. Some ZAPIs allow the object to be one of several different types. See the description of obj-full-name for examples of valid input formats.

Note that there is no requirement that all object names must be unique. However, the names for some specific types of objects are constrained such that no two objects of that type may have the same name.

[none]

 
Element definition: obj-status [top]
A status value which can be associated with an object. This typedef is an alias for the builtin ZAPI type string. The severity associated with an event has this type.

Possible values are: 'normal', 'warning', 'error', 'critical'.

  • normal: An object has normal status when it is working within the thresholds specified.
  • warning: An object has the warning status when an event related to the object occurred that an administrator should know about. The event will not cause service disruption.
  • error: An object has error status when it does not cause any service disruption, but it may affect performance.
  • critical: An object has critical status when it is still performing, but service disruption may occur if corrective action is not taken immediately.
In some contexts, it is important that severities are ordered (as above). For example, an alert might be triggered if an event with a given severity "or worse" occurs. In this example, worse means "after" in the list above.
[none]

 
Element definition: resource-key [top]
A self-describing string identifier for a managed resource.
[none]

 
Element definition: obj-id [top]
Identification number (ID) for an object. This typedef is an alias for the builtin ZAPI type integer. Object IDs are unsigned integers in the range [1..2^31 - 1]. In some contexts, an object ID is also allowed to be 0, which is interpreted as a null value, e.g., a reference to no object at all.

The ID for an object is always assigned by the system; the user is never allowed to assign an ID to an object. Therefore, an input element of type obj-id is always used to refer to an existing object by its ID. The ZAPI must specify the object's object type (e.g. cluster, volume, aggregate, etc.). Some ZAPIs allow the object to be one of several different types.

If the value of an obj-id input element does not match the ID of any existing object of the specified type or types, then typically the ZAPI fails with error code EOBJECTNOTFOUND. A ZAPI may deviate from this general rule, for example, it may return a more specific error code. In either case, the ZAPI specification must document its behavior.

[none]