org.dasein.cloud.vsphere.compute
Class Vm

java.lang.Object
  extended by org.dasein.cloud.compute.AbstractVMSupport
      extended by org.dasein.cloud.vsphere.compute.Vm
All Implemented Interfaces:
AccessControlledService, VirtualMachineSupport

public class Vm
extends AbstractVMSupport


Field Summary
 
Fields inherited from interface org.dasein.cloud.compute.VirtualMachineSupport
ANY, BOOT, CLONE, CREATE_VM, GET_VM, LIST_VM, PAUSE, REBOOT, REMOVE_VM, TOGGLE_ANALYTICS, VIEW_ANALYTICS, VIEW_CONSOLE
 
Method Summary
 VirtualMachine alterVirtualMachine(String vmId, VMScalingOptions options)
           
 VirtualMachine clone(String serverId, String intoDcId, String name, String description, boolean powerOn, String... firewallIds)
           
 VMScalingCapabilities describeVerticalScalingCapabilities()
           
 String getConsoleOutput(String serverId)
           
 int getCostFactor(VmState state)
           
 int getMaximumVirtualMachineCount()
           
 VirtualMachineProduct getProduct(String productId)
           
 String getProviderTermForServer(Locale locale)
           
 VirtualMachine getVirtualMachine(String serverId)
           
 Requirement identifyImageRequirement(ImageClass cls)
           
 Requirement identifyPasswordRequirement(Platform platform)
           
 Requirement identifyRootVolumeRequirement()
           
 Requirement identifyShellKeyRequirement(Platform platform)
           
 Requirement identifyStaticIPRequirement()
           
 Requirement identifyVlanRequirement()
           
 boolean isAPITerminationPreventable()
           
 boolean isBasicAnalyticsSupported()
           
 boolean isExtendedAnalyticsSupported()
           
 boolean isSubscribed()
           
 boolean isUserDataSupported()
           
 VirtualMachine launch(VMLaunchOptions withLaunchOptions)
           
 Collection<String> listFirewalls(String serverId)
           
 Collection<VirtualMachineProduct> listProducts(Architecture architecture)
           
 Iterable<Architecture> listSupportedArchitectures()
           
 Collection<VirtualMachine> listVirtualMachines()
           
 Iterable<ResourceStatus> listVirtualMachineStatus()
           
 String[] mapServiceAction(ServiceAction action)
           
 void reboot(String serverId)
           
 void resume(String serverId)
           
 void start(String serverId)
           
 void stop(String vmId, boolean force)
           
 boolean supportsPauseUnpause(VirtualMachine vm)
           
 boolean supportsStartStop(VirtualMachine vm)
           
 boolean supportsSuspendResume(VirtualMachine vm)
           
 void suspend(String serverId)
           
 void terminate(String serverId)
           
 void terminate(String vmId, String explanation)
           
 
Methods inherited from class org.dasein.cloud.compute.AbstractVMSupport
disableAnalytics, enableAnalytics, getContext, getProvider, getVMProductsResource, getVMStatistics, getVMStatisticsForPeriod, identifyPasswordRequirement, identifyShellKeyRequirement, launch, launch, listVirtualMachines, pause, removeTags, removeTags, stop, supportsAnalytics, unpause, updateTags, updateTags
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

start

public void start(@Nonnull
                  String serverId)
           throws InternalException,
                  CloudException
Specified by:
start in interface VirtualMachineSupport
Overrides:
start in class AbstractVMSupport
Throws:
InternalException
CloudException

alterVirtualMachine

public VirtualMachine alterVirtualMachine(@Nonnull
                                          String vmId,
                                          @Nonnull
                                          VMScalingOptions options)
                                   throws InternalException,
                                          CloudException
Specified by:
alterVirtualMachine in interface VirtualMachineSupport
Overrides:
alterVirtualMachine in class AbstractVMSupport
Throws:
InternalException
CloudException

clone

@Nonnull
public VirtualMachine clone(@Nonnull
                                    String serverId,
                                    @Nullable
                                    String intoDcId,
                                    @Nonnull
                                    String name,
                                    @Nonnull
                                    String description,
                                    boolean powerOn,
                                    @Nullable
                                    String... firewallIds)
                     throws InternalException,
                            CloudException
Specified by:
clone in interface VirtualMachineSupport
Overrides:
clone in class AbstractVMSupport
Throws:
InternalException
CloudException

describeVerticalScalingCapabilities

@Nullable
public VMScalingCapabilities describeVerticalScalingCapabilities()
                                                          throws CloudException,
                                                                 InternalException
Specified by:
describeVerticalScalingCapabilities in interface VirtualMachineSupport
Overrides:
describeVerticalScalingCapabilities in class AbstractVMSupport
Throws:
CloudException
InternalException

getConsoleOutput

@Nonnull
public String getConsoleOutput(@Nonnull
                                       String serverId)
                        throws InternalException,
                               CloudException
Specified by:
getConsoleOutput in interface VirtualMachineSupport
Overrides:
getConsoleOutput in class AbstractVMSupport
Throws:
InternalException
CloudException

getCostFactor

public int getCostFactor(@Nonnull
                         VmState state)
                  throws InternalException,
                         CloudException
Specified by:
getCostFactor in interface VirtualMachineSupport
Overrides:
getCostFactor in class AbstractVMSupport
Throws:
InternalException
CloudException

getMaximumVirtualMachineCount

public int getMaximumVirtualMachineCount()
                                  throws CloudException,
                                         InternalException
Specified by:
getMaximumVirtualMachineCount in interface VirtualMachineSupport
Overrides:
getMaximumVirtualMachineCount in class AbstractVMSupport
Throws:
CloudException
InternalException

listFirewalls

@Nonnull
public Collection<String> listFirewalls(@Nonnull
                                                String serverId)
                                 throws InternalException,
                                        CloudException
Specified by:
listFirewalls in interface VirtualMachineSupport
Overrides:
listFirewalls in class AbstractVMSupport
Throws:
InternalException
CloudException

getProduct

@Nullable
public VirtualMachineProduct getProduct(@Nonnull
                                                 String productId)
                                 throws InternalException,
                                        CloudException
Specified by:
getProduct in interface VirtualMachineSupport
Overrides:
getProduct in class AbstractVMSupport
Throws:
InternalException
CloudException

getProviderTermForServer

@Nonnull
public String getProviderTermForServer(@Nonnull
                                               Locale locale)

getVirtualMachine

@Nullable
public VirtualMachine getVirtualMachine(@Nonnull
                                                 String serverId)
                                 throws InternalException,
                                        CloudException
Specified by:
getVirtualMachine in interface VirtualMachineSupport
Overrides:
getVirtualMachine in class AbstractVMSupport
Throws:
InternalException
CloudException

identifyImageRequirement

@Nonnull
public Requirement identifyImageRequirement(@Nonnull
                                                    ImageClass cls)
                                     throws CloudException,
                                            InternalException
Specified by:
identifyImageRequirement in interface VirtualMachineSupport
Overrides:
identifyImageRequirement in class AbstractVMSupport
Throws:
CloudException
InternalException

identifyPasswordRequirement

@Nonnull
public Requirement identifyPasswordRequirement(Platform platform)
                                        throws CloudException,
                                               InternalException
Specified by:
identifyPasswordRequirement in interface VirtualMachineSupport
Overrides:
identifyPasswordRequirement in class AbstractVMSupport
Throws:
CloudException
InternalException

identifyRootVolumeRequirement

@Nonnull
public Requirement identifyRootVolumeRequirement()
                                          throws CloudException,
                                                 InternalException
Specified by:
identifyRootVolumeRequirement in interface VirtualMachineSupport
Overrides:
identifyRootVolumeRequirement in class AbstractVMSupport
Throws:
CloudException
InternalException

identifyShellKeyRequirement

@Nonnull
public Requirement identifyShellKeyRequirement(Platform platform)
                                        throws CloudException,
                                               InternalException
Specified by:
identifyShellKeyRequirement in interface VirtualMachineSupport
Overrides:
identifyShellKeyRequirement in class AbstractVMSupport
Throws:
CloudException
InternalException

identifyStaticIPRequirement

@Nonnull
public Requirement identifyStaticIPRequirement()
                                        throws CloudException,
                                               InternalException
Specified by:
identifyStaticIPRequirement in interface VirtualMachineSupport
Overrides:
identifyStaticIPRequirement in class AbstractVMSupport
Throws:
CloudException
InternalException

identifyVlanRequirement

@Nonnull
public Requirement identifyVlanRequirement()
                                    throws CloudException,
                                           InternalException
Specified by:
identifyVlanRequirement in interface VirtualMachineSupport
Overrides:
identifyVlanRequirement in class AbstractVMSupport
Throws:
CloudException
InternalException

isAPITerminationPreventable

public boolean isAPITerminationPreventable()
                                    throws CloudException,
                                           InternalException
Specified by:
isAPITerminationPreventable in interface VirtualMachineSupport
Overrides:
isAPITerminationPreventable in class AbstractVMSupport
Throws:
CloudException
InternalException

isBasicAnalyticsSupported

public boolean isBasicAnalyticsSupported()
                                  throws CloudException,
                                         InternalException
Specified by:
isBasicAnalyticsSupported in interface VirtualMachineSupport
Overrides:
isBasicAnalyticsSupported in class AbstractVMSupport
Throws:
CloudException
InternalException

isExtendedAnalyticsSupported

public boolean isExtendedAnalyticsSupported()
                                     throws CloudException,
                                            InternalException
Specified by:
isExtendedAnalyticsSupported in interface VirtualMachineSupport
Overrides:
isExtendedAnalyticsSupported in class AbstractVMSupport
Throws:
CloudException
InternalException

listProducts

@Nonnull
public Collection<VirtualMachineProduct> listProducts(@Nonnull
                                                              Architecture architecture)
                                               throws InternalException,
                                                      CloudException
Specified by:
listProducts in interface VirtualMachineSupport
Overrides:
listProducts in class AbstractVMSupport
Throws:
InternalException
CloudException

listSupportedArchitectures

public Iterable<Architecture> listSupportedArchitectures()
                                                  throws InternalException,
                                                         CloudException
Specified by:
listSupportedArchitectures in interface VirtualMachineSupport
Overrides:
listSupportedArchitectures in class AbstractVMSupport
Throws:
InternalException
CloudException

listVirtualMachineStatus

@Nonnull
public Iterable<ResourceStatus> listVirtualMachineStatus()
                                                  throws InternalException,
                                                         CloudException
Specified by:
listVirtualMachineStatus in interface VirtualMachineSupport
Overrides:
listVirtualMachineStatus in class AbstractVMSupport
Throws:
InternalException
CloudException

launch

@Nonnull
public VirtualMachine launch(@Nonnull
                                     VMLaunchOptions withLaunchOptions)
                      throws CloudException,
                             InternalException
Throws:
CloudException
InternalException

listVirtualMachines

@Nonnull
public Collection<VirtualMachine> listVirtualMachines()
                                               throws InternalException,
                                                      CloudException
Specified by:
listVirtualMachines in interface VirtualMachineSupport
Overrides:
listVirtualMachines in class AbstractVMSupport
Throws:
InternalException
CloudException

mapServiceAction

@Nonnull
public String[] mapServiceAction(@Nonnull
                                         ServiceAction action)
Specified by:
mapServiceAction in interface AccessControlledService
Overrides:
mapServiceAction in class AbstractVMSupport

resume

public void resume(@Nonnull
                   String serverId)
            throws InternalException,
                   CloudException
Specified by:
resume in interface VirtualMachineSupport
Overrides:
resume in class AbstractVMSupport
Throws:
InternalException
CloudException

stop

public void stop(@Nonnull
                 String vmId,
                 boolean force)
          throws InternalException,
                 CloudException
Specified by:
stop in interface VirtualMachineSupport
Overrides:
stop in class AbstractVMSupport
Throws:
InternalException
CloudException

suspend

public void suspend(@Nonnull
                    String serverId)
             throws InternalException,
                    CloudException
Specified by:
suspend in interface VirtualMachineSupport
Overrides:
suspend in class AbstractVMSupport
Throws:
InternalException
CloudException

reboot

public void reboot(@Nonnull
                   String serverId)
            throws CloudException,
                   InternalException
Specified by:
reboot in interface VirtualMachineSupport
Overrides:
reboot in class AbstractVMSupport
Throws:
CloudException
InternalException

terminate

public void terminate(@Nonnull
                      String serverId)
               throws InternalException,
                      CloudException
Specified by:
terminate in interface VirtualMachineSupport
Overrides:
terminate in class AbstractVMSupport
Throws:
InternalException
CloudException

terminate

public void terminate(@Nonnull
                      String vmId,
                      String explanation)
               throws InternalException,
                      CloudException
Throws:
InternalException
CloudException

isSubscribed

public boolean isSubscribed()
                     throws CloudException,
                            InternalException
Throws:
CloudException
InternalException

isUserDataSupported

public boolean isUserDataSupported()
                            throws CloudException,
                                   InternalException
Specified by:
isUserDataSupported in interface VirtualMachineSupport
Overrides:
isUserDataSupported in class AbstractVMSupport
Throws:
CloudException
InternalException

supportsPauseUnpause

public boolean supportsPauseUnpause(@Nonnull
                                    VirtualMachine vm)
Specified by:
supportsPauseUnpause in interface VirtualMachineSupport
Overrides:
supportsPauseUnpause in class AbstractVMSupport

supportsStartStop

public boolean supportsStartStop(@Nonnull
                                 VirtualMachine vm)
Specified by:
supportsStartStop in interface VirtualMachineSupport
Overrides:
supportsStartStop in class AbstractVMSupport

supportsSuspendResume

public boolean supportsSuspendResume(@Nonnull
                                     VirtualMachine vm)
Specified by:
supportsSuspendResume in interface VirtualMachineSupport
Overrides:
supportsSuspendResume in class AbstractVMSupport


Copyright © 2013 enStratus Networks Inc. All Rights Reserved.