Date: Fri, 29 Mar 2024 02:02:45 +0000 (UTC) Message-ID: <171612175.963.1711677765633@ip-10-30-146-46.us-west-2.compute.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_962_1856486905.1711677765630" ------=_Part_962_1856486905.1711677765630 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This s= ection 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 prog= rammatic extensibility, the ability to load and unload bundles (among other= s), and SSH access.
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-=
package
and onos-install
, the onos
command=
can be used to attach to running instance from the shell of the target mac=
hine.
Finally, as describe in Installing and Running ONO=
S, the onos
command can be used to attach to =
a remote ONOS instance directly from the local machine (i.e. without loggin=
g in first). For example, to access the CLI of an ONOS instance running at =
192.168.56.30:
$ onos = 192.168.56.30
Both Ctrl-D and logout
exits the CLI.
karaf clean
was 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
=
strong> lists the available commands:
onos>= ; help onos COMMANDS onos:add-flows Installs a flow rules = = = =20 onos:add-host-intent Installs host-to-host connectivity intent = = = =20 onos:add-multi-to-single-intent Installs point-to-point connectivity intent= = = =20 onos:add-node Adds a new controller cluster node onos:add-optical-intent Installs optical connectivity intent=20 ...
The commands can be invoked as either onos:<command> or
<command>
by itself. Some of thes=
e commands have further descriptions that can be seen with help =
onos:<command>.
onos>= ; help onos:add-flows DESCRIPTION onos:add-flows =09 Installs a flow rules SYNTAX onos:add-flows [options] flowPerDevice numOfRuns=20 ARGUMENTS flowPerDevice Number of flows to add per device numOfRuns Number of iterations OPTIONS --help Display this help message -j, --json Output JSON
Appendix A&nbs= p;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
<=
/strong> can be used to show all loaded modules:
onos>= ; list START LEVEL 100 , List Threshold: 50=20 ID | State | Lvl | Version | Name ---------------------------------------------------------------------------= --- 37 | Active | 80 | 0.0.0 | samples = =20 41 | Active | 80 | 2.6 | Commons Lang = =20 42 | Active | 80 | 3.3.2 | Apache Commons Lang = =20 ... 156 | Active | 80 | 1.1.0.SNAPSHOT | onos-core-common = =20 157 | Active | 80 | 1.1.0.SNAPSHOT | onos-core-dist = =20 158 | Active | 80 | 1.1.0.SNAPSHOT | onos-core-serializers = =20 159 | Active | 80 | 1.1.0.SNAPSHOT | onlab-netty = =20 168 | Active | 80 | 1.1.0.SNAPSHOT | onos-app-proxyarp=20 onos>
Modules can also be loaded/unloaded from the CLI. For example, to unload= the proxy ARP application above:
onos>= ; feature:uninstall onos-app-proxyarp
And to load it in:
onos>= ; feature:install onos-app-proxyarp
Append= ix C provides a listing of the available ONOS bundles for the stable re= lease.
Previous : Interacting with ONOS
Next : The ONOS Web GUI