Oracle ZFS Storage Appliance Administration Manual page 49

Hide thumbs Also See for ZFS Storage Appliance:
Table of Contents

Advertisement

5.
The list function supports optional arguments depth and filter.
The format is: list ([depth, [filter]]). The argument depth can be defined by a number.
The greater number of depth, the more details will be returned. The argument filter is
formatted as {<prop1>:<val1>, <prop2>:<val2> ...}. If filter is specified, depth must
also be specified.
Usage and input behavior:
list() - Returns only node names.
list(0) - Return properties of node and only children names.
list(0, {kiosk_mode: true}) - Return a filtered list for kiosk_mode is true with names
of children.
list(1) - Return properties of node, names and properties of children, only names of
grandchildren.
list(1, {kiosk_mode: true}) - Return a filtered list for kiosk_mode is true with details
up to depth=1.
list(2) - Return properties of node, names and properties of children and list(0) output
of grandchildren.
list(2, {fullname:'Super*', kiosk_mode: true}) - Return a filtered list for fullname
contaning Super and kiosk_mode is true with details up to depth=2.
6.
This is an example output for a list with depth=2:
The label name shows the name of the list item (that is, a node). The label properties shows
the properties of the list item. The label children shows static children of the list item. The
label list shows dynamic children of the list item.
script
("." to run)> dump(list(2));
("." to run)> .
[{
name: 'restuser',
properties: {
kiosk_screen: 'status/dashboard',
kiosk_mode: false,
roles: ['basic'],
require_annotation: false,
initial_password: 'DummyPassword',
fullname: 'REST User',
logname: 'restuser'
},
children: [{
name: 'preferences',
Using the List Function
About the Oracle ZFS Storage Appliance
49

Advertisement

Table of Contents
loading

Table of Contents