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="be2e89a0-5a19-4540-902d-dd2beada2a92"><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="578a3ff6-9abf-4b25-a942-5e1d6ff8c302"><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]

...

  --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="6674575d-86d3-4bd8-9c26-22ad0af0e495"><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="aa35fffc-b60c-4749-8149-db2f7cdf5ca1"><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="916f5a20-15a0-4d93-af64-2e29d54d1a54"><ac:plain-text-body><![CDATA[

 

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.

...

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="5d78dc01-0cd3-4e3e-9f8b-4b80dcc1d696"><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

COMMAND

DESCRIPTION

SYNTAX

ARGUMENTS

OPTIONS

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a1a4ac6b-2cf5-4779-b678-88506e471171"><ac:plain-text-body><![CDATA[

resource:create

Create one or more resources from a given descriptor

resource:create [options] paths or urls

paths or urls
]]></ac:plain-text-body></ac:structured-macro>
A space delimited list of file paths or urls to resource descriptors

--profile, -p
 
Allows explicit declaration of profile to be used

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="4e3457d8-e707-42bf-bd98-3b10c5a22a36"><ac:plain-text-body><![CDATA[

resource:export

Export the descriptor of a resource to a file

resource:export [options] resourceType:resourceName fileName

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
The resource whose descriptor is going to be exported
fileName
The path to the file where the descriptor will be exported

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="86bba1b6-2f51-4fb5-927c-6d22859304bf"><ac:plain-text-body><![CDATA[

resource:info

Provides extended information about one or more resources

resource:info [options] resourceType:resourceName

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
A space delimited list of resource type and name

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e5baa91f-0010-444a-b2a7-47906a59787c"><ac:plain-text-body><![CDATA[

resource:list

List the resources in the platform

resource:list [options]

 

--type, -t
]]></ac:plain-text-body></ac:structured-macro>
The resource's type you want to obtain a list

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b0a6f43f-820c-4976-ad99-23295a1b620e"><ac:plain-text-body><![CDATA[

resource:modify

Modify one or more existing resources

 

resource:modify [options] resourceType:resourceName path or url

 

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
The name of the existing resource to modify
path or url
The file path or url to new resource descriptor

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="59941dd8-ef33-4d1c-be3c-78bb5819f3f7"><ac:plain-text-body><![CDATA[

resource:remove

Remove one or more resources from the platform

resource:remove [options] resourceType:resourceName

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
A space delimited list of resource type:name to be deleted

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="91b5f167-4220-48d2-92ce-a0872caf269e"><ac:plain-text-body><![CDATA[

resource:start

Start one or more resources

resource:start [options] resourceType:resourceName

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
A space delimited list of resource type:name to be started

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a4b13681-a6a6-4a32-97c6-48875057cc4e"><ac:plain-text-body><![CDATA[

resource:stop

Stop one or more resources

resource:stop [options] resourceType:resourceName

resourceType:resourceName
]]></ac:plain-text-body></ac:structured-macro>
A space delimited list of resource type:name to be stopped

 

Profile commands

COMMAND

DESCRIPTION

SYNTAX

ARGUMENTS

OPTIONS

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3ece4086-fc33-4c4f-ab6c-26e3f6afcc4d"><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="10c3c6fb-1ed8-4dcc-b30f-d18809bbab39"><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="950e0618-b155-4100-a3bd-679d37b657da"><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="b77dee06-82c1-4e2d-b0db-fd7665e50aa7"><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="29c6b133-e237-4a5d-8c48-d526dcb8926c"><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="535925eb-7262-4af5-a2e4-9eb304847ef1"><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="a21a5ed3-c208-4594-9ff7-1ee464b016d0"><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

 

...

 

...

 

...

 

...

 

...

 

...

chassis:up

...

 

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="40fd52a7-233e-4b85-a2b9-902118535580"><ac:plain-text-body><![CDATA[

...

chassis:setInterface

...

Set a IP in a the interface of a given resource

...

chasis:setInterface [options] resource type:name interface IP MASK

...

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
IP
A valid IPv4: x.x.x.x 
MASK
A valid MASK IPv4: x.x.x.x

...

chassis:setVLAN

...

Set a VLAN id in a given interface.

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

IPv4

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...