switch

You can use the switch command to change the default context.

Overview

The switch command helps you to manage the default context when you have multiple contexts available in the config.yaml file. You can run the list command to view all the available contexts in the config.yaml file, and the default context is identified with an asterisk (*).

Syntax and command line options

You can enter the command as follows:
ocli context [switch | sw] context_name
The context_name parameter is mandatory.
context_name
Specify the name of the context that you want to set as default.

Example

  • Run the following command to set the default context to TEST:
    ocli context switch TEST