Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "COSMOS Design 273069"

(New page: = Provide CLI for runtime= This is the design document for [http://bugs.eclipse.org/260725 bugzilla 273069]. = Change History = {|{{BMTableStyle}} !align="left"|Name: !align="left"|Date:...)
 
(Design details)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Provide CLI for runtime=
+
= Implement CLI for interacting w/ SDD runtime =
  
 
This is the design document for [http://bugs.eclipse.org/260725 bugzilla 273069].
 
This is the design document for [http://bugs.eclipse.org/260725 bugzilla 273069].
Line 59: Line 59:
  
 
=Requirements=
 
=Requirements=
* Based on the CIM type of  CIM_FileSystem, the resolver must be able to recognize the type of file system being utilized.
+
* The CLI bundle must implement an IAdvisor interface.
** Typically, the operating system must be known in order to determine the proper method of utilizing and asking for file system properties.
+
** 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 resolver must be able to provide a core set of property handlers.
+
* 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 resolver must be able to check to see if a defined file system resource meets minimum and maximum size requirements.
+
* The CLI advisor will be able to prompt for the information as requested by a ParameterType object.
** The resolver must be able to determine if a defined file system resource is hosted by the the parent of defined resource in topology.
+
* The CLI advisor must accept user input from the command line.
** The resolver must be able to determine if a defined file system resource exists.
+
* The CLI advisor must provide means of getting the user data.
* Interfaces to the class must adhere to a common api for existing in the Profile Module.
+
* 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=
 
=Design details=
* "FileSystemResolver" will take the file system properties defined in the SDD and see if the conditions that are required can be satisfied.  
+
*IAdvisor
** This resolver will use other defined resources in topology of the SDD to validate the existance.
+
** The IAdvisor class will be introduced into the management-enablement section of CVS "org.eclipse.cosmos.me.sdd.advisor".
** Resolution of file system properties often will require other resources in topology to be resolved.
+
<source lang="Java">
 +
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);
 +
}
 +
</source>
 +
*CLI Advisor
 +
** The CLIAdvisor will implement the IAdvisor interface.
 +
** The CLIAdvisor will exist in a separate osgi bundled package as "org.eclipse.cosmos.me.sdd.cliadvisor"
 +
<source lang="Java">
 +
package org.eclipse.cosmos.me.sdd.cliadvisor;
 +
 +
public class CLIAdvisor implements IAdvisor {
 +
 
 +
    public CLIAdvisor {}
  
===Known Limitations===
+
    public void displayMessage(String message) {
*
+
// Implementation
 +
    }
  
=Impacts of this enhancement=
+
    public Integer requestParameter(IntegerParameterType ipt) {
* The SDD runtime will be able to interact with defined topology file system services and use this data to help in resolution of defined SDD resources and requirements on the defined service.
+
        // Implementation
 +
    }
  
 +
    public String requestParameter(StringParameterType spt) {
 +
        // Implementation
 +
    }
 +
 +
    public Boolean requestParameter(BooleanParameterType bpt) {
 +
        // Implementation
 +
    }
 +
 +
    public URI requestParameter(URIParameterType upt) {
 +
        // Implementation
 +
    }
 +
}
 +
</source>
 +
** 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.
 +
** 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=
 
=Open Issues/Questions=

Latest revision as of 11:18, 5 May 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.
    • The CLIAdvisor will exist in a separate osgi bundled package as "org.eclipse.cosmos.me.sdd.cliadvisor"
 package org.eclipse.cosmos.me.sdd.cliadvisor;
 
 public class CLIAdvisor implements IAdvisor {
 
     public CLIAdvisor {}
 
     public void displayMessage(String message) {
	 // Implementation
     }
 
     public Integer requestParameter(IntegerParameterType ipt) {
         // Implementation
     }
 
     public String requestParameter(StringParameterType spt) {
         // Implementation
     }
 
     public Boolean requestParameter(BooleanParameterType bpt) {
         // Implementation
     }
 
     public URI requestParameter(URIParameterType upt) {
         // Implementation
     }
 }
    • 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.
    • 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

Back to the top