set
You can use the set command to update and manage the parameters or properties of each context in the config.yaml file.
Overview
Each context in the config.yaml contains a set of parameters or properties that can be configured to set up an environment. You can use the set command to update the values of these parameters. This permits you to customize the behavior of a specific command without modifying the entire config.yaml file. You can specify the required parameter value directly in the command, to override the value set in the default or selected config.yaml file. This flexibility gives you granular control over the configuration settings for each context, further enhancing the versatility of managing multiple config.yaml files and context parameters.
Syntax and command line options
ocli context set [context_name]
parameter=value
The
[parameter=value] parameter is mandatory. - context_name
- Specify the context name.
- parameter=value
- Specify a parameter in the context with a value. In the
config.yaml file, you have multiple parameters
under logging and connection.
If you want to update any values under these parameters, specify the
complete level separated by a dot (.) For example if you want to update
the value for port parameter under
connection, specify the value as
ocli context set connection.port=443
Example
- Run the following command to update the port to
443
inTEST
context.ocli context set TEST connection.port=443