Protocol commands

COMMAND

DESCRIPTION

SYNTAX

ARGUMENTS

OPTIONS

protocols:add

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

protocols:add resourceType:resourceName protocol

resourceType:resourceName
The resource owning the session to create.

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

 

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
The resource owning the context.

protocol
The protocol of the context

authenticationType
The type of authentication used
[password - publickey]

uri
The URI passed to the protocol implementation of the context

privateKeyPath
Path of the private key to be used.

keyPassphrase
Passphrase of the private key file.

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

protocols:info
 

Provide extended information on a protocol session.

protocols:info resourceType:resourceName sessionId

resourceType:resourceName The device owning the session.
 
sessionId
The session to lookup.

 

protocols:list

List devices to which we have a live protocol session.

protocols:list [options] [resourceType:resourceName]

resourceType:resourceName
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.

protocols:purge

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

protocols:purge [resourceType:resourceName] [seconds]

resourceType:resourceName
The resource owning the session to create.

Seconds
How old are the sessions to be destroyed.

 

protocols:remove

Removes a live connection from the pool, closing it.

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

resourceType:resourceName
The resource owning the session.
sessionId
The name of the session id that will be destroyed.

--all, -a
Remove all active sessions.

Description

In OpenNaaS, each resource needs to have linked a protocol to can communicate with the physical device which it virtualises. These list of commands are responsible to save in the OpenNaaS software which type of connection are linked to some resource. For this reason, it exists the protocol commands, protocols:context links these connection parameters. Also, in order to reuse these protocols in other resources, you can use protocols:add. Finally, for the protocol management, it exists: protocols:list, protocols:remove, protocols:info, etc...

Resource commands

COMMAND

DESCRIPTION

SYNTAX

ARGUMENTS

OPTIONS

resource:create

Create one or more resources from a given descriptor

resource:create [options] paths or urls

paths or urls
A space delimited list of file paths or urls to resource descriptors

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

resource:export

Export the descriptor of a resource to a file

resource:export resourceType:resourceName fileName

resourceType:resourceName
The resource whose descriptor is going to be exported
fileName
The path to the file where the descriptor will be exported

 

resource:info

Provides extended information about one or more resources

resource:info resourceType:resourceName

resourceType:resourceName
A space delimited list of resource type and name

 

resource:list

List the resources in the platform

resource:list [options]

 

--type, -t
The resource's type you want to obtain a list

resource:modify

Modify one or more existing resources

resource:modify resourceType:resourceName path or url

resourceType:resourceName
The name of the existing resource to modify
path or url
The file path or url to new resource descriptor

 

resource:remove

Remove one or more resources from the platform

resource:remove  resourceType:resourceName

resourceType:resourceName
A space delimited list of resource type:name to be deleted

 

resource:start
 

Start one or more resources

resource:start resourceType:resourceName

resourceType:resourceName
A space delimited list of resource type:name to be started

 

resource:stop

Stop one or more resources

resource:stop  resourceType:resourceName

resourceType:resourceName
A space delimited list of resource type:name to be stopped

 

Profile commands

COMMAND

DESCRIPTION

SYNTAX

ARGUMENTS

OPTIONS

profile:info

Provides extended information about one or more profiles

profile:info  profile ids

profile ids
A space delimited list of profiles ids.

 

profile:list

List all available profiles

profile:list

 

 

profile:remove

Remove a profile from available ones.

profile:remove profileName

profileName
The profile Id to be deleted