SmartServerGroup - addCondition

SmartServerGroup - addCondition

Description :

This command adds a new condition to a smart server group.

This command returns a handle to the modified group.

When you add a new condition, you must specify its operator type. All available operator strings are listed below:

  • equals
  • does not equal
  • starts with
  • does not start with
  • ends with
  • does not end with
  • contains
  • is substring of
  • does not contain
  • is not substring of
  • is one of
  • matches
  • equals (case sensitive)
  • does not equal (case sensitive)
  • starts with (case sensitive)
  • does not start with (case sensitive)
  • ends with (case sensitive)
  • does not end with (case sensitive)
  • contains (case sensitive)
  • is substring of (case sensitive)
  • does not contain (case sensitive)
  • is not substring of (case sensitive)
  • less than
  • less than or equal to
  • greater than
  • greater than or equal to
  • before
  • after
  • between
  • has flag
  • does not have flag
  • has any flag
  • does not have any flag
  • has all flags
  • has no flags
  • matches mask
  • does not match mask
  • has ACE matching mask
  • has no ACE matching mask

Note : For operator "is one of" specify the list of values as [value1,value2, . . .,valueN].

For more information about formatting the RHS property value for the various types of LHS properties and operators, see Formats for specifying property values in conditions in the BMC Server Automation online documentation.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

groupName

String

Fully qualified name of the smart group.

propName

String

Property name to be used in the smart group condition.

operator

String

Operator string to be used in the smart group condition.

propValue

String

Property value to be used in the smart group condition.

Example

The following example shows how to add a condition that selects all servers whose descriptions start with "solaris 9" to a smart group called /root/allSolaris.

Script

SmartServerGroup addCondition /root/allSolaris  "Description" "contains" "solaris 9" 

SmartServerGroup addCondition /root/allSolaris  "Description" "is one of" ["solaris 9","solaris 10","solaris 11","solaris 12"] 



Was this page helpful? Yes No Submitting... Thank you

Comments