org.dasein.cloud.vsphere.compute
Class Vm

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

public class Vm
extends Object
implements VirtualMachineSupport


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 clone(String serverId, String intoDcId, String name, String description, boolean powerOn, String... firewallIds)
           
 void disableAnalytics(String serverId)
           
 void enableAnalytics(String serverId)
           
 String getConsoleOutput(String serverId)
           
 int getMaximumVirtualMachineCount()
           
 VirtualMachineProduct getProduct(String productId)
           
 String getProviderTermForServer(Locale locale)
           
 VirtualMachine getVirtualMachine(String serverId)
           
 VmStatistics getVMStatistics(String serverId, long start, long end)
           
 Collection<VmStatistics> getVMStatisticsForPeriod(String serverId, long start, long end)
           
 Requirement identifyPasswordRequirement()
           
 Requirement identifyRootVolumeRequirement()
           
 Requirement identifyShellKeyRequirement()
           
 Requirement identifyVlanRequirement()
           
 boolean isAPITerminationPreventable()
           
 boolean isBasicAnalyticsSupported()
           
 boolean isExtendedAnalyticsSupported()
           
 boolean isSubscribed()
           
 boolean isUserDataSupported()
           
 VirtualMachine launch(String templateId, VirtualMachineProduct product, String dataCenterId, String serverName, String description, String withKey, String inVlanId, boolean withMonitoring, boolean forImaging, String... firewalls)
           
 VirtualMachine launch(String templateId, VirtualMachineProduct product, String dataCenterId, String serverName, String description, String withKeypairId, String inVlanId, boolean withMonitoring, boolean asSandbox, String[] firewalls, Tag... tags)
           
 VirtualMachine launch(VMLaunchOptions withLaunchOptions)
           
 Collection<String> listFirewalls(String serverId)
           
 Collection<VirtualMachineProduct> listProducts(Architecture architecture)
           
 Iterable<Architecture> listSupportedArchitectures()
           
 Collection<VirtualMachine> listVirtualMachines()
           
 String[] mapServiceAction(ServiceAction action)
           
 void pause(String vmId)
           
 void reboot(String serverId)
           
 void resume(String serverId)
           
 void start(String serverId)
           
 void stop(String serverId)
           
 boolean supportsAnalytics()
           
 boolean supportsPauseUnpause(VirtualMachine vm)
           
 boolean supportsStartStop(VirtualMachine vm)
           
 boolean supportsSuspendResume(VirtualMachine vm)
           
 void suspend(String serverId)
           
 void terminate(String serverId)
           
 void unpause(String vmId)
           
 
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
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
Throws:
InternalException
CloudException

getConsoleOutput

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

getMaximumVirtualMachineCount

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

listFirewalls

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

getProduct

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

getProviderTermForServer

@Nonnull
public String getProviderTermForServer(@Nonnull
                                               Locale locale)
Specified by:
getProviderTermForServer in interface VirtualMachineSupport

getVirtualMachine

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

getVMStatistics

@Nullable
public VmStatistics getVMStatistics(@Nonnull
                                             String serverId,
                                             long start,
                                             long end)
                             throws InternalException,
                                    CloudException
Specified by:
getVMStatistics in interface VirtualMachineSupport
Throws:
InternalException
CloudException

getVMStatisticsForPeriod

@Nonnull
public Collection<VmStatistics> getVMStatisticsForPeriod(@Nonnull
                                                                 String serverId,
                                                                 long start,
                                                                 long end)
                                                  throws InternalException,
                                                         CloudException
Specified by:
getVMStatisticsForPeriod in interface VirtualMachineSupport
Throws:
InternalException
CloudException

identifyPasswordRequirement

@Nonnull
public Requirement identifyPasswordRequirement()
                                        throws CloudException,
                                               InternalException
Specified by:
identifyPasswordRequirement in interface VirtualMachineSupport
Throws:
CloudException
InternalException

identifyRootVolumeRequirement

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

identifyShellKeyRequirement

@Nonnull
public Requirement identifyShellKeyRequirement()
                                        throws CloudException,
                                               InternalException
Specified by:
identifyShellKeyRequirement in interface VirtualMachineSupport
Throws:
CloudException
InternalException

identifyVlanRequirement

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

isAPITerminationPreventable

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

isBasicAnalyticsSupported

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

isExtendedAnalyticsSupported

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

listProducts

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

listSupportedArchitectures

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

launch

@Nonnull
public VirtualMachine launch(@Nonnull
                                     String templateId,
                                     @Nonnull
                                     VirtualMachineProduct product,
                                     @Nullable
                                     String dataCenterId,
                                     @Nonnull
                                     String serverName,
                                     @Nonnull
                                     String description,
                                     @Nullable
                                     String withKey,
                                     @Nullable
                                     String inVlanId,
                                     boolean withMonitoring,
                                     boolean forImaging,
                                     @Nullable
                                     String... firewalls)
                      throws InternalException,
                             CloudException
Specified by:
launch in interface VirtualMachineSupport
Throws:
InternalException
CloudException

launch

@Nonnull
public VirtualMachine launch(@Nonnull
                                     String templateId,
                                     @Nonnull
                                     VirtualMachineProduct product,
                                     @Nullable
                                     String dataCenterId,
                                     @Nonnull
                                     String serverName,
                                     @Nonnull
                                     String description,
                                     String withKeypairId,
                                     String inVlanId,
                                     boolean withMonitoring,
                                     boolean asSandbox,
                                     @Nullable
                                     String[] firewalls,
                                     @Nullable
                                     Tag... tags)
                      throws InternalException,
                             CloudException
Specified by:
launch in interface VirtualMachineSupport
Throws:
InternalException
CloudException

launch

@Nonnull
public VirtualMachine launch(VMLaunchOptions withLaunchOptions)
                      throws CloudException,
                             InternalException
Specified by:
launch in interface VirtualMachineSupport
Throws:
CloudException
InternalException

listVirtualMachines

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

pause

public void pause(@Nonnull
                  String vmId)
           throws InternalException,
                  CloudException
Specified by:
pause in interface VirtualMachineSupport
Throws:
InternalException
CloudException

mapServiceAction

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

enableAnalytics

public void enableAnalytics(@Nonnull
                            String serverId)
                     throws InternalException,
                            CloudException
Specified by:
enableAnalytics in interface VirtualMachineSupport
Throws:
InternalException
CloudException

resume

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

stop

public void stop(@Nonnull
                 String serverId)
          throws InternalException,
                 CloudException
Specified by:
stop in interface VirtualMachineSupport
Throws:
InternalException
CloudException

suspend

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

reboot

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

terminate

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

unpause

public void unpause(@Nonnull
                    String vmId)
             throws CloudException,
                    InternalException
Specified by:
unpause in interface VirtualMachineSupport
Throws:
CloudException
InternalException

disableAnalytics

public void disableAnalytics(String serverId)
                      throws InternalException,
                             CloudException
Specified by:
disableAnalytics in interface VirtualMachineSupport
Throws:
InternalException
CloudException

isSubscribed

public boolean isSubscribed()
                     throws CloudException,
                            InternalException
Specified by:
isSubscribed in interface VirtualMachineSupport
Throws:
CloudException
InternalException

isUserDataSupported

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

supportsAnalytics

public boolean supportsAnalytics()
                          throws CloudException,
                                 InternalException
Specified by:
supportsAnalytics in interface VirtualMachineSupport
Throws:
CloudException
InternalException

supportsPauseUnpause

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

supportsStartStop

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

supportsSuspendResume

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


Copyright © 2012 enStratus Networks Inc. All Rights Reserved.