public abstract class VmTemplateCommand<T extends VmTemplateParametersBase> extends CommandBase<T>
Modifier and Type | Field and Description |
---|---|
protected String |
mVmTemplateDescription |
BYTES_IN_GB, log
Modifier | Constructor and Description |
---|---|
|
VmTemplateCommand() |
protected |
VmTemplateCommand(Guid commandId)
Constructor for command creation when compensation is applied on startup
|
|
VmTemplateCommand(T parameters) |
Modifier and Type | Method and Description |
---|---|
protected void |
executeCommand() |
protected String |
getDescription() |
Map<Guid,VdcObjectType> |
getPermissionCheckSubjects()
Permissions are attached to object so every command must declare its
object target type and its GUID
|
static boolean |
IsDomainLegal(String domainName,
ArrayList<String> reasons)
Determines whether [is domain legal] [the specified domain name].
|
static boolean |
IsVmPriorityValueLegal(int value,
ArrayList<String> reasons)
Determines whether [is high availability value legal] [the specified
value].
|
static boolean |
isVmTemlateWithSameNameExist(String name) |
static boolean |
isVmTemplateImagesReady(Guid vmTemplateId,
Guid storageDomainId,
ArrayList<String> reasons,
boolean checkImagesExists,
boolean checkLocked,
boolean checkIllegal,
boolean checkStorageDomain) |
protected void |
RemoveNetwork() |
protected static boolean |
RemoveTemplateInSpm(Guid storagePoolId,
Guid templateId) |
protected static boolean |
RemoveTemplateInSpm(Guid storagePoolId,
Guid templateId,
Guid storageDomainId) |
static boolean |
UpdateTemplateInSpm(Guid storagePoolId,
ArrayList<VmTemplate> templatesList)
This method create OVF for each template in list and call updateVm in SPM
|
static boolean |
UpdateTemplateInSpm(Guid storagePoolId,
ArrayList<VmTemplate> templatesList,
Guid storageDomainId,
List<DiskImage> images) |
acquireLock, addCanDoActionMessage, addCanDoActionMessage, addValidationGroup, canDoAction, CanDoActionOnly, compensate, ConcreteCreateTask, CreateReturnValue, CreateTask, EndAction, endActionInTransactionScope, EndSuccessfully, EndWithFailure, ExecuteAction, freeLock, getActionReturnValue, getActionState, getActionType, getBusinessEntitySnapshotDAO, getCommandShouldBeLogged, getCompensationContext, getNow, getObjectLockingId, getParameters, getParametersForTask, getReturnValue, getSucceeded, GetTagsAttachedToObject, getTaskIdList, getTransactionScopeOption, getTransactionTimeout, getValidationGroups, IsBackwardsCompatible, isInternalExecution, IsUserAutorizedToRunAction, RevertTasks, Rollback, runInTransaction, runVdsCommand, setActionMessageParameters, setActionReturnValue, setCommandShouldBeLogged, setCompensationContext, setDescription, setInternalExecution, setSucceeded, UpdateTasksWithActionParameters, validateInputs
AddCustomValue, AppendCustomValue, DefaultLog, getAuditLogTypeValue, getCurrentUser, GetCustomValue, getCustomValues, getKey, getSnapshotName, getStorageDomain, getStorageDomainDAO, getStorageDomainId, 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 mVmTemplateDescription
protected VmTemplateCommand(Guid commandId)
commandId
- public VmTemplateCommand(T parameters)
public VmTemplateCommand()
protected void executeCommand()
executeCommand
in class CommandBase<T extends VmTemplateParametersBase>
public static boolean isVmTemlateWithSameNameExist(String name)
public static boolean isVmTemplateImagesReady(Guid vmTemplateId, Guid storageDomainId, ArrayList<String> reasons, boolean checkImagesExists, boolean checkLocked, boolean checkIllegal, boolean checkStorageDomain)
public static boolean IsDomainLegal(String domainName, ArrayList<String> reasons)
domainName
- Name of the domain.reasons
- The reasons.public static boolean IsVmPriorityValueLegal(int value, ArrayList<String> reasons)
value
- The value.reasons
- The reasons.protected String getDescription()
getDescription
in class CommandBase<T extends VmTemplateParametersBase>
public static boolean UpdateTemplateInSpm(Guid storagePoolId, ArrayList<VmTemplate> templatesList)
storagePoolId
- templatesList
- public static boolean UpdateTemplateInSpm(Guid storagePoolId, ArrayList<VmTemplate> templatesList, Guid storageDomainId, List<DiskImage> images)
protected static boolean RemoveTemplateInSpm(Guid storagePoolId, Guid templateId)
protected static boolean RemoveTemplateInSpm(Guid storagePoolId, Guid templateId, Guid storageDomainId)
protected void RemoveNetwork()
public Map<Guid,VdcObjectType> getPermissionCheckSubjects()
CommandBase
getPermissionCheckSubjects
in class CommandBase<T extends VmTemplateParametersBase>
Copyright © 2012. All Rights Reserved.