org.dasein.cloud.cloudstack.compute
Class VirtualMachines
java.lang.Object
org.dasein.cloud.compute.AbstractVMSupport
org.dasein.cloud.cloudstack.compute.VirtualMachines
- All Implemented Interfaces:
- AccessControlledService, VirtualMachineSupport
public class VirtualMachines
- extends AbstractVMSupport
|
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 |
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(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()
|
void |
reboot(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 |
terminate(String serverId,
String explanation)
|
| Methods inherited from class org.dasein.cloud.compute.AbstractVMSupport |
alterVirtualMachine, clone, describeVerticalScalingCapabilities, disableAnalytics, enableAnalytics, getConsoleOutput, getContext, getProvider, getVMProductsResource, getVMStatistics, getVMStatisticsForPeriod, identifyPasswordRequirement, identifyShellKeyRequirement, launch, listVirtualMachines, mapServiceAction, pause, removeTags, removeTags, resume, stop, supportsAnalytics, suspend, terminate, unpause, updateTags, updateTags |
| 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)
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
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
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
launch
@Nonnull
public VirtualMachine launch(@Nonnull
VMLaunchOptions withLaunchOptions)
throws CloudException,
InternalException
- 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,
@Nullable
Tag... tags)
throws InternalException,
CloudException
- Deprecated.
- Specified by:
launch in interface VirtualMachineSupport- Overrides:
launch in class AbstractVMSupport
- Throws:
InternalException
CloudException
listFirewalls
@Nonnull
public Iterable<String> listFirewalls(@Nonnull
String vmId)
throws InternalException,
CloudException
- Specified by:
listFirewalls in interface VirtualMachineSupport- Overrides:
listFirewalls in class AbstractVMSupport
- Throws:
InternalException
CloudException
listProducts
@Nonnull
public Iterable<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
listVirtualMachines
@Nonnull
public Iterable<VirtualMachine> listVirtualMachines()
throws InternalException,
CloudException
- Specified by:
listVirtualMachines in interface VirtualMachineSupport- Overrides:
listVirtualMachines 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
start
public void start(@Nonnull
String serverId)
throws InternalException,
CloudException
- Specified by:
start in interface VirtualMachineSupport- Overrides:
start 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
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
terminate
public void terminate(@Nonnull
String serverId,
@Nullable
String explanation)
throws InternalException,
CloudException
- Throws:
InternalException
CloudException
Copyright © 2013 enstratius, Inc.. All Rights Reserved.