Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be 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 275731"

(Design details)
(Impacts of this enhancement)
Line 107: Line 107:
  
 
=Impacts of this enhancement=
 
=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.
+
* The SDD runtime will be able to resolve a deployment descriptor that defines an installed product.
  
 
=Open Issues/Questions=
 
=Open Issues/Questions=

Revision as of 11:32, 18 May 2009

Resource Handler to check for installed products

This is the design document for bugzilla 275731.

Change History

Name: Date: Revised Sections:
Jeff Hamm May 18, 2009
  • Initial version

Workload Estimation

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

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

Purpose

This enhancement will provide a basic resource handler that can discover if an application as described by the SDD is installed on the system the runtime is interacting with.

Requirements

  • The InstalledProductHandler must implement the IResourceHandler from the org.eclipse.cosmos.me.sdd.cr bundle.
    • The IResourceHandler class is an interface that the runtime uses to load and run bundles dynamically. The IResourceHandler uses the CIM QName as defined by the component.xml data for the implemented handler as the way the ResourceHandler will discover and run the bundle.
  • The InstalledProductHandler will discover products installed on both Windows and Linux platform types.
  • Based on the current CIM profile, the InstalledProductHandler will recognize the following types as defined in the CIM_InstalledProduct schema:
    • CIM_InstalledProduct.ProductName
    • CIM_InstalledProduct.ProductVersion
    • CIM_InstalledProduct.ProductVendor

Design details

  • InstalledProductHandler
    • The InstalledProductHandler will be introduced into the "org.eclipse.cosmos.me.sdd.cim.profile" project in eclipse CVS.
 package org.eclipse.cosmos.me.sdd.advisor;
 
public class InstalledProductHandler implements IResourceHandler {
	static final QName IP = new QName("http://docs.oasis-open.org/sdd/ns/cim-profile", "CIM_InstalledProduct");
	static final QName IP_PNAME = new QName("http://docs.oasis-open.org/sdd/ns/cim-profile", "CIM_InstalledProduct.ProductName");
	static final QName IP_PVENDOR = new QName("http://docs.oasis-open.org/sdd/ns/cim-profile", "CIM_InstalledProduct.ProductVendor");
	static final QName IP_PVERSION = new QName("http://docs.oasis-open.org/sdd/ns/cim-profile", "CIM_InstalledProduct.ProductVersion");
 
	// vendor = {0}, product = {1}, version = {2}
	static final String WIN_1 = "{0}\\{1}\\{2}";    // vendor\product\version
	static final String WIN_2 = "{1}\\{2}";         // product\version
	static final String WIN_3 = "{1}-{2}";		// product-version
	static final String WIN_4 = "{0}\\{1}{2}";	// vendor\productversion
	static final String WIN_5 = "{0}\\{1}-{2}";	// vendor\product-version
	static final String WIN_6 = "{1}{2}";	        // productversion
 
 
	static final String UNIX_1 = "{0}/{1}/{2}";     // vendor/product/version
	static final String UNIX_2 = "{1}/{2}";         // product/version
	static final String UNIX_3 = "{1}-{2}";		// product-version
	static final String UNIX_4 = "{0}/{1}{2}";	// vendor/productversion
	static final String UNIX_5 = "{0}/{1}-{2}";	// vendor/product-version
	static final String UNIX_6 = "{1}{2}";	        // productversion
 
	String [] unixRoots = new String [] {"/opt/", "/usr/local/"};
	String [] unixPatterns = new String [] {UNIX_1, UNIX_2, UNIX_3, UNIX_4, UNIX_5, UNIX_6};
 
	String [] winRoots = new String [] {"C:", "C:\\Program Files"};
	String [] winPatterns = new String [] {WIN_1, WIN_2, WIN_3, WIN_4, WIN_5, WIN_6};
    • The InstalledProductHandler uses various pattern matches to determine if a product is installed on the target host.
    • The InstalledProductHandler searches well know locations as defined by work done by the Filesystem Hierarchy Standard Group. Reference to this work is provided here.

Impacts of this enhancement

  • The SDD runtime will be able to resolve a deployment descriptor that defines an installed product.

Open Issues/Questions

Back to the top