From 281ba3b5e34550bf9cd6b2fc6b77be91bed9c992 Mon Sep 17 00:00:00 2001 From: dhslove <44049806+dhslove@users.noreply.github.com> Date: Mon, 25 May 2026 20:17:04 +0900 Subject: [PATCH 1/3] Add license headers to import design docs --- ...tack-v2k-n2k-cloud-import-integration.ko.md | 18 ++++++++++++++++++ .../design/import-vm-task-actions-design.md | 18 ++++++++++++++++++ .../import-vm-task-sync-progress-design.md | 18 ++++++++++++++++++ .../design/n2k-cloud-background-execution.md | 18 ++++++++++++++++++ ...ropa-2026-baseline-pretriage-2026-04-23.tsv | 16 ++++++++++++++++ ...o-europa-2026-only-inventory-2026-04-23.txt | 16 ++++++++++++++++ ...o-europa-candidate-tracker-2026-04-23.ko.md | 18 ++++++++++++++++++ ...test-review-checklist-2026-04-17-plus.ko.md | 18 ++++++++++++++++++ 8 files changed, 140 insertions(+) diff --git a/developer/design/ablestack-v2k-n2k-cloud-import-integration.ko.md b/developer/design/ablestack-v2k-n2k-cloud-import-integration.ko.md index 282c131b090a..9d04d299aec8 100644 --- a/developer/design/ablestack-v2k-n2k-cloud-import-integration.ko.md +++ b/developer/design/ablestack-v2k-n2k-cloud-import-integration.ko.md @@ -1,3 +1,21 @@ + # ABLESTACK v2k/n2k Cloud Import Integration Design ## 1. 목표 diff --git a/developer/design/import-vm-task-actions-design.md b/developer/design/import-vm-task-actions-design.md index 4374f04a72a3..9d4505d2ec7b 100644 --- a/developer/design/import-vm-task-actions-design.md +++ b/developer/design/import-vm-task-actions-design.md @@ -1,3 +1,21 @@ + # Import VM Task Action Design ## Goal diff --git a/developer/design/import-vm-task-sync-progress-design.md b/developer/design/import-vm-task-sync-progress-design.md index a14ba5fb930f..d7b8dc705cf7 100644 --- a/developer/design/import-vm-task-sync-progress-design.md +++ b/developer/design/import-vm-task-sync-progress-design.md @@ -1,3 +1,21 @@ + # Import VM Task Sync Progress Design ## Goal diff --git a/developer/design/n2k-cloud-background-execution.md b/developer/design/n2k-cloud-background-execution.md index 12fd5ab78ab0..a09aeb2ce514 100644 --- a/developer/design/n2k-cloud-background-execution.md +++ b/developer/design/n2k-cloud-background-execution.md @@ -1,3 +1,21 @@ + # N2K Cloud Background Execution Alignment ## Goal diff --git a/developer/history/main-to-europa-2026-baseline-pretriage-2026-04-23.tsv b/developer/history/main-to-europa-2026-baseline-pretriage-2026-04-23.tsv index 1a742ebb9642..94a7e53ba3d1 100644 --- a/developer/history/main-to-europa-2026-baseline-pretriage-2026-04-23.tsv +++ b/developer/history/main-to-europa-2026-baseline-pretriage-2026-04-23.tsv @@ -1,3 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. sha date subject pretriage_status detail 3166e64891fc75d4d32b66d874cff3f613b09b52 2026-04-17 Add support for new variables to the GUI whitelabel runtime system (#12760) documented already present in tracker f820d0125de3f34977cb55d8a388388f04586452 2026-04-17 fix end of files and codespell errors needs_source_review diff --git a/developer/history/main-to-europa-2026-only-inventory-2026-04-23.txt b/developer/history/main-to-europa-2026-only-inventory-2026-04-23.txt index 9a95634552fd..93c8c5ab3a1b 100644 --- a/developer/history/main-to-europa-2026-only-inventory-2026-04-23.txt +++ b/developer/history/main-to-europa-2026-only-inventory-2026-04-23.txt @@ -1,3 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. 3166e64891fc75d4d32b66d874cff3f613b09b52 2026-04-17 Add support for new variables to the GUI whitelabel runtime system (#12760) f820d0125de3f34977cb55d8a388388f04586452 2026-04-17 fix end of files and codespell errors 83f705ddc58841991e01436210d64bef55d98f52 2026-04-16 Static Routes with nexthop non-functional for private gateways (#12859) diff --git a/developer/history/main-to-europa-candidate-tracker-2026-04-23.ko.md b/developer/history/main-to-europa-candidate-tracker-2026-04-23.ko.md index acec31e19436..36cdc9bb1028 100644 --- a/developer/history/main-to-europa-candidate-tracker-2026-04-23.ko.md +++ b/developer/history/main-to-europa-candidate-tracker-2026-04-23.ko.md @@ -1,3 +1,21 @@ + # `main -> ablestack-europa` 체리픽 후보 추적 문서 ## 목적 diff --git a/developer/history/ui-test-review-checklist-2026-04-17-plus.ko.md b/developer/history/ui-test-review-checklist-2026-04-17-plus.ko.md index 11d0651fefce..aa27e5756230 100644 --- a/developer/history/ui-test-review-checklist-2026-04-17-plus.ko.md +++ b/developer/history/ui-test-review-checklist-2026-04-17-plus.ko.md @@ -1,3 +1,21 @@ + # UI 테스트 / 검토 체크리스트 - `2026-04-17` 이후 `ablestack-europa` ## 목적 From f4536e21f0da30ebd643c06200f8a8c18b29cb2a Mon Sep 17 00:00:00 2001 From: dhslove <44049806+dhslove@users.noreply.github.com> Date: Mon, 25 May 2026 20:53:03 +0900 Subject: [PATCH 2/3] Fix Europa server unit test wiring --- .../storage/snapshot/SnapshotManagerTest.java | 4 ++++ .../HypervisorTemplateAdapterTest.java | 21 ++++++++----------- .../com/cloud/vm/UserVmManagerImplTest.java | 5 ----- .../vm/snapshot/VMSnapshotManagerTest.java | 7 +++++++ .../cloudstack/backup/BackupManagerTest.java | 8 ++++++- 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/server/src/test/java/com/cloud/storage/snapshot/SnapshotManagerTest.java b/server/src/test/java/com/cloud/storage/snapshot/SnapshotManagerTest.java index 41f9543031d0..8a4e59dfc973 100755 --- a/server/src/test/java/com/cloud/storage/snapshot/SnapshotManagerTest.java +++ b/server/src/test/java/com/cloud/storage/snapshot/SnapshotManagerTest.java @@ -58,6 +58,7 @@ import com.cloud.vm.snapshot.dao.VMSnapshotDao; import org.apache.cloudstack.api.command.user.snapshot.ExtractSnapshotCmd; +import org.apache.cloudstack.backup.dao.BackupDao; import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; @@ -200,6 +201,8 @@ public class SnapshotManagerTest { ImageStoreEntity imageStoreEntityMock; @Mock DataStoreManager dataStoreManagerMock; + @Mock + BackupDao backupDao; SnapshotPolicyVO snapshotPolicyVoInstance; @@ -233,6 +236,7 @@ public void setup() throws ResourceAllocationException { when(_volumeDao.findById(anyLong())).thenReturn(volumeMock); when(volumeMock.getState()).thenReturn(Volume.State.Ready); when(volumeMock.getId()).thenReturn(TEST_VOLUME_ID); + when(backupDao.listByVmId(nullable(Long.class), anyLong())).thenReturn(Collections.emptyList()); when(volumeFactory.getVolume(anyLong())).thenReturn(volumeInfoMock); when(volumeInfoMock.getDataStore()).thenReturn(storeMock); when(volumeInfoMock.getState()).thenReturn(Volume.State.Ready); diff --git a/server/src/test/java/com/cloud/template/HypervisorTemplateAdapterTest.java b/server/src/test/java/com/cloud/template/HypervisorTemplateAdapterTest.java index 9c8f2f6a831f..e1f0ee47c2a0 100644 --- a/server/src/test/java/com/cloud/template/HypervisorTemplateAdapterTest.java +++ b/server/src/test/java/com/cloud/template/HypervisorTemplateAdapterTest.java @@ -51,6 +51,8 @@ import org.apache.cloudstack.framework.messagebus.MessageBus; import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO; +import org.apache.cloudstack.storage.datastore.db.ImageStoreDao; +import org.apache.cloudstack.storage.datastore.db.ImageStoreVO; import org.apache.cloudstack.storage.heuristics.HeuristicRuleHelper; import org.apache.cloudstack.storage.image.datastore.ImageStoreEntity; import org.apache.logging.log4j.Logger; @@ -111,6 +113,9 @@ public class HypervisorTemplateAdapterTest { @Mock TemplateDataStoreDao _templateStoreDao; + @Mock + ImageStoreDao _imgStoreDao; + @Mock UsageEventDao _usageEventDao; @@ -160,6 +165,10 @@ public void before() { closeable = MockitoAnnotations.openMocks(this); ReflectionTestUtils.setField(_adapter, "storeMgr", dataStoreManagerMock); ReflectionTestUtils.setField(_adapter, "_statsCollector", statsCollectorMock); + ReflectionTestUtils.setField(_adapter, "_imgStoreDao", _imgStoreDao); + ImageStoreVO imageStoreVO = Mockito.mock(ImageStoreVO.class); + Mockito.when(imageStoreVO.isReadonly()).thenReturn(false); + Mockito.when(_imgStoreDao.findById(Mockito.anyLong())).thenReturn(imageStoreVO); } @After @@ -466,12 +475,9 @@ public void isZoneAndImageStoreAvailableTestImageStoreDoesNotHaveEnoughCapacityS Set zoneSet = null; boolean isTemplatePrivate = false; DataCenterVO dataCenterVOMock = Mockito.mock(DataCenterVO.class); - DataStore writableStoreMock = Mockito.mock(DataStore.class); - Mockito.when(writableStoreMock.getId()).thenReturn(1L); Mockito.when(_dcDao.findById(Mockito.anyLong())).thenReturn(dataCenterVOMock); Mockito.when(dataCenterVOMock.getAllocationState()).thenReturn(Grouping.AllocationState.Enabled); - Mockito.when(dataStoreManagerMock.getImageStoresByScopeExcludingReadOnly(Mockito.any())).thenReturn(List.of(writableStoreMock)); Mockito.when(statsCollectorMock.imageStoreHasEnoughCapacity(any(DataStore.class))).thenReturn(false); boolean result = _adapter.isZoneAndImageStoreAvailable(dataStoreMock, zoneId, zoneSet, isTemplatePrivate); @@ -489,12 +495,9 @@ public void isZoneAndImageStoreAvailableTestImageStoreHasEnoughCapacityAndZoneSe Set zoneSet = null; boolean isTemplatePrivate = false; DataCenterVO dataCenterVOMock = Mockito.mock(DataCenterVO.class); - DataStore writableStoreMock = Mockito.mock(DataStore.class); - Mockito.when(writableStoreMock.getId()).thenReturn(1L); Mockito.when(_dcDao.findById(Mockito.anyLong())).thenReturn(dataCenterVOMock); Mockito.when(dataCenterVOMock.getAllocationState()).thenReturn(Grouping.AllocationState.Enabled); - Mockito.when(dataStoreManagerMock.getImageStoresByScopeExcludingReadOnly(Mockito.any())).thenReturn(List.of(writableStoreMock)); Mockito.when(statsCollectorMock.imageStoreHasEnoughCapacity(any(DataStore.class))).thenReturn(true); boolean result = _adapter.isZoneAndImageStoreAvailable(dataStoreMock, zoneId, zoneSet, isTemplatePrivate); @@ -512,12 +515,9 @@ public void isZoneAndImageStoreAvailableTestTemplateIsPrivateAndItIsAlreadyAlloc Set zoneSet = Set.of(1L); boolean isTemplatePrivate = true; DataCenterVO dataCenterVOMock = Mockito.mock(DataCenterVO.class); - DataStore writableStoreMock = Mockito.mock(DataStore.class); - Mockito.when(writableStoreMock.getId()).thenReturn(1L); Mockito.when(_dcDao.findById(Mockito.anyLong())).thenReturn(dataCenterVOMock); Mockito.when(dataCenterVOMock.getAllocationState()).thenReturn(Grouping.AllocationState.Enabled); - Mockito.when(dataStoreManagerMock.getImageStoresByScopeExcludingReadOnly(Mockito.any())).thenReturn(List.of(writableStoreMock)); Mockito.when(statsCollectorMock.imageStoreHasEnoughCapacity(any(DataStore.class))).thenReturn(true); boolean result = _adapter.isZoneAndImageStoreAvailable(dataStoreMock, zoneId, zoneSet, isTemplatePrivate); @@ -535,12 +535,9 @@ public void isZoneAndImageStoreAvailableTestTemplateIsPrivateAndItIsNotAlreadyAl Set zoneSet = new HashSet<>(); boolean isTemplatePrivate = true; DataCenterVO dataCenterVOMock = Mockito.mock(DataCenterVO.class); - DataStore writableStoreMock = Mockito.mock(DataStore.class); - Mockito.when(writableStoreMock.getId()).thenReturn(1L); Mockito.when(_dcDao.findById(Mockito.anyLong())).thenReturn(dataCenterVOMock); Mockito.when(dataCenterVOMock.getAllocationState()).thenReturn(Grouping.AllocationState.Enabled); - Mockito.when(dataStoreManagerMock.getImageStoresByScopeExcludingReadOnly(Mockito.any())).thenReturn(List.of(writableStoreMock)); Mockito.when(statsCollectorMock.imageStoreHasEnoughCapacity(any(DataStore.class))).thenReturn(true); boolean result = _adapter.isZoneAndImageStoreAvailable(dataStoreMock, zoneId, zoneSet, isTemplatePrivate); diff --git a/server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java b/server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java index 493185ff85f6..28b50a53fd7d 100644 --- a/server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java +++ b/server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java @@ -3658,11 +3658,6 @@ public void testRestoreVMFromBackup() throws ResourceUnavailableException, Insuf when(vm.getId()).thenReturn(vmId); when(vm.getState()).thenReturn(VirtualMachine.State.Running); when(vm.getTemplateId()).thenReturn(templateId); - BackupVO backup = mock(BackupVO.class); - when(backupDao.findById(backupId)).thenReturn(backup); - when(backup.getBackupOfferingId()).thenReturn(2L); - when(backupManager.getBackupProviderForOffering(2L)).thenReturn(null); - when(backupManager.restoreBackupToVM(backupId, vmId)).thenReturn(true); Map params = new HashMap<>(); diff --git a/server/src/test/java/com/cloud/vm/snapshot/VMSnapshotManagerTest.java b/server/src/test/java/com/cloud/vm/snapshot/VMSnapshotManagerTest.java index 65bd71755086..ca341cea58b9 100644 --- a/server/src/test/java/com/cloud/vm/snapshot/VMSnapshotManagerTest.java +++ b/server/src/test/java/com/cloud/vm/snapshot/VMSnapshotManagerTest.java @@ -63,6 +63,7 @@ import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.api.ResourceDetail; +import org.apache.cloudstack.backup.dao.BackupDao; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; @@ -74,6 +75,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.mockito.Spy; +import org.springframework.test.util.ReflectionTestUtils; import java.util.ArrayList; import java.util.Arrays; @@ -89,6 +91,7 @@ import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.ArgumentMatchers.nullable; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; @@ -145,6 +148,8 @@ public class VMSnapshotManagerTest { @Mock UserVmManager _userVmManager; @Mock + BackupDao backupDao; + @Mock DiskOfferingDao _diskOfferingDao; @Mock DiskOfferingVO diskOffering; @@ -212,10 +217,12 @@ public void setup() { _vmSnapshotMgr._vmSnapshotDetailsDao = _vmSnapshotDetailsDao; _vmSnapshotMgr._userVmManager = _userVmManager; _vmSnapshotMgr._diskOfferingDao = _diskOfferingDao; + ReflectionTestUtils.setField(_vmSnapshotMgr, "backupDao", backupDao); when(_userVMDao.findById(anyLong())).thenReturn(vmMock); when(_vmSnapshotDao.findByName(anyLong(), anyString())).thenReturn(null); when(_vmSnapshotDao.findByVm(anyLong())).thenReturn(new ArrayList()); + when(backupDao.listByVmId(nullable(Long.class), anyLong())).thenReturn(new ArrayList<>()); when(_hypervisorCapabilitiesDao.isVmSnapshotEnabled(Hypervisor.HypervisorType.XenServer, "default")).thenReturn(true); when(_serviceOfferingDetailsDao.findDetail(anyLong(), anyString())).thenReturn(null); diff --git a/server/src/test/java/org/apache/cloudstack/backup/BackupManagerTest.java b/server/src/test/java/org/apache/cloudstack/backup/BackupManagerTest.java index fd5e03cacf80..b16f99de8f38 100644 --- a/server/src/test/java/org/apache/cloudstack/backup/BackupManagerTest.java +++ b/server/src/test/java/org/apache/cloudstack/backup/BackupManagerTest.java @@ -708,7 +708,7 @@ public void createBackupTestCreateScheduledBackup() throws ResourceAllocationExc when(backup.getId()).thenReturn(backupId); when(backup.getSize()).thenReturn(newBackupSize); when(backupProvider.getName()).thenReturn("testbackupprovider"); - when(backupProvider.takeBackup(vmInstanceVOMock, null, scheduleId)).thenReturn(new Pair<>(true, backup)); + when(backupProvider.takeBackup(vmInstanceVOMock, null)).thenReturn(new Pair<>(true, backup)); Map backupProvidersMap = new HashMap<>(); backupProvidersMap.put(backupProvider.getName().toLowerCase(), backupProvider); ReflectionTestUtils.setField(backupManager, "backupProvidersMap", backupProvidersMap); @@ -854,15 +854,21 @@ public void testBackupSyncTask() { BackupProvider backupProvider = mock(BackupProvider.class); when(backupProvider.getName()).thenReturn("testbackupprovider"); + when(backupProvider.supportsBackgroundSync()).thenReturn(true); + when(backupProvider.supportsOutOfBandBackupSync()).thenReturn(true); backupManager.setBackupProviders(List.of(backupProvider)); backupManager.start(); VMInstanceVO vm = Mockito.mock(VMInstanceVO.class); when(vm.getId()).thenReturn(vmId); when(vm.getAccountId()).thenReturn(accountId); + when(vm.getBackupOfferingId()).thenReturn(1L); List vmIds = List.of(vmId); when(backupDao.listVmIdsWithBackupsInZone(dataCenterId)).thenReturn(vmIds); when(vmInstanceDao.listByZoneAndBackupOffering(dataCenterId, null)).thenReturn(List.of(vm)); + BackupOfferingVO backupOffering = mock(BackupOfferingVO.class); + when(backupOffering.getProvider()).thenReturn("testbackupprovider"); + when(backupOfferingDao.findById(1L)).thenReturn(backupOffering); Backup.RestorePoint restorePoint1 = new Backup.RestorePoint(restorePoint1ExternalId, DateUtil.now(), "Full", restorePointSize, 0L); Backup.RestorePoint restorePoint2 = new Backup.RestorePoint("12345", DateUtil.now(), "Full", restorePointSize, 0L); From c8e35c8133a737d8bec78329ee2987bf9c33caa6 Mon Sep 17 00:00:00 2001 From: dhslove <44049806+dhslove@users.noreply.github.com> Date: Mon, 25 May 2026 21:22:26 +0900 Subject: [PATCH 3/3] Stabilize KVM VM stats unit test --- .../resource/LibvirtComputingResourceTest.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java b/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java index 0eb311ece73b..dfc4efb053c2 100644 --- a/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java +++ b/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java @@ -1137,14 +1137,18 @@ public void testGetVmStatsCommand() { final LibvirtRequestWrapper wrapper = LibvirtRequestWrapper.getInstance(); assertNotNull(wrapper); - final Answer answer = wrapper.execute(command, libvirtComputingResourceMock); - assertTrue(answer.getResult()); + try (MockedStatic