EasyManua.ls Logo

Oracle ZFS Storage Appliance

Oracle ZFS Storage Appliance
650 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Creating a Worksheet Based on a Specified Drive Type
EXAMPLE 31
Workflow Device Type Selection
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="' +
params.worksheet + '"');
if (params.overwrite) {
run('confirm destroy');
return;
}
throw ('Worksheet called "' + params.worksheet +
'" already exists!');
} 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

Table of Contents

Other manuals for Oracle ZFS Storage Appliance

Related product manuals