Search in sources :

Example 1 with UpdateVMCmd

use of org.apache.cloudstack.api.command.user.vm.UpdateVMCmd in project cloudstack by apache.

the class UserVmManagerImpl method updateVirtualMachine.

@Override
@ActionEvent(eventType = EventTypes.EVENT_VM_UPDATE, eventDescription = "updating Vm")
public UserVm updateVirtualMachine(UpdateVMCmd cmd) throws ResourceUnavailableException, InsufficientCapacityException {
    validateInputsAndPermissionForUpdateVirtualMachineCommand(cmd);
    String displayName = cmd.getDisplayName();
    String group = cmd.getGroup();
    Boolean ha = cmd.getHaEnable();
    Boolean isDisplayVm = cmd.getDisplayVm();
    Long id = cmd.getId();
    Long osTypeId = cmd.getOsTypeId();
    String userData = cmd.getUserData();
    Boolean isDynamicallyScalable = cmd.isDynamicallyScalable();
    String hostName = cmd.getHostName();
    Map<String, String> details = cmd.getDetails();
    List<Long> securityGroupIdList = getSecurityGroupIdList(cmd);
    boolean cleanupDetails = cmd.isCleanupDetails();
    String extraConfig = cmd.getExtraConfig();
    UserVmVO vmInstance = _vmDao.findById(cmd.getId());
    if (MapUtils.isNotEmpty(details) || cmd.isCleanupDetails()) {
        VMTemplateVO template = _templateDao.findById(vmInstance.getTemplateId());
        if (template != null && template.isDeployAsIs()) {
            throw new CloudRuntimeException("Detail settings are read from OVA, it cannot be changed by API call.");
        }
    }
    long accountId = vmInstance.getAccountId();
    if (isDisplayVm != null && isDisplayVm != vmInstance.isDisplay()) {
        updateDisplayVmFlag(isDisplayVm, id, vmInstance);
    }
    final Account caller = CallContext.current().getCallingAccount();
    final List<String> userDenyListedSettings = Stream.of(QueryService.UserVMDeniedDetails.value().split(",")).map(item -> (item).trim()).collect(Collectors.toList());
    final List<String> userReadOnlySettings = Stream.of(QueryService.UserVMReadOnlyDetails.value().split(",")).map(item -> (item).trim()).collect(Collectors.toList());
    if (cleanupDetails) {
        if (caller != null && caller.getType() == Account.ACCOUNT_TYPE_ADMIN) {
            userVmDetailsDao.removeDetails(id);
        } else {
            for (final UserVmDetailVO detail : userVmDetailsDao.listDetails(id)) {
                if (detail != null && !userDenyListedSettings.contains(detail.getName()) && !userReadOnlySettings.contains(detail.getName())) {
                    userVmDetailsDao.removeDetail(id, detail.getName());
                }
            }
        }
    } else {
        if (MapUtils.isNotEmpty(details)) {
            if (details.containsKey("extraconfig")) {
                throw new InvalidParameterValueException("'extraconfig' should not be included in details as key");
            }
            if (caller != null && caller.getType() != Account.ACCOUNT_TYPE_ADMIN) {
                // Ensure denied or read-only detail is not passed by non-root-admin user
                for (final String detailName : details.keySet()) {
                    if (userDenyListedSettings.contains(detailName)) {
                        throw new InvalidParameterValueException("You're not allowed to add or edit the restricted setting: " + detailName);
                    }
                    if (userReadOnlySettings.contains(detailName)) {
                        throw new InvalidParameterValueException("You're not allowed to add or edit the read-only setting: " + detailName);
                    }
                }
                // Add any hidden/denied or read-only detail
                for (final UserVmDetailVO detail : userVmDetailsDao.listDetails(id)) {
                    if (userDenyListedSettings.contains(detail.getName()) || userReadOnlySettings.contains(detail.getName())) {
                        details.put(detail.getName(), detail.getValue());
                    }
                }
            }
            verifyVmLimits(vmInstance, details);
            vmInstance.setDetails(details);
            _vmDao.saveDetails(vmInstance);
        }
        if (StringUtils.isNotBlank(extraConfig)) {
            if (EnableAdditionalVmConfig.valueIn(accountId)) {
                s_logger.info("Adding extra configuration to user vm: " + vmInstance.getUuid());
                addExtraConfig(vmInstance, extraConfig);
            } else {
                throw new InvalidParameterValueException("attempted setting extraconfig but enable.additional.vm.configuration is disabled");
            }
        }
    }
    return updateVirtualMachine(id, displayName, group, ha, isDisplayVm, osTypeId, userData, isDynamicallyScalable, cmd.getHttpMethod(), cmd.getCustomId(), hostName, cmd.getInstanceName(), securityGroupIdList, cmd.getDhcpOptionsMap());
}
Also used : ServiceOfferingJoinVO(com.cloud.api.query.vo.ServiceOfferingJoinVO) SecurityGroupManager(com.cloud.network.security.SecurityGroupManager) AccountService(com.cloud.user.AccountService) DeleteVMGroupCmd(org.apache.cloudstack.api.command.user.vmgroup.DeleteVMGroupCmd) NetworkModel(com.cloud.network.NetworkModel) UsageEventUtils(com.cloud.event.UsageEventUtils) HostDao(com.cloud.host.dao.HostDao) ExecutionException(com.cloud.utils.exception.ExecutionException) ResourceState(com.cloud.resource.ResourceState) ResetVMPasswordCmd(org.apache.cloudstack.api.command.user.vm.ResetVMPasswordCmd) Autowired(org.springframework.beans.factory.annotation.Autowired) Pod(com.cloud.dc.Pod) TemplateDataStoreDao(org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao) StringUtils(org.apache.commons.lang3.StringUtils) Base64(org.apache.commons.codec.binary.Base64) AgentUnavailableException(com.cloud.exception.AgentUnavailableException) PvlanSetupCommand(com.cloud.agent.api.PvlanSetupCommand) SnapshotDao(com.cloud.storage.dao.SnapshotDao) DiskOffering(com.cloud.offering.DiskOffering) TransactionCallbackWithException(com.cloud.utils.db.TransactionCallbackWithException) Document(org.w3c.dom.Document) Map(java.util.Map) ResizeVolumeCmd(org.apache.cloudstack.api.command.user.volume.ResizeVolumeCmd) VlanDao(com.cloud.dc.dao.VlanDao) TrafficType(com.cloud.network.Networks.TrafficType) GuestOSCategoryVO(com.cloud.storage.GuestOSCategoryVO) NetworkOrchestrationService(org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService) Service(com.cloud.network.Network.Service) PhysicalNetworkDao(com.cloud.network.dao.PhysicalNetworkDao) VolumeOrchestrationService(org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService) VmDiskStatisticsDao(com.cloud.user.dao.VmDiskStatisticsDao) ModifyTargetsCommand(com.cloud.agent.api.ModifyTargetsCommand) Network(com.cloud.network.Network) TransactionStatus(com.cloud.utils.db.TransactionStatus) DeploymentPlanner(com.cloud.deploy.DeploymentPlanner) ApiDBUtils(com.cloud.api.ApiDBUtils) QueryService(org.apache.cloudstack.query.QueryService) NetworkOfferingVO(com.cloud.offerings.NetworkOfferingVO) AffinityGroupVO(org.apache.cloudstack.affinity.AffinityGroupVO) ResourceTagVO(com.cloud.tags.ResourceTagVO) Stream(java.util.stream.Stream) ServiceOfferingVO(com.cloud.service.ServiceOfferingVO) ServiceOffering(com.cloud.offering.ServiceOffering) InsufficientServerCapacityException(com.cloud.exception.InsufficientServerCapacityException) UpdateVMCmd(org.apache.cloudstack.api.command.user.vm.UpdateVMCmd) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) VMSnapshotVO(com.cloud.vm.snapshot.VMSnapshotVO) AsyncCallFuture(org.apache.cloudstack.framework.async.AsyncCallFuture) ManagerBase(com.cloud.utils.component.ManagerBase) UserDataServiceProvider(com.cloud.network.element.UserDataServiceProvider) AssignVMCmd(org.apache.cloudstack.api.command.admin.vm.AssignVMCmd) ResourceUnavailableException(com.cloud.exception.ResourceUnavailableException) Availability(com.cloud.offering.NetworkOffering.Availability) VMTemplateDao(com.cloud.storage.dao.VMTemplateDao) DataCenterVO(com.cloud.dc.DataCenterVO) GetVolumeStatsAnswer(com.cloud.agent.api.GetVolumeStatsAnswer) LinkedHashMap(java.util.LinkedHashMap) SnapshotVO(com.cloud.storage.SnapshotVO) NetworkType(com.cloud.dc.DataCenter.NetworkType) ClusterDao(com.cloud.dc.dao.ClusterDao) UserDao(com.cloud.user.dao.UserDao) SearchCriteria(com.cloud.utils.db.SearchCriteria) VlanVO(com.cloud.dc.VlanVO) User(com.cloud.user.User) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) GetVolumeStatsCommand(com.cloud.agent.api.GetVolumeStatsCommand) AffinityGroupVMMapDao(org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao) ResourceTag(com.cloud.server.ResourceTag) GetVmNetworkStatsCommand(com.cloud.agent.api.GetVmNetworkStatsCommand) InstanceGroupDao(com.cloud.vm.dao.InstanceGroupDao) VirtualMachineMigrationException(com.cloud.exception.VirtualMachineMigrationException) CommandSetupHelper(com.cloud.network.router.CommandSetupHelper) VMTemplateStorageResourceAssoc(com.cloud.storage.VMTemplateStorageResourceAssoc) UserVm(com.cloud.uservm.UserVm) NicTO(com.cloud.agent.api.to.NicTO) Vlan(com.cloud.dc.Vlan) HighAvailabilityManager(com.cloud.ha.HighAvailabilityManager) UserVmDao(com.cloud.vm.dao.UserVmDao) DestroyVMCmd(org.apache.cloudstack.api.command.user.vm.DestroyVMCmd) NicDao(com.cloud.vm.dao.NicDao) IOException(java.io.IOException) PhysicalNetwork(com.cloud.network.PhysicalNetwork) DB(com.cloud.utils.db.DB) GetVmStatsAnswer(com.cloud.agent.api.GetVmStatsAnswer) PrimaryDataStoreDriver(org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver) Command(com.cloud.agent.api.Command) ControlledEntity(org.apache.cloudstack.acl.ControlledEntity) StringReader(java.io.StringReader) GlobalLock(com.cloud.utils.db.GlobalLock) ConfigurationDao(org.apache.cloudstack.framework.config.dao.ConfigurationDao) StorageManager(com.cloud.storage.StorageManager) AnnotationDao(org.apache.cloudstack.annotation.dao.AnnotationDao) URLDecoder(java.net.URLDecoder) Date(java.util.Date) SecurityGroupAction(org.apache.cloudstack.api.command.user.vm.SecurityGroupAction) StoragePool(com.cloud.storage.StoragePool) AlertManager(com.cloud.alert.AlertManager) UserStatisticsDao(com.cloud.user.dao.UserStatisticsDao) ResourceType(com.cloud.configuration.Resource.ResourceType) Cluster(com.cloud.org.Cluster) GuestOSCategoryDao(com.cloud.storage.dao.GuestOSCategoryDao) GetVmNetworkStatsAnswer(com.cloud.agent.api.GetVmNetworkStatsAnswer) DataStore(org.apache.cloudstack.engine.subsystem.api.storage.DataStore) OrchestrationService(org.apache.cloudstack.engine.service.api.OrchestrationService) CreateVMGroupCmd(org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd) Answer(com.cloud.agent.api.Answer) RSAHelper(com.cloud.utils.crypt.RSAHelper) Config(com.cloud.configuration.Config) DeploymentPlanningManager(com.cloud.deploy.DeploymentPlanningManager) UserVO(com.cloud.user.UserVO) Capacity(com.cloud.capacity.Capacity) State(com.cloud.vm.VirtualMachine.State) DeployDestination(com.cloud.deploy.DeployDestination) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Commands(com.cloud.agent.manager.Commands) UUID(java.util.UUID) Pair(com.cloud.utils.Pair) Collectors(java.util.stream.Collectors) VpcManager(com.cloud.network.vpc.VpcManager) Objects(java.util.Objects) DiskOfferingVO(com.cloud.storage.DiskOfferingVO) Entry(java.util.Map.Entry) StoragePoolType(com.cloud.storage.Storage.StoragePoolType) DedicatedResourceVO(com.cloud.dc.DedicatedResourceVO) NetUtils(com.cloud.utils.net.NetUtils) DataStoreManager(org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager) DataCenterDeployment(com.cloud.deploy.DataCenterDeployment) UnsupportedServiceException(com.cloud.exception.UnsupportedServiceException) DiskOfferingDao(com.cloud.storage.dao.DiskOfferingDao) Domain(com.cloud.domain.Domain) DBEncryptionUtil(com.cloud.utils.crypt.DBEncryptionUtil) PortForwardingRuleVO(com.cloud.network.rules.PortForwardingRuleVO) HashSet(java.util.HashSet) Inject(javax.inject.Inject) ConfigKey(org.apache.cloudstack.framework.config.ConfigKey) IPAddressVO(com.cloud.network.dao.IPAddressVO) Qualifier(org.springframework.beans.factory.annotation.Qualifier) VolumeDao(com.cloud.storage.dao.VolumeDao) IPAddressDao(com.cloud.network.dao.IPAddressDao) FirewallRulesDao(com.cloud.network.dao.FirewallRulesDao) Snapshot(com.cloud.storage.Snapshot) NamedThreadFactory(com.cloud.utils.concurrency.NamedThreadFactory) ExecutorService(java.util.concurrent.ExecutorService) DataCenter(com.cloud.dc.DataCenter) PermissionDeniedException(com.cloud.exception.PermissionDeniedException) UpdateDefaultNicForVMCmd(org.apache.cloudstack.api.command.user.vm.UpdateDefaultNicForVMCmd) HostVO(com.cloud.host.HostVO) InputSource(org.xml.sax.InputSource) VMTemplateVO(com.cloud.storage.VMTemplateVO) NodeList(org.w3c.dom.NodeList) ConfigurationManager(com.cloud.configuration.ConfigurationManager) MapUtils(org.apache.commons.collections.MapUtils) VirtualMachineTO(com.cloud.agent.api.to.VirtualMachineTO) UserVmDeployAsIsDetailsDao(com.cloud.deployasis.dao.UserVmDeployAsIsDetailsDao) AddNicToVMCmd(org.apache.cloudstack.api.command.user.vm.AddNicToVMCmd) UserVmDeployAsIsDetailVO(com.cloud.deployasis.UserVmDeployAsIsDetailVO) VolumeStatsEntry(com.cloud.agent.api.VolumeStatsEntry) SSHKeyPairDao(com.cloud.user.dao.SSHKeyPairDao) DiskTO(com.cloud.agent.api.to.DiskTO) NumbersUtil.toHumanReadableSize(com.cloud.utils.NumbersUtil.toHumanReadableSize) ApiConstants(org.apache.cloudstack.api.ApiConstants) UUIDManager(com.cloud.utils.db.UUIDManager) Element(org.w3c.dom.Element) DataStoreRole(com.cloud.storage.DataStoreRole) VolumeApiResult(org.apache.cloudstack.engine.subsystem.api.storage.VolumeService.VolumeApiResult) TemplateDeployAsIsDetailsDao(com.cloud.deployasis.dao.TemplateDeployAsIsDetailsDao) StoragePoolVO(org.apache.cloudstack.storage.datastore.db.StoragePoolVO) FirewallManager(com.cloud.network.rules.FirewallManager) DpdkHelper(com.cloud.hypervisor.kvm.dpdk.DpdkHelper) OVFPropertyTO(com.cloud.agent.api.to.deployasis.OVFPropertyTO) Arrays(java.util.Arrays) ByteScaleUtils(org.apache.cloudstack.utils.bytescale.ByteScaleUtils) UpdateVmNicIpCmd(org.apache.cloudstack.api.command.user.vm.UpdateVmNicIpCmd) VolumeService(org.apache.cloudstack.engine.subsystem.api.storage.VolumeService) Transaction(com.cloud.utils.db.Transaction) TransactionCallbackWithExceptionNoReturn(com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn) NoTransitionException(com.cloud.utils.fsm.NoTransitionException) AgentManager(com.cloud.agent.AgentManager) ServiceOfferingDetailsDao(com.cloud.service.dao.ServiceOfferingDetailsDao) VirtualMachineTemplate(com.cloud.template.VirtualMachineTemplate) TemplateType(com.cloud.storage.Storage.TemplateType) Matcher(java.util.regex.Matcher) VmNetworkStatsEntry(com.cloud.agent.api.VmNetworkStatsEntry) ServiceOfferingDao(com.cloud.service.dao.ServiceOfferingDao) NetworkServiceMapDao(com.cloud.network.dao.NetworkServiceMapDao) CloudException(com.cloud.exception.CloudException) PlannerHostReservationDao(com.cloud.deploy.dao.PlannerHostReservationDao) Storage(com.cloud.storage.Storage) NicExtraDhcpOptionDao(com.cloud.vm.dao.NicExtraDhcpOptionDao) CapacityManager(com.cloud.capacity.CapacityManager) CallContext(org.apache.cloudstack.context.CallContext) GetVmStatsCommand(com.cloud.agent.api.GetVmStatsCommand) LoadBalancerVMMapDao(com.cloud.network.dao.LoadBalancerVMMapDao) NetworkGuru(com.cloud.network.guru.NetworkGuru) ResourceManager(com.cloud.resource.ResourceManager) TemplateApiService(com.cloud.template.TemplateApiService) Set(java.util.Set) ScopeType(com.cloud.storage.ScopeType) UpgradeVMCmd(org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd) DettachCommand(org.apache.cloudstack.storage.command.DettachCommand) OperationTimedoutException(com.cloud.exception.OperationTimedoutException) Executors(java.util.concurrent.Executors) VMTemplateZoneVO(com.cloud.storage.VMTemplateZoneVO) InsufficientCapacityException(com.cloud.exception.InsufficientCapacityException) VMSnapshotManager(com.cloud.vm.snapshot.VMSnapshotManager) VpcVirtualNetworkApplianceManager(com.cloud.network.router.VpcVirtualNetworkApplianceManager) PortForwardingRulesDao(com.cloud.network.rules.dao.PortForwardingRulesDao) GuestOSDao(com.cloud.storage.dao.GuestOSDao) InsufficientAddressCapacityException(com.cloud.exception.InsufficientAddressCapacityException) HypervisorCapabilitiesDao(com.cloud.hypervisor.dao.HypervisorCapabilitiesDao) ServiceOfferingJoinDao(com.cloud.api.query.dao.ServiceOfferingJoinDao) AccountDao(com.cloud.user.dao.AccountDao) AffinityGroupDao(org.apache.cloudstack.affinity.dao.AffinityGroupDao) IpAddressManager(com.cloud.network.IpAddressManager) NumbersUtil(com.cloud.utils.NumbersUtil) PrimaryDataStore(org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore) UsageEventVO(com.cloud.event.UsageEventVO) StorageUnavailableException(com.cloud.exception.StorageUnavailableException) HTTPMethod(org.apache.cloudstack.api.BaseCmd.HTTPMethod) ArrayList(java.util.ArrayList) VmStatsEntry(com.cloud.agent.api.VmStatsEntry) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) TemplateDataStoreVO(org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO) StartAnswer(com.cloud.agent.api.StartAnswer) PlannerHostReservationVO(com.cloud.deploy.PlannerHostReservationVO) VmDiskStatsEntry(com.cloud.agent.api.VmDiskStatsEntry) ConfigurationManagerImpl(com.cloud.configuration.ConfigurationManagerImpl) VMInstanceDao(com.cloud.vm.dao.VMInstanceDao) DomainRouterDao(com.cloud.vm.dao.DomainRouterDao) LinkedHashSet(java.util.LinkedHashSet) HypervisorType(com.cloud.hypervisor.Hypervisor.HypervisorType) Journal(com.cloud.utils.Journal) UsageEventDao(com.cloud.event.dao.UsageEventDao) ScaleVMCmd(org.apache.cloudstack.api.command.user.vm.ScaleVMCmd) LoadBalancerVMMapVO(com.cloud.network.dao.LoadBalancerVMMapVO) DeployVMCmdByAdmin(org.apache.cloudstack.api.command.admin.vm.DeployVMCmdByAdmin) ResetVMSSHKeyCmd(org.apache.cloudstack.api.command.user.vm.ResetVMSSHKeyCmd) ResourceTagDao(com.cloud.tags.dao.ResourceTagDao) RestoreVMSnapshotAnswer(com.cloud.agent.api.RestoreVMSnapshotAnswer) VolumeDataFactory(org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory) HostPodDao(com.cloud.dc.dao.HostPodDao) Host(com.cloud.host.Host) ActionEvent(com.cloud.event.ActionEvent) AccountManager(com.cloud.user.AccountManager) DocumentBuilder(javax.xml.parsers.DocumentBuilder) ImageFormat(com.cloud.storage.Storage.ImageFormat) ExcludeList(com.cloud.deploy.DeploymentPlanner.ExcludeList) RulesManager(com.cloud.network.rules.RulesManager) StatsCollector(com.cloud.server.StatsCollector) ManagementService(com.cloud.server.ManagementService) DataStoreDriver(org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver) ActionEventUtils(com.cloud.event.ActionEventUtils) TemplateManager(com.cloud.template.TemplateManager) DeleteCommand(org.apache.cloudstack.storage.command.DeleteCommand) RemoveNicFromVMCmd(org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd) VMNetworkMapDao(org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMNetworkMapDao) StoragePoolStatus(com.cloud.storage.StoragePoolStatus) Grouping(com.cloud.org.Grouping) BackupDao(org.apache.cloudstack.backup.dao.BackupDao) NumberUtils(org.apache.commons.lang.math.NumberUtils) InvalidParameterValueException(com.cloud.exception.InvalidParameterValueException) SecurityGroupDao(com.cloud.network.security.dao.SecurityGroupDao) DataStoreProviderManager(org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager) Logger(org.apache.log4j.Logger) ResourceAllocationException(com.cloud.exception.ResourceAllocationException) ResourceLimitService(com.cloud.user.ResourceLimitService) SecurityGroup(com.cloud.network.security.SecurityGroup) DomainDao(com.cloud.domain.dao.DomainDao) Ip(com.cloud.utils.net.Ip) TransactionCallbackNoReturn(com.cloud.utils.db.TransactionCallbackNoReturn) ManagedContextRunnable(org.apache.cloudstack.managed.context.ManagedContextRunnable) PrimaryDataStoreDao(org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao) IpAddresses(com.cloud.network.Network.IpAddresses) SSHKeyPair(com.cloud.user.SSHKeyPair) AffinityConflictException(com.cloud.exception.AffinityConflictException) Account(com.cloud.user.Account) DedicatedResourceDao(com.cloud.dc.dao.DedicatedResourceDao) Status(com.cloud.host.Status) VMSnapshotDao(com.cloud.vm.snapshot.dao.VMSnapshotDao) List(java.util.List) DataCenterDao(com.cloud.dc.dao.DataCenterDao) ACLType(org.apache.cloudstack.acl.ControlledEntity.ACLType) ConcurrentOperationException(com.cloud.exception.ConcurrentOperationException) SAXException(org.xml.sax.SAXException) Pattern(java.util.regex.Pattern) UnsupportedEncodingException(java.io.UnsupportedEncodingException) Backup(org.apache.cloudstack.backup.Backup) GetVmIpAddressCommand(com.cloud.agent.api.GetVmIpAddressCommand) OVFNetworkTO(com.cloud.agent.api.to.deployasis.OVFNetworkTO) InstanceGroupVMMapDao(com.cloud.vm.dao.InstanceGroupVMMapDao) VmDiskStatisticsVO(com.cloud.user.VmDiskStatisticsVO) EntityManager(com.cloud.utils.db.EntityManager) VolumeApiService(com.cloud.storage.VolumeApiService) StartVMCmd(org.apache.cloudstack.api.command.user.vm.StartVMCmd) AccessType(org.apache.cloudstack.acl.SecurityChecker.AccessType) HashMap(java.util.HashMap) ConfigurationException(javax.naming.ConfigurationException) AffinityGroupService(org.apache.cloudstack.affinity.AffinityGroupService) NetworkDao(com.cloud.network.dao.NetworkDao) VM_USERDATA_MAX_LENGTH(com.cloud.configuration.ConfigurationManagerImpl.VM_USERDATA_MAX_LENGTH) EventTypes(com.cloud.event.EventTypes) RebootVMCmd(org.apache.cloudstack.api.command.user.vm.RebootVMCmd) GuestOSVO(com.cloud.storage.GuestOSVO) RestoreVMCmd(org.apache.cloudstack.api.command.user.vm.RestoreVMCmd) DataStoreProvider(org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider) CollectionUtils(org.apache.commons.collections.CollectionUtils) UserVmDetailsDao(com.cloud.vm.dao.UserVmDetailsDao) NetworkVO(com.cloud.network.dao.NetworkVO) Configurable(org.apache.cloudstack.framework.config.Configurable) VlanType(com.cloud.dc.Vlan.VlanType) GPU(com.cloud.gpu.GPU) AnnotationService(org.apache.cloudstack.annotation.AnnotationService) LoadBalancingRulesManager(com.cloud.network.lb.LoadBalancingRulesManager) SSHKeyPairVO(com.cloud.user.SSHKeyPairVO) VolumeInfo(org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo) AffinityGroupVMMapVO(org.apache.cloudstack.affinity.AffinityGroupVMMapVO) Hypervisor(com.cloud.hypervisor.Hypervisor) ChangeOfferingForVolumeCmd(org.apache.cloudstack.api.command.user.volume.ChangeOfferingForVolumeCmd) VirtualMachineEntity(org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntity) GetVmDiskStatsCommand(com.cloud.agent.api.GetVmDiskStatsCommand) DateUtil(com.cloud.utils.DateUtil) TimeUnit(java.util.concurrent.TimeUnit) BackupManager(org.apache.cloudstack.backup.BackupManager) GetVmDiskStatsAnswer(com.cloud.agent.api.GetVmDiskStatsAnswer) NetworkOffering(com.cloud.offering.NetworkOffering) HostPodVO(com.cloud.dc.HostPodVO) VMTemplateZoneDao(com.cloud.storage.dao.VMTemplateZoneDao) DeployVMCmd(org.apache.cloudstack.api.command.user.vm.DeployVMCmd) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) NetworkOfferingDao(com.cloud.offerings.dao.NetworkOfferingDao) RecoverVMCmd(org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd) Volume(com.cloud.storage.Volume) RestoreVMSnapshotCommand(com.cloud.agent.api.RestoreVMSnapshotCommand) DomainVO(com.cloud.domain.DomainVO) ManagementServerException(com.cloud.exception.ManagementServerException) FirewallRuleVO(com.cloud.network.rules.FirewallRuleVO) Provider(com.cloud.network.Network.Provider) UserStatisticsVO(com.cloud.user.UserStatisticsVO) VolumeVO(com.cloud.storage.VolumeVO) NetworkHelper(com.cloud.network.router.NetworkHelper) Account(com.cloud.user.Account) VMTemplateVO(com.cloud.storage.VMTemplateVO) InvalidParameterValueException(com.cloud.exception.InvalidParameterValueException) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) ActionEvent(com.cloud.event.ActionEvent)

Aggregations

AgentManager (com.cloud.agent.AgentManager)1 Answer (com.cloud.agent.api.Answer)1 Command (com.cloud.agent.api.Command)1 GetVmDiskStatsAnswer (com.cloud.agent.api.GetVmDiskStatsAnswer)1 GetVmDiskStatsCommand (com.cloud.agent.api.GetVmDiskStatsCommand)1 GetVmIpAddressCommand (com.cloud.agent.api.GetVmIpAddressCommand)1 GetVmNetworkStatsAnswer (com.cloud.agent.api.GetVmNetworkStatsAnswer)1 GetVmNetworkStatsCommand (com.cloud.agent.api.GetVmNetworkStatsCommand)1 GetVmStatsAnswer (com.cloud.agent.api.GetVmStatsAnswer)1 GetVmStatsCommand (com.cloud.agent.api.GetVmStatsCommand)1 GetVolumeStatsAnswer (com.cloud.agent.api.GetVolumeStatsAnswer)1 GetVolumeStatsCommand (com.cloud.agent.api.GetVolumeStatsCommand)1 ModifyTargetsCommand (com.cloud.agent.api.ModifyTargetsCommand)1 PvlanSetupCommand (com.cloud.agent.api.PvlanSetupCommand)1 RestoreVMSnapshotAnswer (com.cloud.agent.api.RestoreVMSnapshotAnswer)1 RestoreVMSnapshotCommand (com.cloud.agent.api.RestoreVMSnapshotCommand)1 StartAnswer (com.cloud.agent.api.StartAnswer)1 VmDiskStatsEntry (com.cloud.agent.api.VmDiskStatsEntry)1 VmNetworkStatsEntry (com.cloud.agent.api.VmNetworkStatsEntry)1 VmStatsEntry (com.cloud.agent.api.VmStatsEntry)1