-
Notifications
You must be signed in to change notification settings - Fork 17
CLI
holo-cli is an interactive command-line interface that allows users to configure and monitor the Holo daemon. At startup, holo-cli connects to holod through gRPC and retrieves the list of implemented YANG modules. These modules are then parsed to dynamically generate configuration commands. holo-cli features bash-like editing functionality, syntax highlighting, autocompletion, file-backed history, among other goodies.
Below is a demonstration of holo-cli in action:
holo-cli supports the following command-line parameters:
$ holo-cli --help
Holo command-line interface 0.2.0
USAGE:
holo-cli [FLAGS] [OPTIONS]
FLAGS:
-h, --help Prints help information
--no-colors Disable ansi coloring
--no-pager Disable the pager
-V, --version Prints version information
OPTIONS:
-c, --command <COMMAND>... Execute argument as command
--file <path> Read configuration file
The -c
parameter can be used multiple times to execute multiple commands non-interactively. The --file
parameter allows reading a configuration file from the file system. In that case, merge semantics are used while applying the configuration.
Here's an example configuration where a single OSPFv3 instance is present:
interfaces interface lo
type iana-if-type:ethernetCsmacd
ipv6
!
interfaces interface eth-rt4
type iana-if-type:ethernetCsmacd
ipv6
!
interfaces interface eth-rt5
type iana-if-type:ethernetCsmacd
ipv6
!
routing control-plane-protocols control-plane-protocol ietf-ospf:ospfv3 main
ospf explicit-router-id 6.6.6.6
!
ospf areas area 0.0.0.1
!
interfaces interface lo
!
interfaces interface eth-rt4
interface-type point-to-point
hello-interval 3
dead-interval 12
!
interfaces interface eth-rt5
interface-type point-to-point
hello-interval 3
dead-interval 12
!
These commands are available in the EXEC mode:
- configure: Enters the configuration mode.
- show running [format <json|xml>] [with-defaults]: Shows the running configuration.
These commands are available in the configuration mode:
- commit [comment COMMENT]: Commits the pending configuration changes to the running configuration.
- discard: Discards the pending configuration changes.
- hostname HOSTNAME: Sets the CLI prompt.
- show <candidate|running> [format <json|xml>] [with-defaults]: Shows the candidate or the running configuration.
- show changes: Shows the pending configuration changes.
- validate: Checks the validity of the candidate configuration.
These commands are available in all CLI nodes:
- end: Terminates the configuration session and exits to the EXEC mode. Any configuration changes that are pending will be discarded.
- exit: Exits to the parent CLI node.
- list: Lists all available commands in the current CLI node.
- Architecture
- Management Interfaces
- Developer's Documentation
- Example Topology
- Paul's Practical Guide