The SmartConsole CLI can be directly accessed from within SmartConsole by clicking the icon on the bottom left corner or from the Gaia CLI shell (clish), where you need to login as a management user first.
SmartConsole -> Management CLI:
To access the Management CLI In Gaia's CLI shell (clish) type:
mgmt login
or
mgmt login user myname
After that you remain in the familiar Gaia shell, but now you can use the management APIs.
Example:
> mgmt login user
Enter password: ******
> show interfaces
eth0
eth0.3
lo
> mgmt add host name myHost12 ip-address 3.3.3.3
> mgmt publish
message "OK"
number-of-published-changes 1
>
- The syntax is identical to the commands that you run in the SmartConsole GUI.
- All management commands start with the word "mgmt".
Neither Gaia clish not the Management CLI (SmartConsole CLI ) feature any result filters, such as grep, at the moment.
However, you can access these CLI's from Gaia's expert mode and filter results via grep there.
Example:
[Expert@Management:0]# clish -c "mgmt login user USERNAME password PASSWORD"
[Expert@Management:0]# clish -c "mgmt show-version" | grep edition
os-edition: "64-bit"
Related article: sk98877