D-Link DSN-540 CLI User's Guide for DSN-1100-10 - Page 16

Members, Enumerators, Special Keywords

Page 16 highlights

1.5 Members Each context has one or more members associated with it. A member can be a value property, context property, context list, or command. Table 1-1 describes these types of members. Table 1-1. Members Member Value properties Context property Context lists Commands Description Value properties can be read-only or read-write: Read-only properties only support Show. Read-write properties support Show and Set. Context properties can be read-only or readwrite. Types of entities that can be displayed or operated upon from the current context. Commands support Do. Examples of Data Types for This Member Number String Enumeration (see section 1.6) Boolean Date/Time DiskList on the root context. LAG on PhysicalPort Controllers on the root context Disks on DiskList CreateVolume on the root context Reconfigure on Volume 1.6 Enumerators Enumerators are a data type, much like Number, String, Boolean, and Date/Time. Enumerators have a discrete list of possible values that can be used in a property or command argument . Examples include: VolumeComposition (for example, JBOD, Stripe, Mirror, Parity, StripeMirror) StripeDepth (for example, 32KB, 64KB, 128KB, 256KB, 512KB, 1024KB, 2048KB) 1.7 Special Keywords When working in a context that can contain one or more members, the special keywords of $first and $last let you reference the first or last entry in the list of members, although the order of entries in the list may be random. This is useful if you use advanced scripts or perform a repetitive operation that should continue until the entire list is empty, without needing to indicate the names or index values for the specific members of the list. For example, you can delete all volumes on an array by specifying the following command repeatedly until an error occurs (when no more volumes exist): do volumelist.volume[$last].delete 6 Chapter 1 Introduction

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97

6
Chapter 1
Introduction
1.5
Members
Each context has one or more members associated with it. A member can be a value
property, context property, context list, or command. Table 1-1 describes these types of
members.
Table 1-1. Members
Member
Description
Examples of Data Types for This Member
Value properties
Value properties can be read-only or read-write:
±
Read-only properties only support
Show
.
±
Read-write properties support
Show
and
Set
.
±
Number
±
String
±
Enumeration (see section 1.6)
±
Boolean
±
Date/Time
Context property
Context properties can be read-only or read-
write.
±
DiskList
on the root context.
±
LAG
on PhysicalPort
Context lists
Types of entities that can be displayed or
operated upon from the current context.
±
Controllers
on the root context
±
Disks
on
DiskList
Commands
Commands support
Do
.
±
CreateVolume
on the root context
±
Reconfigure
on
Volume
1.6
Enumerators
Enumerators are a data type, much like Number, String, Boolean, and Date/Time.
Enumerators have a discrete list of possible values that can be used in a property or
command argument . Examples include:
°
VolumeComposition
(for example, JBOD, Stripe, Mirror, Parity, StripeMirror)
°
StripeDepth
(for example, 32KB, 64KB, 128KB, 256KB, 512KB, 1024KB, 2048KB)
1.7
Special Keywords
When working in a context that can contain one or more members, the special
keywords of
$first
and
$last
let you reference the first or last entry in the list of members, although
the order of entries in the list may be random. This is useful if you use advanced scripts or
perform a repetitive operation that should continue until the entire list is empty, without
needing to indicate the names or index values for the specific members of the list. For
example, you can delete all volumes on an array by specifying the following command
repeatedly until an error occurs (when no more volumes exist):
do volumelist.volume[$last].delete