Re: CLI


Y. Richard Yang <yang.r.yang@...>
 

Hi Kai,

Good work! Here are some quick initial feedback:

- In the long run, alto:* should not be karaf commands. The CLI should be a standard alone admin client that manages the alto info at a server. Hence, there may need a param to indicate the server (container running alto service).

- My understanding is that your :service command is to decide if a category of service is available. What is the autostart? Why stop a service? For consistent updates?

- Instead of :x commands, how about instanceop <service> <instance-pool-operation>?

- A key flexibility you are considering, I believe, is ird. 

- The commands map to old projects.

Richard

On Thursday, April 16, 2015, Gao Kai <godrickk@...> wrote:

Hi all,

Yesterday I was asked to give a brief description about my understanding of the design and here is the response.

A deployment scenario through the command line:

When feature alto-service is installed:

karaf $ alto:service <service-name> <operation> [<parameters>]
service-name = { ird-pool | networkmap-pool | costmap-pool | endpointmap-pool }
operation = service-operation

service-operation = { start | stop | autostart { true | false } | status }

instance-pool-operation = {
      list
    | create <id> <description-file>
    | destroy <id>
    | start <id>
    | stop <id>
    | autostart <id> { true | false }
    | status <id> [<version-tag>]
    | update <id> <new-description-file>
    | configure <id> <property> [<parameters>] }

When no parameters are given to configure the command will return the value of
the property.

ird-registry-operation = {
      register <resource-id> { remote <ird-registry-uri> | local <ird-id> }
    | unregister <resource-id> { remote <ird-registry-uri> | local <ird-id> }}

When ird-pool service is activated:

karaf $ alto:ird <operation> [<parameters>]
operation = instance-pool-operation | ird-registry-operation

When networkmap-pool service is activated:

karaf $ alto:networkmap <operation> [<parameters>]
operation = instance-pool-operation | ird-registry-operation

When costmap-pool service is activated:

karaf $ alto:costmap <operation> [<parameters>]
operation = instance-pool-operation | ird-registry-operation

When endpointmap-pool service is activated:

karaf $ alto:endpointmap <operation> [<parameters>]
operation = instance-pool-operation | ird-registry-operation

Here are some examples for the description files:
A static networkmap description file example:

{
    name : "static-map-1",
    generator : {
        class : "static-file-generator",
        file : "/opt/alto/configuration/networkmap/static-map-04542ead1343.map"
    }
}

A host tracker costmap description file example:

{
    name : "hosttrack-map-singleton",
    generator : {
        class : "hosttracker-generator",
        dependency: [
            "static-map-1",
        ]
    },
    autostart : true,
    registry : [
        "remote:http://someoneelse.com/ird/registry",
        "local:root-ird",
    ]
}

The yang-models for ird-pool service and data are described in the attached files (still not complete though).

Yours,

K



--
Richard

Join z.archive.alto-dev@lists.opendaylight.org to automatically receive all group messages.