.. _cli:

SANET CLI Reference
-------------------




Main prompt commands
~~~~~~~~~~~~~~~~~~~~



configure
:::::::::

**configure** [**terminal** | **network**]

**configure** **terminal** enters configuration mode prompt. **configure**
**network** is currently unimplemented.




exit
::::

**exit**

Exit from the CLI. This is the same as terminating the input stream, e.g.
with ctrl-D.




show configuration
::::::::::::::::::

**show** **configuration**

Display the active configuration text file.




show containers
:::::::::::::::

**show** **containers** [**tree** *tree-name* [**container** *container-name*
[**details**]]]

Display information about all the containers, the containers of a tree, or a
particular container

-   ID: an internal numeric ID used by the system
-   NAME: the container's name
-   PARENT: The parent container in the tree. Each tree should have one,
    and only one, container with empty parent.
-   X, Y: position of the container when drawn in its parent
-   ZINDEX: stack position of the container when drawn in its parent
-   SZ: relative size of the container when drawn in its parent
-   DESCRIPTION: A human-readable description

When displaying a single container the keyword **details** will display
fields on multiple lines, without any truncation, and will display contained
nodes.




show icons
::::::::::

**show** **icons** [*icon-name*]

Display information about all icons, or a particular icon

-   ID: an internal numeric ID used by the system
-   NAME: the icon's name. Reserved icons have names: node, container,
    site, iface
-   FNAME: base name of the file used when rendering this icon
-   SUBST: thr RGB color to substitute with a color expressing the status
    (red, green, etc.)
-   DESCRIPTION: A human-readable description




show interfaces
:::::::::::::::

**show** **interfaces** [**node** *node-name* [*interface-name*
[**details**]]]

Display information about all the interfaces, the interfaces of a node, or a
particular interface.

The meaning of the information fields displayed is as follows:

-   ID: an internal numeric ID used by the system
-   NAME: the interface's name
-   INSTANCE: instance string which, together with xform, identifies this
    interface
-   XFORM: a string representing the algorithm used to find out the
    ifIndex, given the instance string
-   T: number of targets associated with this interface
-   M: number of measures associated with this interface
-   CONNECTS: the interface connected to this one (node and interface
    name)
-   DESCRIPTION: A human-readable description for this interface

When displaying a single interface the keyword **details** will display
fields on multiple lines, without any truncation.




show nodes
::::::::::

**show** **nodes** [*node-name*]

Show information about all nodes or, if a node name is given, about a
particular node.

The meaning of the information fields displayed is as follows:

-   ID: an internal numeric ID used by the system
-   NAME: the node's name, used to lookup its IPv4 address
-   IPV6: the name used to lookup the IPv6 address (AAAA record)
-   ICON: name of the icon used to draw the node in the web interface
-   T: number of targets associated with this node
-   M: number of measures associated with this node
-   I: number of interfaces
-   DESCRIPTION: A human-readable description for this node




show site
:::::::::

**show** **site**

Display information about the site.

-   NAME: The name of the site
-   DESCR: a human-readable description
-   INIL TIME: the last time an icon, node, interface or link was
    modified
-   FOREST TIME: the last time a tree or container was modified
-   HTML DETAILS: Details shown in the site details pane of the web
    interface
-   CLI BANNER: CLI login message




show trees
::::::::::

**show** **trees** [*tree-name*] [**orphaned-nodes**]

Display information about the trees or a particular tree.

-   ID: an internal numeric ID used by the system
-   NAME: the tree's name. **geo** is a reserved name.
-   SORT: An integer number used to sort the tree among the others, in
    the web interface
-   ALLNODES?: if 1, all nodes will be shown in this tree, the root will
    contain nodes not otherwise associated
-   DESCRIPTION: A human-readable description

With the **orphaned-nodes** keyword, display the list of nodes which are not
within a container in this tree.




Configuration commands
~~~~~~~~~~~~~~~~~~~~~~




exit
::::

**exit**

Exit configuration mode. Current configuration is automatically saved.




icon
::::

**icon** *name*

Enters icon configuration mode

**no** **icon** *name* *name-confirmation*

Deletes an icon and all associated configuration. Nodes and containers using
this icon will be set to use the default icon. The same will happen if the
icon is used to represent the site.




link
::::

**link *node-name* *interface-name* *node-name* *interface-name***

Link two interfaces

**no** **link *node-name* *interface-name* *node-name* *interface-name***

Delete previously created link




node
::::

**node** *node-name*

Enters node configuration mode, creating the node if it does not exists.

**no** **node** *node-name* *node-name-confirmation*

Deletes a node and all its interfaces.




rename
::::::

**rename** **container** *tree-name* *old-name* *new-name*

**rename** **icon** *old-name* *new-name*

**rename** **interface** *node-name* *old-name* *new-name*

**rename** **node** *old-name* *new-name*

**rename** **tree** *old-name* *new-name*


Rename an object, keeping all other information and subobjects intact.

You cannot rename a reserved tree or a reserved icon. You cannot move a
container to another tree, nor move an interface to another node.




show
::::

**show** commands available in the main prompt are available also in this
mode.




site
::::

**site description** *description line*

An human-readable description for the site. The description can be multiple
words, on the same line of the command.

**site banner**
*multiline banner text*
*multiline banner text*
**.**

The CLI banner for the site (max 255 chars). Enter a dot on a line by itself
to terminate input. If the line you want to input begins with a dot, double
the initial dot.

**site details**
*multiline HTML details*
*multiline HTML details*
**.**

The HTML details shown in the site details pane of the web interface (max 255
chars). Enter a dot on a line by itself to terminate input. If the line you
want to input begins with a dot, double the initial dot.

**site name** *name*

The site name.

**site icon** *icon-name*

The name of the icon used to represent the site in the web interface.




tree
::::

**tree** **geo**|*tree-name* [**delete**|**rename** *new-tree-name*]

Enter tree configuration mode, creating the tree if it doesn't exist.

**no** **tree** *tree-name*

Delete a previously created tree and all the containers within. Tree **geo**
cannot be deleted.




Container configuration commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




adopt-orhpaned-nodes
::::::::::::::::::::

**adopt-orhpaned-nodes**

Adopt, i.e. associate to this container, all the nodes that are not
associated with a container for this tree.




description
:::::::::::

**description** *text ...*

Sets the description for this container.




icon
::::

**icon** *icon-name*

Sets the icon used to draw the container in the web interface.




parent
::::::

**parent** *container-name*

Sets the parent for the container. Each tree must have on, and only one,
container without parent.




show
::::

**show** commands available in the main prompt are available also in this
mode.




rectangle
:::::::::

**rectangle** *relative-x* *relative-y* *z-index* *relative-size*

Sets drawing information for the rectangle used to represent this container
in its parent. If missing, a drawing algorithm is used.

-   *relative-x*: horizontal position of centre, fractional, 0 is left
    and 1 is right
-   *relative-y*: vertical position of centre, fractional, 0 is down and
    1 is up
-   *z-index*: stacking order, non-negative integer, 0 is default,
    greater covers smaller
-   *relative-size*: size, fractional, 0 - 1




Icon configuration commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~




filename
::::::::




description
:::::::::::




show
::::

**show** commands available in the main prompt are available also in this
mode.




subst-color
:::::::::::




Interface configuration commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




description
:::::::::::




instance
::::::::




show
::::

**show** commands available in the main prompt are available also in this
mode.




xform
:::::




Node configuration commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~




description
:::::::::::




icon
::::




interface
:::::::::

**interface** *interface-name*




ipv6name
::::::::




show
::::

**show** commands available in the main prompt are available also in this
mode.




Tree configuration commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~




container
:::::::::

**container** *container-name*

Enters container configration mode, creating the container if it does not
exists.

**no** **container** *container-name* *container-name-confirmation*
[**recursive**]

Delete a container. With **recursive**, delete also containers for which this
is the parent, grand-parent, etc, recursively. Without **recursive**, a
container with containers in it will not be deleted. Nodes in the deleted
container will be disassociated.




description
:::::::::::




display-all-nodes
:::::::::::::::::




display-order
:::::::::::::




show
::::

**show** commands available in the main prompt are available also in this
mode.

.. _SANET CLI Reference: #SANET_CLI_Reference
.. _Main prompt commands: #Main_prompt_commands
.. _configure: #configure
.. _exit: #exit
.. _show configuration: #show_configuration
.. _show containers: #show_containers
.. _show icons: #show_icons
.. _show interfaces: #show_interfaces
.. _show nodes: #show_nodes
.. _show site: #show_site
.. _show trees: #show_trees
.. _Configuration commands: #Configuration_commands
.. _exit: #exit_2
.. _icon: #icon
.. _link: #link
.. _node: #node
.. _rename: #rename
.. _show: #show
.. _site: #site
.. _tree: #tree
.. _Container configuration commands: #Container_configuration_commands
.. _adopt-orhpaned-nodes: #adopt-orhpaned-nodes
.. _description: #description
.. _icon: #icon_2
.. _parent: #parent
.. _show: #show_2
.. _rectangle: #rectangle
.. _Icon configuration commands: #Icon_configuration_commands
.. _filename: #filename
.. _description: #description_2
.. _show: #show_3
.. _subst-color: #subst-color
.. _Interface configuration commands: #Interface_configuration_commands
.. _description: #description_3
.. _instance: #instance
.. _show: #show_4
.. _xform: #xform
.. _Node configuration commands: #Node_configuration_commands
.. _description: #description_4
.. _icon: #icon_3
.. _interface: #interface
.. _ipv6name: #ipv6name
.. _show: #show_5
.. _Tree configuration commands: #Tree_configuration_commands
.. _container: #container
.. _description: #description_5
.. _display-all-nodes: #display-all-nodes
.. _display-order: #display-order
.. _show: #show_6