org.dasein.cloud.cloudstack.compute
Class VirtualMachines
java.lang.Object
org.dasein.cloud.cloudstack.compute.VirtualMachines
- All Implemented Interfaces:
- AccessControlledService, VirtualMachineSupport
public class VirtualMachines
- extends Object
- implements VirtualMachineSupport
|
Field Summary |
static org.apache.log4j.Logger |
logger
|
| 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()
|
void |
disableAnalytics(String vmId)
|
void |
enableAnalytics(String vmId)
|
String |
getConsoleOutput(String serverId)
|
int |
getCostFactor(VmState state)
|
int |
getMaximumVirtualMachineCount()
|
VirtualMachineProduct |
getProduct(String productId)
|
String |
getProviderTermForServer(Locale locale)
|
VirtualMachine |
getVirtualMachine(String serverId)
|
VmStatistics |
getVMStatistics(String serverId,
long startTimestamp,
long endTimestamp)
|
Iterable<VmStatistics> |
getVMStatisticsForPeriod(String serverId,
long arg1,
long arg2)
|
Requirement |
identifyImageRequirement(ImageClass cls)
|
Requirement |
identifyPasswordRequirement()
|
Requirement |
identifyRootVolumeRequirement()
|
Requirement |
identifyShellKeyRequirement()
|
Requirement |
identifyStaticIPRequirement()
|
Requirement |
identifyVlanRequirement()
|
boolean |
isAPITerminationPreventable()
|
boolean |
isBasicAnalyticsSupported()
|
boolean |
isExtendedAnalyticsSupported()
|
boolean |
isSubscribed()
|
boolean |
isUserDataSupported()
|
VirtualMachine |
launch(String imageId,
VirtualMachineProduct product,
String inZoneId,
String name,
String description,
String usingKey,
String withVlanId,
boolean withMonitoring,
boolean asSandbox,
String... protectedByFirewalls)
Deprecated. |
VirtualMachine |
launch(String imageId,
VirtualMachineProduct product,
String inZoneId,
String name,
String description,
String usingKey,
String withVlanId,
boolean withMonitoring,
boolean asSandbox,
String[] protectedByFirewalls,
Tag... tags)
Deprecated. |
VirtualMachine |
launch(VMLaunchOptions withLaunchOptions)
|
Iterable<String> |
listFirewalls(String vmId)
|
Iterable<VirtualMachineProduct> |
listProducts(Architecture architecture)
|
Iterable<Architecture> |
listSupportedArchitectures()
|
Iterable<VirtualMachine> |
listVirtualMachines()
|
Iterable<ResourceStatus> |
listVirtualMachineStatus()
|
String[] |
mapServiceAction(ServiceAction action)
|
void |
pause(String vmId)
|
void |
reboot(String serverId)
|
void |
resume(String vmId)
|
void |
start(String serverId)
|
void |
stop(String serverId)
|
void |
stop(String vmId,
boolean force)
|
boolean |
supportsAnalytics()
|
boolean |
supportsPauseUnpause(VirtualMachine vm)
|
boolean |
supportsStartStop(VirtualMachine vm)
|
boolean |
supportsSuspendResume(VirtualMachine vm)
|
void |
suspend(String vmId)
|
void |
terminate(String serverId)
|
void |
unpause(String vmId)
|
void |
updateTags(String vmId,
Tag... tags)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static final org.apache.log4j.Logger logger
VirtualMachines
public VirtualMachines(CSCloud provider)
alterVirtualMachine
public VirtualMachine alterVirtualMachine(@Nonnull
String vmId,
@Nonnull
VMScalingOptions options)
throws InternalException,
CloudException
- Specified by:
alterVirtualMachine in interface VirtualMachineSupport
- Throws:
InternalException
CloudException
clone
@Nonnull
public VirtualMachine clone(@Nonnull
String serverId,
@Nonnull
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
describeVerticalScalingCapabilities
public VMScalingCapabilities describeVerticalScalingCapabilities()
throws CloudException,
InternalException
- Specified by:
describeVerticalScalingCapabilities in interface VirtualMachineSupport
- Throws:
CloudException
InternalException
disableAnalytics
public void disableAnalytics(@Nonnull
String vmId)
throws InternalException,
CloudException
- Specified by:
disableAnalytics in interface VirtualMachineSupport
- Throws:
InternalException
CloudException
enableAnalytics
public void enableAnalytics(@Nonnull
String vmId)
throws InternalException,
CloudException
- Specified by:
enableAnalytics 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
getCostFactor
public int getCostFactor(@Nonnull
VmState state)
throws InternalException,
CloudException
- Specified by:
getCostFactor in interface VirtualMachineSupport
- Throws:
InternalException
CloudException
getMaximumVirtualMachineCount
public int getMaximumVirtualMachineCount()
throws CloudException,
InternalException
- Specified by:
getMaximumVirtualMachineCount in interface VirtualMachineSupport
- Throws:
CloudException
InternalException
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
@Nonnull
public VmStatistics getVMStatistics(@Nonnull
String serverId,
@Nonnegative
long startTimestamp,
@Nonnegative
long endTimestamp)
throws InternalException,
CloudException
- Specified by:
getVMStatistics in interface VirtualMachineSupport
- Throws:
InternalException
CloudException
getVMStatisticsForPeriod
@Nonnull
public Iterable<VmStatistics> getVMStatisticsForPeriod(@Nonnull
String serverId,
@Nonnegative
long arg1,
@Nonnegative
long arg2)
throws InternalException,
CloudException
- Specified by:
getVMStatisticsForPeriod in interface VirtualMachineSupport
- Throws:
InternalException
CloudException
identifyImageRequirement
@Nonnull
public Requirement identifyImageRequirement(@Nonnull
ImageClass cls)
throws CloudException,
InternalException
- Specified by:
identifyImageRequirement in interface VirtualMachineSupport
- Throws:
CloudException
InternalException
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
identifyStaticIPRequirement
@Nonnull
public Requirement identifyStaticIPRequirement()
throws CloudException,
InternalException
- Specified by:
identifyStaticIPRequirement 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
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
launch
@Nonnull
public VirtualMachine launch(@Nonnull
VMLaunchOptions withLaunchOptions)
throws CloudException,
InternalException
- Specified by:
launch in interface VirtualMachineSupport
- Throws:
CloudException
InternalException
launch
@Deprecated
@Nonnull
public VirtualMachine launch(@Nonnull
String imageId,
@Nonnull
VirtualMachineProduct product,
@Nonnull
String inZoneId,
@Nonnull
String name,
@Nonnull
String description,
@Nullable
String usingKey,
@Nullable
String withVlanId,
boolean withMonitoring,
boolean asSandbox,
@Nullable
String... protectedByFirewalls)
throws InternalException,
CloudException
- Deprecated.
- Specified by:
launch in interface VirtualMachineSupport
- Throws:
InternalException
CloudException
launch
@Deprecated
@Nonnull
public VirtualMachine launch(@Nonnull
String imageId,
@Nonnull
VirtualMachineProduct product,
@Nonnull
String inZoneId,
@Nonnull
String name,
@Nonnull
String description,
@Nullable
String usingKey,
@Nullable
String withVlanId,
boolean withMonitoring,
boolean asSandbox,
@Nullable
String[] protectedByFirewalls,
@Nullable
Tag... tags)
throws InternalException,
CloudException
- Deprecated.
- Specified by:
launch in interface VirtualMachineSupport
- Throws:
InternalException
CloudException
listFirewalls
@Nonnull
public Iterable<String> listFirewalls(@Nonnull
String vmId)
throws InternalException,
CloudException
- Specified by:
listFirewalls in interface VirtualMachineSupport
- Throws:
InternalException
CloudException
listProducts
@Nonnull
public Iterable<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
listVirtualMachineStatus
@Nonnull
public Iterable<ResourceStatus> listVirtualMachineStatus()
throws InternalException,
CloudException
- Specified by:
listVirtualMachineStatus in interface VirtualMachineSupport
- Throws:
InternalException
CloudException
listVirtualMachines
@Nonnull
public Iterable<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
reboot
public void reboot(@Nonnull
String serverId)
throws CloudException,
InternalException
- Specified by:
reboot in interface VirtualMachineSupport
- Throws:
CloudException
InternalException
resume
public void resume(@Nonnull
String vmId)
throws CloudException,
InternalException
- Specified by:
resume in interface VirtualMachineSupport
- Throws:
CloudException
InternalException
start
public void start(@Nonnull
String serverId)
throws InternalException,
CloudException
- Specified by:
start 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
stop
public void stop(@Nonnull
String vmId,
boolean force)
throws InternalException,
CloudException
- Specified by:
stop in interface VirtualMachineSupport
- Throws:
InternalException
CloudException
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
suspend
public void suspend(@Nonnull
String vmId)
throws CloudException,
InternalException
- Specified by:
suspend 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
updateTags
public void updateTags(@Nonnull
String vmId,
@Nonnull
Tag... tags)
throws CloudException,
InternalException
- Specified by:
updateTags in interface VirtualMachineSupport
- Throws:
CloudException
InternalException
Copyright © 2012 enStratus Networks Inc. All Rights Reserved.