Jython API for XCAT


createComponent (componentName)

Paramaters :

componentName : Jython String

Returns :

ui.python.ComponentWrapper, which is a thin wrapper around a component, storing the environment for the component, and a reference to it.

Description :

createComponent (componentName) creates a dummy component wrapper using 'componentName', which can be the XML file that describes the component, or an XCAT Environment Object, which contains name/value pairs describing the component. A live instance of this component can be created using the createInstance() function.


setMachineName (componentWrapper, machineName)

Paramaters :

componentWrapper : ui.python.ComponentWrapper
machineName : Jython String

Returns :

void

Description :

setMachineName (componentWrapper, machineName) specifies the machine on which we would like to instantiate the component from the component wrapper "componentWrapper".


setCreationMechanism (componentWrapper, creationMechanism)

Paramaters :

componentWrapper : ui.python.ComponentWrapper
creationMechanism : Jython String

Returns :

void

Description :

setCreationMechanism (componentWrapper, creationMechanism) specifies the creation mechanism to be used while creating the component instance from the wrapper "componentWrapper". We currently support gram (using Cog), ssh and exec as our creation mechanisms.


createInstance (componentWrapper)

Paramaters :

componentWrapper : ui.python.ComponentWrapper

Returns :

void

Throws :

xcat.framework.exceptions.XCATException

Description :

createInstance takes in a handle to the component wrapper that we want to create and then creates a "live" instance of this component on the desired machine, using the desired creation mechanism. This means that the component is actually launched on the target by this method. If the desired instance can not be created, an XCATException is thrown.


connectPorts (usesPortComponentWrapper, usesPortName, providesPortComponentWrapper, providesPortName)

Paramaters :

usesPortComponentWrapper : ui.python.ComponentWrapper
usesPortName : Jython String
providesPortComponentWrapper : ui.python.ComponentWrapper
providesPortName : Jython String

Returns :

void

Throws :

xcat.framework.exceptions.XCATException

Description :

connectPorts accepts the handles to the component wrappers whose uses and provides ports have to be connected, the names under which these uses and provides ports have been registered, and connects them together, if possible. If this connection can not be completed for some reason, then an XCATException is thrown.


invokeMethodOnComponent (componentWrapper, usesPortClassName, usesPortType, providesPortName, methodName, methodParams)

Paramaters :

componentWrapper : ui.python.ComponentWrapper
usesPortClassName : Jython String
usesPortType : Jython String
providesPortName : Jython String
methodName : Jython String
methodParams : Array of java.lang.Object

Returns :

java.lang.Object

Throws :

xcat.framework.exceptions.XCATException

Description :

invokeMethodOnComponent accepts a handle to the component wrapper on which the method has to be invoked. 'usesPortClassName' is the fully qualified name of the uses port which is needed to invoke the method. 'usesPortType' is a string describing the type of the uses port. This has to be same as the type of the provides port, which will be connected to. 'providesPortName' is the name by which the provides port of the component is registered. The 'methodName' is the name of the method to be invoked and 'methodParams' is an array of Java Objects, holding the parameters to the method. The XCAT composition tool adds a uses port dynamically, connects to the component's provides port, and invokes the desired method. If, at any step, there is a failure, an XCATException is thrown.


Last modified: Mon Apr 8 16:36:24 EST 2002