Data Schema

The following validation keywords in a schema impose requirements for successful validation of an instance. The following are the Validation Keywords used in Action Orchestrator:

enum

Type - The value of this keyword is an array.

Description - The enum keyword is used to restrict a value to a fixed set of values. It must be an array with at least one element, where each element is unique.

Possible Values null, string, number, Boolean

Schema Example:

{ 1 item
   "category" : { 2 items
    "type" : string "string"
      "enum" : [ 2 items
       0 : string "cisco"
       1 : string "amazon"
     ]
   }
}

The schema state that category field value can be either Cisco or Amazon.

format

Type - The value of this keyword string.

Description It is used to parsed the field value based on specified format such as date, time, date-time, etc.

Possible Values date, date-time, ipv4, ksuid, lgh-time, time, email, lgh-hostname

lhd_reference

Type - The value of this keyword boolean.

Description The lhd_reference keyword specifies that a field value can be either number, integer, boolean or variable reference.

Possible Values - TRUE, FALSE

Schema Example:

{ 1 item
   "timeout" : { 2 items
    "type" : string "integer"
    "lhd_reference" : bool true
  }
}

Applicable only for number, integer, and Boolean type fields.

lhd_table

Type - The value of this keyword boolean.

Description - The lhd_table keyword specifies that a field value will be of type table.

Possible Values - TRUE, FALSE

Schema Example:

{ 1 item
   "input table" : { 3 items
    "title" : string "input table"
    "type" : string "string"
    "lhd_table" : bool true
  }
}

The value of input_table field will be of type table. It instructs Longhorn console service to validate the field value against correct data type.

lhd_secret

Type - The value of this keyword boolean.

Description - The lhd_secret keyword specifies that a field value has secret information and instructs Longhorn console service to encrypts the value.

Possible Values - TRUE, FALSE

Schema Example:

{ 1 item
   "password" : { 2 items
    "type" : string "string"
    "lhd_secret" : bool true
  }
}

The value of password field will be encrypted.


  • No labels
© 2017-2019 Cisco Systems, Inc. All rights reserved