Common CLI Commands

Axigen Documentation

The following commands are common to a subset of contexts: HELP, QUIT/EXIT, CANCEL, BACK, COMMIT/DONE, SHOW, LIST, SET, ADD, REMOVE, UPDATE, CONFIG, RESET.

Some of the commands described below apply only to a set of contexts, others apply to all contexts, and others have different flavors according to certain contexts. Below are listed only the common and most important commands used in CLI, but other commands are also available.

  • EXIT/QUIT – this command exits CLI. It is available from all contexts

  • HELP – the help command is present in all contexts, including Login and is used for displaying a list of available commands in that context

  • BACK – this command cancels any changes (where it applies) and switches back to the previous context. This is available from every context except Login and Root.

  • COMMIT – this command saves the changes and also writes these changes to the server configuration. This also includes the changes done in child contexts and saved with DONE. A switch back to the previous context is also done.

  • DONE – this command saves the changes for a child context and switches back to the previous context but does not write anything to the server's configuration.

  • SHOW – the SHOW command has two flavors, one without parameters, and in this case, the value parameters (that means not the children or child lists) are shown, and one with parameters, in this case, the value parameters of a child from a child list are shown. In both cases, there is an optional ATTR parameter which, if present, will only show the specified attribute.

  • LIST – this command lists the members of a given child list in the form of a table. If the list has a separate context, some parameters are put in the table, otherwise all value parameters are present.

  • SET – the SET command sets a value for a specified value parameter of the given object associated with the context (if there is one). To the SET command, one or several parameter-value pair can be given.

  • ESET – the ESET command (Extended SET) enters a new context in which large amounts of data can be entered. The context can be left with <empty line> <.> <empty line>, the same as in the case of the SMTP protocol. This command is useful for parameters that require large amounts of text.

  • ADD – this command has several flavors. The simplest one is for adding values to a value list. In this case, the parameter is the name of the value list and a value (for instance ADD nameserver ip). Another form is used to add objects to list of objects. This form has three versions: one that takes the list and the key parameter-value pair of the object and changes the context; another that is the same except it takes additional required parameter-value pairs; and one that takes the key param-value pair and other optional pairs and doesn't change context but directly adds the object to the list.

  • UPDATE – this command changes an object from a list of objects. It is similar to add, except it does not apply to value lists.

  • REMOVE – this usually takes as parameters the list name, and key param-value pair for object lists, and list name and value for value lists and as the name suggests, removes an object from a list. It does not change the context.

  • CONFIG – the config command changes the context for configuring a child object. A child object is different form a list by the fact that it is a single object and it exists permanently. A list may have one, none or several objects.

  • RESET – the RESET command will update the context to the active one on the server. This also means that any changes made to that part of the context will be lost. The reset command, depending on the parameter, will reset the value attributes, or a list of objects or values.

  • ENTER – this command, changes a context, entering a sub-context. This usually applies to contexts unrelated to the object-child object configuration hierarchy.

The action of each command may differ in specific contexts that represent exceptions to the general behavior. As said before, some contexts have additional commands that have an exceptional character.