|
35 | 35 | import javax.inject.Inject; |
36 | 36 | import javax.naming.ConfigurationException; |
37 | 37 |
|
| 38 | +import org.apache.commons.codec.binary.Base64; |
| 39 | +import org.apache.log4j.Logger; |
| 40 | + |
38 | 41 | import org.apache.cloudstack.acl.ControlledEntity.ACLType; |
39 | 42 | import org.apache.cloudstack.acl.SecurityChecker.AccessType; |
40 | 43 | import org.apache.cloudstack.affinity.AffinityGroupService; |
|
84 | 87 | import org.apache.cloudstack.storage.command.DettachCommand; |
85 | 88 | import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; |
86 | 89 | import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; |
87 | | -import org.apache.commons.codec.binary.Base64; |
88 | | -import org.apache.log4j.Logger; |
89 | 90 |
|
90 | 91 | import com.cloud.agent.AgentManager; |
91 | 92 | import com.cloud.agent.api.Answer; |
@@ -4747,8 +4748,6 @@ public UserVm restoreVMInternal(Account caller, UserVmVO vm, Long newTemplateId) |
4747 | 4748 | // Detach, destroy and create the usage event for the old root volume. |
4748 | 4749 | _volsDao.detachVolume(root.getId()); |
4749 | 4750 | volumeMgr.destroyVolume(root); |
4750 | | - UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VOLUME_DELETE, root.getAccountId(), root.getDataCenterId(), root.getId(), root.getName(), |
4751 | | - Volume.class.getName(), root.getUuid(), root.isDisplayVolume()); |
4752 | 4751 |
|
4753 | 4752 | // For VMware hypervisor since the old root volume is replaced by the new root volume, force expunge old root volume if it has been created in storage |
4754 | 4753 | if (vm.getHypervisorType() == HypervisorType.VMware) { |
|
0 commit comments