org.jclouds.cloudstack.options
Class DeployVirtualMachineOptions

java.lang.Object
  extended by org.jclouds.http.options.BaseHttpRequestOptions
      extended by org.jclouds.cloudstack.options.AccountInDomainOptions
          extended by org.jclouds.cloudstack.options.DeployVirtualMachineOptions
All Implemented Interfaces:
HttpRequestOptions

public class DeployVirtualMachineOptions
extends AccountInDomainOptions

Options used to control what disk offerings are returned

Author:
Adrian Cole
See Also:

Nested Class Summary
static class DeployVirtualMachineOptions.Builder
           
 
Field Summary
static DeployVirtualMachineOptions NONE
           
 
Fields inherited from class org.jclouds.http.options.BaseHttpRequestOptions
formParameters, headers, matrixParameters, pathSuffix, payload, queryParameters
 
Constructor Summary
DeployVirtualMachineOptions()
           
 
Method Summary
 DeployVirtualMachineOptions accountInDomain(String account, long domain)
          
 DeployVirtualMachineOptions dataDiskSize(long dataDiskSize)
           
 DeployVirtualMachineOptions diskOfferingId(long diskofferingid)
          the ID of the disk offering for the virtual machine.
 DeployVirtualMachineOptions displayName(String displayName)
          sets the displayName - just for display purposes.
 DeployVirtualMachineOptions domainId(long domainId)
          
 Iterable<Long> getNetworkIds()
           
 DeployVirtualMachineOptions group(String group)
           
 DeployVirtualMachineOptions hypervisor(String hypervisor)
           
 DeployVirtualMachineOptions ipOnDefaultNetwork(String ipOnDefaultNetwork)
           
 DeployVirtualMachineOptions ipsToNetworks(Map<String,Long> ipsToNetworks)
           
 DeployVirtualMachineOptions keyPair(String keyPair)
           
 DeployVirtualMachineOptions name(String name)
          sets the hostName, it will be propagated down to the backend and set on the user vm.
 DeployVirtualMachineOptions networkId(long networkId)
           
 DeployVirtualMachineOptions networkIds(Iterable<Long> networkIds)
           
 DeployVirtualMachineOptions securityGroupId(long securityGroupId)
           
 DeployVirtualMachineOptions securityGroupIds(Iterable<Long> securityGroupIds)
           
 DeployVirtualMachineOptions userData(byte[] unencodedData)
           
 
Methods inherited from class org.jclouds.http.options.BaseHttpRequestOptions
buildFormParameters, buildMatrixParameters, buildPathSuffix, buildQueryParameters, buildRequestHeaders, buildStringPayload, equals, getFirstFormOrNull, getFirstHeaderOrNull, getFirstMatrixOrNull, getFirstQueryOrNull, hashCode, replaceHeader, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final DeployVirtualMachineOptions NONE
Constructor Detail

DeployVirtualMachineOptions

public DeployVirtualMachineOptions()
Method Detail

diskOfferingId

public DeployVirtualMachineOptions diskOfferingId(long diskofferingid)
the ID of the disk offering for the virtual machine. If the template is of ISO format, the diskOfferingId is for the root disk volume. Otherwise this parameter is used to dinidcate the offering for the data disk volume. If the templateId parameter passed is from a Template object, the diskOfferingId refers to a DATA Disk Volume created. If the templateId parameter passed is from an ISO object, the diskOfferingId refers to a ROOT Disk Volume created.

Parameters:
diskofferingid - the ID of the disk offering

displayName

public DeployVirtualMachineOptions displayName(String displayName)
sets the displayName - just for display purposes. We don't pass this parameter to the backend.

Parameters:
displayName - an optional user generated name for the virtual machine

group

public DeployVirtualMachineOptions group(String group)
Parameters:
group - an optional group for the virtual machine

hypervisor

public DeployVirtualMachineOptions hypervisor(String hypervisor)
Parameters:
hypervisor - the hypervisor on which to deploy the virtual machine

keyPair

public DeployVirtualMachineOptions keyPair(String keyPair)
Parameters:
keyPair - name of the ssh key pair used to login to the virtual machine

name

public DeployVirtualMachineOptions name(String name)
sets the hostName, it will be propagated down to the backend and set on the user vm. If this parameter is not passed it, it will be defaulted to our usual "i-x-y'

Parameters:
name - host name for the virtual machine

ipOnDefaultNetwork

public DeployVirtualMachineOptions ipOnDefaultNetwork(String ipOnDefaultNetwork)
Parameters:
ipOnDefaultNetwork - the requested ip address (2.2.12 only option)

ipsToNetworks

public DeployVirtualMachineOptions ipsToNetworks(Map<String,Long> ipsToNetworks)
Parameters:
ipsToNetworks - mapping ip addresses to network ids (2.2.12 only option)

networkId

public DeployVirtualMachineOptions networkId(long networkId)
Parameters:
networkId - network id used by virtual machine

networkIds

public DeployVirtualMachineOptions networkIds(Iterable<Long> networkIds)
Parameters:
networkIds - network ids used by virtual machine

getNetworkIds

public Iterable<Long> getNetworkIds()

securityGroupId

public DeployVirtualMachineOptions securityGroupId(long securityGroupId)
Parameters:
securityGroupId - security group applied to the virtual machine. Should be passed only when vm is created from a zone with Basic Network support

securityGroupIds

public DeployVirtualMachineOptions securityGroupIds(Iterable<Long> securityGroupIds)
Parameters:
securityGroupIds - security groups applied to the virtual machine. Should be passed only when vm is created from a zone with Basic Network support

dataDiskSize

public DeployVirtualMachineOptions dataDiskSize(long dataDiskSize)
Parameters:
dataDiskSize - the arbitrary size for the DATADISK volume. Mutually exclusive with diskOfferingId

userData

public DeployVirtualMachineOptions userData(byte[] unencodedData)
Parameters:
unencodedData - an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be base64 encoded before adding it to the request. Currently only HTTP GET is supported. Using HTTP GET (via querystring), you can send up to 2KB of data after base64 encoding.

accountInDomain

public DeployVirtualMachineOptions accountInDomain(String account,
                                                   long domain)

Overrides:
accountInDomain in class AccountInDomainOptions
Parameters:
account - an optional account for the resource
domain - domain id

domainId

public DeployVirtualMachineOptions domainId(long domainId)

Overrides:
domainId in class AccountInDomainOptions
Parameters:
domainId - The domain for the resource


Copyright © 2009-2012 jclouds. All Rights Reserved.