• No results found

5.2.1 Basic Command Synta

5.2.1.3 Command Line Terms

5.2.1.3.7 Target Properties

This clause specifies constraints for target properties. 1257

5.2.1.3.7.5 General 1258

Many CLP verbs accept target property terms as input to the command. Target property terms always 1259

contain a target property name and optionally contain the assignment or equivalence operator followed by 1260

a property value. Implementations shall interpret terms appearing in the Command Line after the 1261

command target term as target property terms. Implementations shall interpret target property names in a 1262

case-insensitive manner. 1263

When the command target term is omitted, implementations shall interpret any non-option name terms as 1264

target property terms. 1265

When a structured output is specified, the implementation shall return string values for each property 1266

name and property value such that the implementation will accept the property name and property value 1267

as input when they are specified according to the rules in "Rules for Specifying Target Property Values" 1268

(190H5.2.1.3.7.1). There are three types of target property terms: terms that include the assignment operator, 1269

terms that include the equivalence operator, and terms that do not include either. Terms that include the 1270

assignment operator are used to indicate a desired value to assign to a property and are interpreted 1271

according to "Using the Assignment Operator" (191H5.2.1.3.7.3). Terms that include an equivalence operator 1272

are used to indicate a property name and desired value for the property when filtering for an instance with 1273

that property and are interpreted according to the rules in "Using the Equivalence Operator" (192H5.2.1.3.7.4). 1274

5.2.1.3.7.1 Rules for Specifying Target Property Values 1275

A CLP implementation will accept target property values as part of a target property term. They can be 1276

used with some CLP verbs (create and set) to specify a value to assign to a property or with some 1277

CLP verbs and options (show and display) to filter results based on a property/value match. When a 1278

user specifies a target property value on the Command Line, the implementation shall enforce the 1279

following syntax: 1280

If the property value contains a CLP reserved character, the value is enclosed in quotes. If the 1281

property value includes a " (double quote) character, the " (double quote) is escaped using the CLP 1282

escape character. 1283

The specific format of the value for a property is defined in 193H32HDSP0216. Note that in the case of a property 1284

that is a Value/ValueMap, the string supplied as a value to the property for assignment could be the string 1285

representation of the numeric value or the actual value mapped string constant. 1286

5.2.1.3.7.2 Rules for Specifying Array Properties 1287

Some properties on Managed Elements are arrays. The CLP provides two methods for dealing with array 1288

properties. Implementations shall support both methods. The first method allows individual positions 1289

within an array property to be addressed by index using bracket notation. Bracket notation consists of a 1290

property name followed by an opening bracket (' [ ' ), followed by one or more characters specifying the 1291

desired index, followed by a closing bracket (' ] ' ). Note that no white space occurs anywhere between the 1292

property name and the closing bracket. When a property target term includes a ' [ ' character, followed by 1293

a ' ] ' character, the implementation shall interpret the characters that occur between the two brackets as 1294

specifying the index of the position within the array property that is being addressed. For each array 1295

property, legal values for the index are defined by the MOF (194H4HCommon Information Model (CIM) 1296

Schema, version 2.12) that defines the class to which the property belongs. The syntax for addressing a 1297

position within an array property is as follows: 1298

<property name>"["<index>"]"

1299

This syntax is supported wherever a property name/value is accepted by the CLP. 1300

The alternate approach is supported only for the assignment of values to an array property. It is 1301

documented in the following clause. If a client uses array notation with a property that is not an array 1302

property, the implementation will return an error. 1303

5.2.1.3.7.3 Using the Assignment Operator 1304

The assignment operator is used to indicate a desired value to be assigned to a property. The syntax for 1305

using the assignment operator in a target property term is as follows: 1306

<property name>=<property value>

1307

When the property name contains the bracket notation defined in "Rules for Specifying Array Properties" 1308

(195H5.2.1.3.7.2), the implementation shall assign the property value to the array position identified by the 1309

index delimited by the brackets. 1310

If the property is multi-valued (an array), multiple array positions can be assigned using a comma- 1311

delimited list of values. When the target property value of a target property term is a comma-delimited list, 1312

the implementations shall interpret each comma-delimited token in the target property value as the value 1313

to be assigned to the corresponding array position of the property. When the comma-delimited token is a 1314

zero-length string, the implementation shall not assign a value to the corresponding array position. When 1315

<property name> identifies an array property, and neither of the two methods for managing array 1316

properties is used, the implementation shall attempt to assign <property value> to the first position in 1317

the array. 1318

5.2.1.3.7.4 Using the Equivalence Operator 1319

The equivalence operator is used to indicate that an implementation filters results for instances that have 1320

a property with the specified name and value. The syntax for using the equivalence operator is as follows: 1321

<property name>==<property value>

When the property name contains the bracket notation defined in "Rules for Specifying Array Properties" 1323

(196H5.2.1.3.7.2), the implementation shall compare the property value to the value of the array position 1324

identified by the index delimited by the brackets. When <property name> identifies an array property, 1325

and the bracket notation defined in "Rules for Specifying Array Properties" is not used, the 1326

implementation shall compare <property value> to all array positions in the property. 1327