org.dasein.cloud.azure.compute.vm
Class AzureVM
java.lang.Object
org.dasein.cloud.compute.AbstractVMSupport
org.dasein.cloud.azure.compute.vm.AzureVM
- All Implemented Interfaces:
- AccessControlledService, VirtualMachineSupport
public class AzureVM
- extends AbstractVMSupport
Implements virtual machine support for Microsoft Azure.
- Since:
- 2012.04.1 initial version
- Version:
- 2012.04.1, 2012.09 updated for model changes
- Author:
- George Reese (george.reese@imaginary.com), Qunying Huang
| 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 vmId,
String intoDcId,
String name,
String description,
boolean powerOn,
String... firewallIds)
|
VMScalingCapabilities |
describeVerticalScalingCapabilities()
|
void |
disableAnalytics(String vmId)
|
void |
enableAnalytics(String vmId)
|
String |
getConsoleOutput(String vmId)
|
int |
getCostFactor(VmState state)
|
int |
getMaximumVirtualMachineCount()
|
VirtualMachineProduct |
getProduct(String productId)
|
String |
getProviderTermForServer(Locale locale)
|
VirtualMachine |
getVirtualMachine(String vmId)
|
VmStatistics |
getVMStatistics(String vmId,
long from,
long to)
|
Iterable<VmStatistics> |
getVMStatisticsForPeriod(String vmId,
long from,
long to)
|
Requirement |
identifyImageRequirement(ImageClass cls)
|
Requirement |
identifyPasswordRequirement()
|
Requirement |
identifyPasswordRequirement(Platform platform)
|
Requirement |
identifyRootVolumeRequirement()
|
Requirement |
identifyShellKeyRequirement()
|
Requirement |
identifyShellKeyRequirement(Platform platform)
|
Requirement |
identifyStaticIPRequirement()
|
Requirement |
identifyVlanRequirement()
|
boolean |
isAPITerminationPreventable()
|
boolean |
isBasicAnalyticsSupported()
|
boolean |
isExtendedAnalyticsSupported()
|
boolean |
isSubscribed()
|
boolean |
isUserDataSupported()
|
VirtualMachine |
launch(VMLaunchOptions options)
|
Iterable<String> |
listFirewalls(String vmId)
|
Iterable<VirtualMachineProduct> |
listProducts(Architecture architecture)
|
Iterable<Architecture> |
listSupportedArchitectures()
|
Iterable<VirtualMachine> |
listVirtualMachines()
|
Iterable<VirtualMachine> |
listVirtualMachines(VMFilterOptions vmFilterOptions)
|
Iterable<ResourceStatus> |
listVirtualMachineStatus()
|
String[] |
mapServiceAction(ServiceAction action)
|
void |
pause(String vmId)
|
void |
reboot(String vmId)
|
void |
removeTags(String[] strings,
Tag... tags)
|
void |
removeTags(String s,
Tag... tags)
|
void |
resume(String vmId)
|
void |
start(String vmId)
|
void |
stop(String vmId,
boolean force)
|
boolean |
supportsPauseUnpause(VirtualMachine vm)
|
boolean |
supportsStartStop(VirtualMachine vm)
|
boolean |
supportsSuspendResume(VirtualMachine vm)
|
void |
suspend(String vmId)
|
void |
terminate(String vmId,
String explanation)
|
void |
unpause(String vmId)
|
void |
updateTags(String[] strings,
Tag... tags)
|
void |
updateTags(String vmId,
Tag... tags)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HOSTED_SERVICES
public static final String HOSTED_SERVICES
- See Also:
- Constant Field Values
AzureVM
public AzureVM(Azure provider)
start
public void start(@Nonnull
String vmId)
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 vmId,
@Nonnull
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
public VMScalingCapabilities describeVerticalScalingCapabilities()
throws CloudException,
InternalException
- Specified by:
describeVerticalScalingCapabilities in interface VirtualMachineSupport- Overrides:
describeVerticalScalingCapabilities in class AbstractVMSupport
- Throws:
CloudException
InternalException
disableAnalytics
public void disableAnalytics(String vmId)
throws InternalException,
CloudException
- Specified by:
disableAnalytics in interface VirtualMachineSupport- Overrides:
disableAnalytics in class AbstractVMSupport
- Throws:
InternalException
CloudException
enableAnalytics
public void enableAnalytics(String vmId)
throws InternalException,
CloudException
- Specified by:
enableAnalytics in interface VirtualMachineSupport- Overrides:
enableAnalytics in class AbstractVMSupport
- Throws:
InternalException
CloudException
getConsoleOutput
@Nonnull
public String getConsoleOutput(@Nonnull
String vmId)
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
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 vmId)
throws InternalException,
CloudException
- Specified by:
getVirtualMachine in interface VirtualMachineSupport- Overrides:
getVirtualMachine in class AbstractVMSupport
- Throws:
InternalException
CloudException
getVMStatistics
@Nullable
public VmStatistics getVMStatistics(String vmId,
long from,
long to)
throws InternalException,
CloudException
- Specified by:
getVMStatistics in interface VirtualMachineSupport- Overrides:
getVMStatistics in class AbstractVMSupport
- Throws:
InternalException
CloudException
getVMStatisticsForPeriod
@Nonnull
public Iterable<VmStatistics> getVMStatisticsForPeriod(@Nonnull
String vmId,
@Nonnegative
long from,
@Nonnegative
long to)
throws InternalException,
CloudException
- Specified by:
getVMStatisticsForPeriod in interface VirtualMachineSupport- Overrides:
getVMStatisticsForPeriod 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()
throws CloudException,
InternalException
- Specified by:
identifyPasswordRequirement in interface VirtualMachineSupport- Overrides:
identifyPasswordRequirement 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()
throws CloudException,
InternalException
- Specified by:
identifyShellKeyRequirement in interface VirtualMachineSupport- Overrides:
identifyShellKeyRequirement 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(VMLaunchOptions options)
throws CloudException,
InternalException
- Throws:
CloudException
InternalException
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
listVirtualMachines
@Nonnull
public Iterable<VirtualMachine> listVirtualMachines(@Nullable
VMFilterOptions vmFilterOptions)
throws InternalException,
CloudException
- Specified by:
listVirtualMachines in interface VirtualMachineSupport- Overrides:
listVirtualMachines in class AbstractVMSupport
- Throws:
InternalException
CloudException
reboot
public void reboot(@Nonnull
String vmId)
throws CloudException,
InternalException
- Specified by:
reboot in interface VirtualMachineSupport- Overrides:
reboot in class AbstractVMSupport
- Throws:
CloudException
InternalException
resume
public void resume(@Nonnull
String vmId)
throws CloudException,
InternalException
- Specified by:
resume in interface VirtualMachineSupport- Overrides:
resume in class AbstractVMSupport
- Throws:
CloudException
InternalException
pause
public void pause(@Nonnull
String vmId)
throws InternalException,
CloudException
- Specified by:
pause in interface VirtualMachineSupport- Overrides:
pause 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
suspend
public void suspend(@Nonnull
String vmId)
throws CloudException,
InternalException
- Specified by:
suspend in interface VirtualMachineSupport- Overrides:
suspend in class AbstractVMSupport
- Throws:
CloudException
InternalException
terminate
public void terminate(@Nonnull
String vmId,
@Nullable
String explanation)
throws InternalException,
CloudException
- Throws:
InternalException
CloudException
unpause
public void unpause(@Nonnull
String vmId)
throws CloudException,
InternalException
- Specified by:
unpause in interface VirtualMachineSupport- Overrides:
unpause in class AbstractVMSupport
- Throws:
CloudException
InternalException
updateTags
public void updateTags(@Nonnull
String vmId,
@Nonnull
Tag... tags)
throws CloudException,
InternalException
- Specified by:
updateTags in interface VirtualMachineSupport- Overrides:
updateTags in class AbstractVMSupport
- Throws:
CloudException
InternalException
updateTags
public void updateTags(@Nonnull
String[] strings,
@Nonnull
Tag... tags)
throws CloudException,
InternalException
- Specified by:
updateTags in interface VirtualMachineSupport- Overrides:
updateTags in class AbstractVMSupport
- Throws:
CloudException
InternalException
removeTags
public void removeTags(@Nonnull
String s,
@Nonnull
Tag... tags)
throws CloudException,
InternalException
- Specified by:
removeTags in interface VirtualMachineSupport- Overrides:
removeTags in class AbstractVMSupport
- Throws:
CloudException
InternalException
removeTags
public void removeTags(@Nonnull
String[] strings,
@Nonnull
Tag... tags)
throws CloudException,
InternalException
- Specified by:
removeTags in interface VirtualMachineSupport- Overrides:
removeTags in class AbstractVMSupport
- Throws:
CloudException
InternalException
mapServiceAction
@Nonnull
public String[] mapServiceAction(@Nonnull
ServiceAction action)
- Specified by:
mapServiceAction in interface AccessControlledService- Overrides:
mapServiceAction in class AbstractVMSupport
Copyright © 2013 enStratus Networks Inc. All Rights Reserved.