Oracle ZFS Storage Appliance Administration Manual page 604

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

Advertisement

Creating a Worksheet Based on a Specified Drive Type
EXAMPLE 31
var steps = [ {
step: 'Checking for existing worksheet',
execute: function (params) {
/*
* In this step, we're going to see if the worksheet that
* we're going to create already exists. If the worksheet
* already exists, we blow it away if the user has indicated
* that they desire this behavior. Note that we store our
* derived worksheet name with the parameters, even though
* it is not a parameter per se; this is explicitly allowed,
* and it allows us to build state in one step that is
* processed in another without requiring additional global
* variables.
*/
params.worksheet = 'Drilling down on ' + params.type + ' disks';
try {
run('analytics worksheets select name="' +
if (params.overwrite) {
run('confirm destroy');
return;
}
throw ('Worksheet called "' + params.worksheet +
} catch (err) {
if (err.code != EAKSH_ENTITY_BADSELECT)
throw (err);
}
}
}, {
step: 'Finding disks of specified type',
execute: function (params) {
/*
* In this step, we will iterate over all chassis, and for
* each chassis iterates over all disks in the chassis,
* looking for disks that match the specified type.
*/
var chassis, name, disks;
var i, j;
run('cd /');
run('maintenance hardware');
604
Oracle ZFS Storage Appliance Administration Guide, Release OS8.6.x • September 2016
Workflow Device Type Selection
params.worksheet + '"');
'" already exists!');

Advertisement

Table of Contents
loading

Table of Contents