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.

Protocols commands

...

COMMAND

...

DESCRIPTION

...

SYNTAX

...

ARGUMENTS

...

OPTIONS

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="2c398feb-033d-4cc5-884e-968ebd181306"><ac:plain-text-body><![CDATA[

...

nexus:listDevices

...

List the device ids registered in the protocol manager

...

nexus:listDevices [options]

...

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

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d2b76855-9fe5-429e-aaa7-72787f0df8c3"><ac:plain-text-body><![CDATA[

...

nexus:listProtocolFactories

...

List the protocol factories registered in the protocol manager

...

nexus:listProtocolFactories [options]

...

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

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="08533806-63fd-4494-9e54-c9edfa61274a"><ac:plain-text-body><![CDATA[

...

nexus:platform

...

Get platform details

...

nexus:platform [options]

...

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

 

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.

 

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="fd86f686-645e-4fc3-b2a0-d43c6b93345b"><ac:plain-text-body><![CDATA[

...

protocols:add

...

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

...

protocols:add [options] resourceType:resourceName protocol

...

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

  • The resource owning the session to create.
    protocol
  • The protocol to use. This argument defines the factory and context used to create this session.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="09284809-9dd1-4e28-aa24-b9aa1217b205"><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]

...

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

  • The resource owning the context.
     protocol
  • The protocol of the context
    uri
  • The URI passed to the protocol implementation of the context

...

--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="1993a1c4-8662-4bb1-8ac2-601c133b3020"><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]

...

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

  • The resource owning the session to create.
    seconds
  • How old are the sessions to be destroyed.

Resource commands

Profile commands

...