Jump to: navigation, search

Difference between revisions of "COSMOS Design 273069"

(Design details)
(Known Limitations)
Line 100: Line 100:
 
===Known Limitations===
 
===Known Limitations===
 
*  The first phase of implementation will focus on integrating the CLI into the Orchestrator through method calls in an attempt to flesh out the CLI methods and functions.
 
*  The first phase of implementation will focus on integrating the CLI into the Orchestrator through method calls in an attempt to flesh out the CLI methods and functions.
* The second phase of implementtion will introduce the concepts of an event bus or listener model that will allow the Orchestrator and the Advisor interfaces to be married in a more dynamic approach.
+
* The second phase of implementation will introduce the concepts of an event bus or listener model that will allow the Orchestrator and the Advisor interfaces to be married in a more dynamic approach.
  
 
=Impacts of this enhancement=
 
=Impacts of this enhancement=

Revision as of 10:23, 28 April 2009

Implement CLI for interacting w/ SDD runtime

This is the design document for bugzilla 273069.

Change History

Name: Date: Revised Sections:
Jeff Hamm April 27, 2009
  • Initial version

Workload Estimation

Rough workload estimate in person weeks
Process Sizing Names of people doing the work
Design 1 Jeff Hamm
Code 2 Jeff Hamm, Josh Hester
Test 3 Jeff Hamm, Josh Hester
Documentation 0
Build and infrastructure 0
Code review, etc.* 1
TOTAL 7

'* - includes other committer work (e.g. check-in, contribution tracking)

Purpose

This enhancement will provide a basic command line interface for interacting with resolved SDD parameters.


Requirements

  • The CLI bundle must implement an IAdvisor interface.
    • The IAdvisor class is an interface that the Orchestrator uses to identify bundles that need to implement an interface such as a graphical or command line interface.
  • The CLI advisor will be capable of getting ParameterType objects as defined by the SDD in order to represent this data to the user.
  • The CLI advisor will be able to prompt for the information as requested by a ParameterType object.
  • The CLI advisor must accept user input from the command line.
  • The CLI advisor must provide means of getting the user data.
  • The CLI advisor must provide a means to accept asynchronous data from the operation handler interfaces to provide feedback of the operation being run.

Design details

  • IAdvisor
    • The IAdvisor class will be introduced into the management-enablement section of CVS "org.eclipse.cosmos.me.sdd.advisor".
 package org.eclipse.cosmos.me.sdd.advisor;
 
 public interface IAdvisor{
 	public Integer requestParameter(IntegerParameterType ipt);
        public String requestParameter(StringParameterType spt);
        public Boolean requestParameter(BooleanParameterType bpt);
        public URI requestParameter(URIParameterType upt);
 
        public String displayMessage(String message);
 }
  • CLI Advisor
    • The CLIAdvisor will implement the IAdvisor interface.
 package org.eclipse.cosmos.me.sdd.cliadvisor
 
 public class CLIAdvisor implements IAdvisor {
 
     public CLIAdvisor {}
 
 }
    • The CLIAdvisor will make use of Java Annotations to define the methods for interacting with the user.
    • The implementation of the four requestParameter(<>ParameterType parameter) methods will query for the values set for id, value, required, sensitive, defaultValue, and operation as defined by the BaseParameterType and determine what to display to the user. It will then read from System.in and wait for the user to interact with the tool, using return to terminate the input stream. The implementation will then return the value as entered by the user to the calling method, in the object form as defined by the calling method.
    • The implementation of displayMessage will allow other services to call the method in order to provide messages such as status or details about the operation(s) being performed.
    • Validation of ParameterTypes must be handled is handled by the implementation of the requestParameter methods.

Known Limitations

  • The first phase of implementation will focus on integrating the CLI into the Orchestrator through method calls in an attempt to flesh out the CLI methods and functions.
  • The second phase of implementation will introduce the concepts of an event bus or listener model that will allow the Orchestrator and the Advisor interfaces to be married in a more dynamic approach.

Impacts of this enhancement

  • The SDD runtime will be able to interact with the user via the CLI interface for ParameterType information as defined by the SDD. In response to the user, the runtime will perform resolution with the provided data in order to successfully resolve and operate on a SDD succcessfully. Also, feedback of the resolution and the operation(s) that are performed will be provided to the CLI.

Open Issues/Questions