com.novell.zos.jdl
Class VmSpec

java.lang.Object
  extended by com.novell.zos.jdl.VmSpec

public class VmSpec
extends java.lang.Object

Defines the attributes for creating a VM.
An instance of this class is passed to resource.createInstance(), resource.createTemplate(), resource.clone().

Example of using VmSpec for creating a clone on a named host from a template resource

      template = getMatrix().getGridObject(TYPE_RESOURCE,"myTemplate")
      spec = VmSpec()
      spec.setNewName("newvm")
      spec.setHost('vmhost-qa')
      template.clone(spec)
 
If the host and repository is not set, the default is to use the source resource object's repository as the destination repository.


Constructor Summary
VmSpec()
          Construct a default VmSpec.
 
Method Summary
 void setAutoprep(org.python.core.PyDictionary autoprep)
          Set facts for personalizing the new VM.
 void setHost(java.lang.String host)
          Set the recommended host for the new VM if required by the provisioning adapter.
 void setNewName(java.lang.String name)
          Set the name of the to be created VM.
 void setRepository(java.lang.String repository)
          Set the name of a repository for creating the VM if required by the provisioning adapter.
 void setUseAutoprep(boolean value)
          Set whether to use the autoprep facts on the resource for creating the new VM.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VmSpec

public VmSpec()
Construct a default VmSpec.

Method Detail

setNewName

public void setNewName(java.lang.String name)
Set the name of the to be created VM. Default is to generate a name from the source.

Parameters:
name - Name of new VM

setRepository

public void setRepository(java.lang.String repository)
Set the name of a repository for creating the VM if required by the provisioning adapter.
Default is to use the source repository.

Parameters:
repository - Name of repository to create in

setAutoprep

public void setAutoprep(org.python.core.PyDictionary autoprep)
Set facts for personalizing the new VM.
The supplied facts will override any facts defined on the source resource.

Parameters:
autoprep - Dictionary of fact name and value to use for creating the VM

setHost

public void setHost(java.lang.String host)
Set the recommended host for the new VM if required by the provisioning adapter.
If this is not set, the next provision action will choose an appropriate vm host. Default is no recommended host is set on the new VM.

Parameters:
host - ID of Vm host to set as the recommended Vm Host

setUseAutoprep

public void setUseAutoprep(boolean value)
Set whether to use the autoprep facts on the resource for creating the new VM.
Default is True. False indicates to create a copy.

Parameters:
value - True to use autoprep, false to not


Copyright (c) 2011 Novell, Inc. All rights reserved.