Skip to content

Commit fffa99e

Browse files
authored
Merge pull request #609 from jschoiRR/mold-main#2025
[Mold API] VM스냅샷 및 복구 시 details 정보 누락되는 이슈 관련 기능 개선
2 parents 6130bf5 + 894e769 commit fffa99e

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

agent/src/main/java/com/cloud/agent/properties/AgentProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ public class AgentProperties{
704704
* stopped VMs. Experimental, requires agent restart.
705705
* Default value: <code>false</code>
706706
*/
707-
public static final Property<Boolean> LIBVIRT_EVENTS_ENABLED = new Property<>("libvirt.events.enabled", false);
707+
public static final Property<Boolean> LIBVIRT_EVENTS_ENABLED = new Property<>("libvirt.events.enabled", true);
708708

709709
/**
710710
* Can only be used if developer = true. This property is used to define the local bridge name and private network name.<br>

server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
import com.cloud.vm.VirtualMachine;
119119
import com.cloud.vm.VirtualMachineManager;
120120
import com.cloud.vm.VirtualMachineProfile;
121-
import com.cloud.vm.VmDetailConstants;
122121
import com.cloud.vm.VmWork;
123122
import com.cloud.vm.VmWorkConstants;
124123
import com.cloud.vm.VmWorkJobHandler;
@@ -481,17 +480,12 @@ public VMSnapshot doInTransaction(TransactionStatus status) {
481480
* @param vmSnapshotId vm snapshot id
482481
*/
483482
protected void addSupportForCustomServiceOffering(long vmId, long serviceOfferingId, long vmSnapshotId) {
484-
ServiceOfferingVO serviceOfferingVO = _serviceOfferingDao.findById(serviceOfferingId);
485-
if (serviceOfferingVO.isDynamic()) {
486-
List<UserVmDetailVO> vmDetails = _userVmDetailsDao.listDetails(vmId);
487-
List<VMSnapshotDetailsVO> vmSnapshotDetails = new ArrayList<VMSnapshotDetailsVO>();
488-
for (UserVmDetailVO detail : vmDetails) {
489-
if(detail.getName().equalsIgnoreCase(VmDetailConstants.CPU_NUMBER) || detail.getName().equalsIgnoreCase(VmDetailConstants.CPU_SPEED) || detail.getName().equalsIgnoreCase(VmDetailConstants.MEMORY)) {
490-
vmSnapshotDetails.add(new VMSnapshotDetailsVO(vmSnapshotId, detail.getName(), detail.getValue(), detail.isDisplay()));
491-
}
492-
}
493-
_vmSnapshotDetailsDao.saveDetails(vmSnapshotDetails);
483+
List<UserVmDetailVO> vmDetails = _userVmDetailsDao.listDetails(vmId);
484+
List<VMSnapshotDetailsVO> vmSnapshotDetails = new ArrayList<VMSnapshotDetailsVO>();
485+
for (UserVmDetailVO detail : vmDetails) {
486+
vmSnapshotDetails.add(new VMSnapshotDetailsVO(vmSnapshotId, detail.getName(), detail.getValue(), detail.isDisplay()));
494487
}
488+
_vmSnapshotDetailsDao.saveDetails(vmSnapshotDetails);
495489
}
496490

497491
@Override

ui/src/config/section/network.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,6 @@ export default {
131131
listView: true,
132132
popup: true,
133133
show: () => {
134-
if (!store.getters.zones || store.getters.zones.length === 0) {
135-
return false
136-
}
137-
// const AdvancedZones = store.getters.zones.filter(zone => zone.networktype === 'Advanced')
138134
const AdvancedZonesWithoutSG = store.getters.zones.filter(zone => zone.securitygroupsenabled === false)
139135
if (isAdmin() || (AdvancedZonesWithoutSG && AdvancedZonesWithoutSG.length > 0)) {
140136
return true

0 commit comments

Comments
 (0)