|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.zos.jdl.BuildSpec
public class BuildSpec
Defines the attributes for building a new VM.
An instance of this class is passed to resource.build()
.
Example of using BuildSpec
for creating a new VM:
vm = getMatrix().createResource("newvm",ResourceInfo.TYPE_VM_INSTANCE,True) vm.setFact("resource.provisioner.job", "xen30" ) vm.setFact("resource.vm.cpu.architecture","x86_64") vm.setFact("resource.vm.hvm",False) vm.setFact("resource.vm.vdisksize",8192) vm.setFact("resource.vm.memory",1024) vm.setFact("resource.os.family","linux") spec = BuildSpec() spec.setConfig( { "response" : responseFileText } ) vm.build(spec)
Where 'spec' is the required key and value pairs for the dictionary
passed to the provisioning adapter and used to create the VM. It is
saved on the VM under the resource.vm.spec
fact. Setting
this fact directly is an alternative to supplying the configuation
in the BuildSpec
but the BuildSpec will override the fact
contents.
E.g.
"response" : text for VM builder tool
Constructor Summary | |
---|---|
BuildSpec()
Construct a default BuildSpec. |
Method Summary | |
---|---|
void |
setAssignHostImmediately(boolean value)
Set whether to wait or assign the host immediately. |
void |
setConfig(org.python.core.PyDictionary config)
Set configuration for building the new VM. |
void |
setHost(java.lang.String host)
If set, forces the use of the specified VM Host to build the VM on. |
void |
setPriority(int priority)
Set a priority for vmhost allocation for this build operation using supplied integer constant. |
void |
setPriority(java.lang.String priority)
Set a priority for vmhost allocation for this build operation using supplied string. |
void |
setRepository(java.lang.String repository)
If set, forces the use of the specified Repository to build the VM in. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BuildSpec()
Method Detail |
---|
public void setRepository(java.lang.String repository)
repository
- Name of repository to create inpublic void setConfig(org.python.core.PyDictionary config)
config
- Dictionary of name and value pairs to use for building
the VMpublic void setHost(java.lang.String host)
host
- ID of Vm Host to create onpublic void setPriority(java.lang.String priority)
priority
- Priority to set in the user's bandpublic void setPriority(int priority)
priority
- Priority to set in the user's bandpublic void setAssignHostImmediately(boolean value)
value
- True to assign immediately, false to wait
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |