This section describes ONOS's Karaf-based CLI.
The ONOS CLI is an extension of Karaf's CLI. As a result, it is capable of leveraging features such as programmatic extensibility, the ability to load and unload bundles (among others), and SSH access.
Accessing the CLI
For local installations of ONOS, the ONOS CLI can be accessed with the command
karaf clean. For remote installations, e.g. ONOS instances deployed with
onos command can be used to attach to running instance from the shell of the target machine.
Finally, as describe in Installing and running ONOS, the
onos command can be used to attach to a remote ONOS instance directly from the local machine (i.e. without logging in first). For example, to access the CLI of an ONOS instance running at 192.168.56.30:
Both Ctrl-D and
logout exits the CLI.
karaf cleanwas used to start the CLI, exiting the CLI will cause the ONOS instance to terminate.
ONOS supplies a set of its own commands.
help onos lists the available commands:
The commands can be invoked as either
<command> by itself. Some of these commands have further descriptions that can be seen with
Appendix A provides a listing of the currently available CLI commands.
Karaf's CLI commands are useful for managing the bundles (modules) that comprise the running ONOS instance. For example,
list can be used to show all loaded modules:
Appendix C provides a listing of the available ONOS bundles for the stable release.