Managing multiple formats

You can set the format by configuring the config.yaml file or by adding the parameter in model commands.

Overview

The multiple format options in HCL Universal Orchestrator ensures that you have various data serialization formats to create/modify an item or to display an item. Some systems or services might use a specific serialization format as a standard. In some scenarios, older systems or external services might still rely on older serialization formats. By supporting multiple formats, you can integrate HCL Universal Orchestrator easily with different services and platforms that may have their preferences. When you run a command, the default value specified for format in the config.yaml file or at gateway server is considered. You can change this value either by updating the value in config.yaml file or by providing the format option in Orchestration CLI commands.

Syntax and command line options

You can specify the required format as follows:
ocli model [-format [JSON | YAML | schedlang]] [model command] [filename | scheduling or security items]
format
You can specify any one of the following formats:
  • JSON
  • schedlang
  • YAML
The values are case-insensitive.
Model commands
You can specify the command to create/modify an item or to display results in required format.
Specify any one of the following command to create or modify an existing item in the format of your choice:
  • add
  • new
  • modify

    If you run the new command, make sure you specify the item name also to view the template in the required format.

Specify any one of the following command to display or extract data about an existing item in the format of your choice:
filename | scheduling or security items
You need to specify the filename or scheduling or security items according to the model command that you want to run.
Example:
ocli model -format json display JS @#@

If you do not specify the format option in the command, the format specified in the config.yaml is taken. By default, the value for format in the config.yaml is YAML, and you can change it to JSON or schedlang. You can change the value manually by editing the config.yaml or use the set command.

If you do not specify any value in model command or config.yaml file, the default value (YAML) in the gateway server is considered. In such cases, you must make all the updates in YAML format or else an error message is displayed. The value in the gateway server cannot be modified.