Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Karaf

...

shell

OpenNaaS The Mantychore server uses a Karaf shell to manage Fuse and the OSGi container and Fuse. To get information.

The shell is local to the server (although it can be configured to be acceded remotely) and is the primary interface to administer OpenNaaS.

It supports scripting, among many other interesting features you would like to take advantage of, for sure

To get more information about karaf itself:

Mantychore Commands

The Mantychore server have a custom commands implemented in order to configure the platform via console shell.

Nexus commands

COMMAND

DESCRIPTION

SYNTAX

ARGUMENTS

OPTIONS

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f3fb35c4-798c-4b55-b1b3-09f7a1d587de"><ac:plain-text-body><![CDATA[

nexus:platform

Get platform details

nexus:platform [options]

 

 

]]></ac:plain-text-body></ac:structured-macro>

Protocol commands

...

COMMAND

...

DESCRIPTION

...

SYNTAX

...

ARGUMENTS

...

OPTIONS

...

protocols:add

...

protocols:add [options] resourceType:resourceName protocol

...

 

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7178cef1-494f-4de6-87b9-b86b5619fa9f"><ac:plain-text-body><![CDATA[

...

protocols:Context

...

Manipulates protocol contexts for used to create new sessions. Call without protocol to list.

...

protocols:Context [options] resourceType:resourceName [protocol] [uri]

...

 

CLI commands

Karaf command line console offers a set of pre-defined commands to manage osgi bundles and features, but it has been extended by exporting other customized commands required to operate OpenNaaS.

Each command has a namespace and a command name. The way to invoke them is as follows:

No Format
>namespace:commandname [options] arguments

As a quick reference, each OpenNaaS module exports commands required to interact with it. Namespaces are used to identify the context of a command or, more precisely, the component it comes from. In this manner, ResourceManager defines the "resources" namespace, ProtocolSessionManager the "protocols" one, and so on. Each capability defines a namespace that identifies its functionality, too.

The list of all available commands (and its namespaces) is accessible by pressing "tab" key twice form a clean prompt:

No Format
>[tab tab]
>Display all 341 possibilities? (y or n)

For a description of the commands, each one has a "--help" option that describes the command syntax, its semantics and how to invoke it, enumerating required arguments and available options. An example of this option output is shown just below:

No Format
>resource:list --help
DESCRIPTION
        resource:list

    List all resources in the platform

SYNTAX
        resource:list [options]

OPTIONS
        --help
                Display this help message
        --all, -a
                Extensive version 
        --type, -t
                Specifies the type of resources to list (if specified, only resources of this type will be listed)

 

If you are having problems using the shell, please refer to Getting Support section.

...

  --remove, -r
 
Instead of adding a context, remove it for the named protocol.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8d8bf326-04db-49d4-b010-42bb277b5c64"><ac:plain-text-body><![CDATA[

...

protocols:info

...

Provide extended information on a protocol session.

...

protocols:info [options] resourceType:resourceName sessionId

...

resourceType:resourceName The device owning the session.
]]></ac:plain-text-body></ac:structured-macro>
 
sessionId
The session to lookup.

...

 

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="90153597-beec-46eb-8bab-cffa76d2649a"><ac:plain-text-body><![CDATA[

...

protocols:list

...

List devices to which we have a live protocol session.

...

protocols:list [options] [resourceType:resourceName]

...

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
If present, only connections to this device will be listed.

...

--protocols, -p
Print supported protocols.
  --verbose, -v
Do not only print list devices to which we have a live protocol session, print all connections information.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7086bd39-0d7f-4d22-9344-daf953125229"><ac:plain-text-body><![CDATA[

...

protocols:purge

...

Brings up a live connection from the pool with the given protocol if there is none.

...

protocols:purge [options] [resourceType:resourceName] [seconds]

...

 

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="71cec3e3-8a8d-4cc8-adf8-fd5811d25657"><ac:plain-text-body><![CDATA[

...

protocols:remove

...

Removes a live connection from the pool, closing it.

...

protocols:remove [options] resourceType:resourceName [sessionId]

...

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
The resource owning the session.
sessionId
The name of the session id that will be destroyed.

...

--all, -a
Remove all active sessions.

Resource commands

Profile commands

COMMAND

DESCRIPTION

SYNTAX

ARGUMENTS

OPTIONS

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c7106705-3c3c-42f0-a676-a13512f871f4"><ac:plain-text-body><![CDATA[

profile:info

Provides extended information about one or more profiles

profile:info [options] profile ids

profile ids
]]></ac:plain-text-body></ac:structured-macro>
A space delimited list of profiles ids.

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9d98c774-57ed-4335-a962-4e316db6e0fa"><ac:plain-text-body><![CDATA[

profile:list

List all available profiles

profile:list [options]

 

 

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="49d69d0b-48fa-41df-9a15-642f864566f8"><ac:plain-text-body><![CDATA[

profile:remove

Remove a profile from available ones.

profile:remove [options] profileName

profileName
]]></ac:plain-text-body></ac:structured-macro>
The profile Id to be deleted

 

Capability commands

Chassis

COMMAND

DESCRIPTION

SYNTAX

ARGUMENTS

OPTIONS

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="393908be-9660-49e3-8e8f-2bb29294b859"><ac:plain-text-body><![CDATA[

chassis:down

Down a physical interface

chassis:down [options] resourceType:resourceName interface

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
The resource id to set the interface
interface
The name of the interface to be down

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f0a7a188-119c-4088-8a65-48616d66c26d"><ac:plain-text-body><![CDATA[

chassis:setVLAN

Set a VLAN id in a given interface.

chassis:setVLAN [options] resourceType:resourceName interface VLANid

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
The resource id to set the interface
interface
The name of the interface to be setted
VLANid
The VLAN id

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="2314a48b-3796-4c9a-b7bd-d59652695b4a"><ac:plain-text-body><![CDATA[

chassis:showInterfaces

List all the interfaces of a given resource

chasis:showInterfaces [options] resourceType:resourceName

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
The resource name to show the interfaces

--refresh, -r
Force to refresh the model with the last router configuration

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="13db7f06-468d-4082-b041-3c8c625f535c"><ac:plain-text-body><![CDATA[

chassis:up

Up a physical interface

chassis:up [options] resourceType:resourceName interface

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
The resource id to set the interface
interface
The name of the interface to be up

 

IPv4

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...