Module: ConditionConstants

Constants that are used to describe a condition.

The following statement:

{
  or: [{
    and: [{
      name: 'HostInfo',
      output: 'ip_address',
      op: 'EQUALS',
      value: '192.168.1.1'
    }]
  }]
}

Can be rewritten to use ConditionConstants as follows:

var ipAddressCondition = {}
ipAddressCondition[ConditionConstants.COND_NAME] = 'HostInfo'
ipAddressCondition[ConditionConstants.COND_OUTPUT] = 'ip_address'
ipAddressCondition[ConditionConstants.COND_OP] = 'EQUALS'
ipAddressCondition[ConditionConstants.COND_NAME] = '192.168.1.1'

var firstOrCondition = {}
firstOrCondition[ConditionConstants.AND] = [ipAddressCondition]

var orConditions = [firstOrCondition]

var conditions = {}
conditions[ConditionConstants.OR] = orConditions
Source:

Members

(static) AND

'And' condition

Source:

(static) COND_NAME

Condition name

Source:

(static) COND_OP

Condition operation

Source:

(static) COND_OUTPUT

Condition output

Source:

(static) COND_VALUE

Condition value

Source:

(static) OR

'Or' condition

Source: