public class AddVmCommand<T extends VmManagementParametersBase> extends VmManagementCommandBase<T>
Modifier and Type | Field and Description |
---|---|
protected List<DiskImageBase> |
_vmDisks |
protected List<VmNetworkInterface> |
_vmInterfaces |
protected String |
newMac |
MAX_NETWORK_INTERFACES_SUPPORTED
BYTES_IN_GB
Modifier | Constructor and Description |
---|---|
protected |
AddVmCommand(Guid commandId) |
|
AddVmCommand(T parameters) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
AddVmImages() |
protected void |
AddVmNetwork() |
protected void |
addVmPermission() |
protected void |
AddVmStatic() |
protected boolean |
areParametersLegal(ArrayList<String> reasons) |
boolean |
CanAddVm(Object vmTemplateId,
ArrayList<String> reasons) |
boolean |
CanAddVm(Object vmTemplateId,
ArrayList<String> reasons,
int vmsCount,
String name,
Guid storagePoolId,
int vmPriority) |
protected boolean |
canDoAction() |
protected boolean |
CanDoAddVmCommand() |
static boolean |
CheckCpuSockets(int num_of_sockets,
int cpu_per_socket,
String compatibility_version,
ArrayList<String> CanDoActionMessages) |
protected void |
EndWithFailure() |
protected void |
ExecuteVmCommand() |
AuditLogType |
getAuditLogTypeValue() |
protected VdcActionType |
getChildActionType() |
Map<Guid,VdcObjectType> |
getPermissionCheckSubjects()
Permissions are attached to object so every command must declare its
object target type and its GUID
|
NGuid |
getStorageDomainId() |
protected List<Class<?>> |
getValidationGroups() |
protected List<DiskImageBase> |
getVmDisks() |
protected List<VmNetworkInterface> |
getVmInterfaces() |
protected Guid |
getVmSnapshotId() |
protected boolean |
hostToRunExist() |
protected static boolean |
IsLegalClusterId(Guid clusterId,
ArrayList<String> reasons) |
static Guid |
SelectStorageDomain(VmTemplate vmTemplate)
Select storage domain according to the given template - with most
available disk size.
|
protected void |
setActionMessageParameters()
Set the parameters for bll messages (such as type and action).
|
isDedicatedVdsOnSameCluster
CheckPCIAndIDELimit, ConcreteCreateTask, EndActionOnDisks, EndSuccessfully, EndVmCommand, executeCommand, getBlockSparseInitSizeInGB, getDescription, getNeededDiskSize, GetTagsAttachedToObject, handleCustomPropertiesError, HandleHibernatedVm, isVmNameValidLength, lockVmWithCompensationIfNeeded, RemoveVmDynamic, RemoveVmInSpm, RemoveVmInSpm, RemoveVmNetwork, RemoveVmStatic, RemoveVmStatistics, RemoveVmUsers, UpdateVmInSpm, UpdateVmInSpm, validateNumberOfNics
acquireLock, addCanDoActionMessage, addCanDoActionMessage, addValidationGroup, CanDoActionOnly, compensate, CreateReturnValue, CreateTask, EndAction, endActionInTransactionScope, ExecuteAction, freeLock, getActionReturnValue, getActionState, getActionType, getBusinessEntitySnapshotDAO, getCommandShouldBeLogged, getCompensationContext, getNow, getObjectLockingId, getParameters, getParametersForTask, getReturnValue, getSucceeded, getTaskIdList, getTransactionScopeOption, getTransactionTimeout, IsBackwardsCompatible, isInternalExecution, IsUserAutorizedToRunAction, RevertTasks, Rollback, runInTransaction, runVdsCommand, setActionReturnValue, setCommandShouldBeLogged, setCompensationContext, setDescription, setInternalExecution, setSucceeded, UpdateTasksWithActionParameters, validateInputs
AddCustomValue, AppendCustomValue, DefaultLog, getCurrentUser, GetCustomValue, getCustomValues, getKey, getSnapshotName, getStorageDomain, getStorageDomainDAO, getStorageDomainName, getStoragePool, getStoragePoolDAO, getStoragePoolId, getStoragePoolName, getUserId, getUserName, getVds, getVdsDAO, getVdsGroup, getVdsGroupDAO, getVdsGroupId, getVdsGroupName, getVdsId, getVdsIdRef, getVdsName, getVm, getVmDAO, getVmId, getVmIdRef, getVmName, getVmStaticDAO, getVmStatisticsDAO, getVmTemplate, getVmTemplateDAO, getVmTemplateId, getVmTemplateIdRef, getVmTemplateName, log, setCurrentUser, setSnapshotName, setStorageDomain, setStorageDomainId, setStoragePool, setStoragePoolId, setUserId, setUserName, setVds, setVdsGroup, setVdsGroupId, setVdsId, setVdsIdRef, setVdsName, setVm, setVmId, setVmName, setVmTemplate, setVmTemplateId, setVmTemplateName
getEndTime, getLegal, getTimeoutObjectId, getUseTimout, setEndTime, setTimeoutObjectId, setUseTimout
protected String newMac
protected List<VmNetworkInterface> _vmInterfaces
protected List<DiskImageBase> _vmDisks
public AddVmCommand(T parameters)
protected AddVmCommand(Guid commandId)
public NGuid getStorageDomainId()
getStorageDomainId
in class AuditLogableBase
public static Guid SelectStorageDomain(VmTemplate vmTemplate)
vmTemplate
- protected Guid getVmSnapshotId()
protected List<VmNetworkInterface> getVmInterfaces()
protected List<DiskImageBase> getVmDisks()
protected boolean CanDoAddVmCommand()
protected boolean hostToRunExist()
public static boolean CheckCpuSockets(int num_of_sockets, int cpu_per_socket, String compatibility_version, ArrayList<String> CanDoActionMessages)
protected List<Class<?>> getValidationGroups()
getValidationGroups
in class VmManagementCommandBase<T extends VmManagementParametersBase>
protected void setActionMessageParameters()
CommandBase
setActionMessageParameters
in class CommandBase<T extends VmManagementParametersBase>
protected boolean canDoAction()
canDoAction
in class CommandBase<T extends VmManagementParametersBase>
public boolean CanAddVm(Object vmTemplateId, ArrayList<String> reasons, int vmsCount, String name, Guid storagePoolId, int vmPriority)
protected void ExecuteVmCommand()
ExecuteVmCommand
in class VmCommand<T extends VmManagementParametersBase>
protected static boolean IsLegalClusterId(Guid clusterId, ArrayList<String> reasons)
protected void AddVmNetwork()
protected void AddVmStatic()
protected boolean AddVmImages()
public AuditLogType getAuditLogTypeValue()
getAuditLogTypeValue
in class AuditLogableBase
protected VdcActionType getChildActionType()
getChildActionType
in class VmCommand<T extends VmManagementParametersBase>
protected void EndWithFailure()
EndWithFailure
in class VmCommand<T extends VmManagementParametersBase>
public Map<Guid,VdcObjectType> getPermissionCheckSubjects()
CommandBase
getPermissionCheckSubjects
in class VmCommand<T extends VmManagementParametersBase>
protected void addVmPermission()
Copyright © 2012. All Rights Reserved.