Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions developer/design/ablestack-v2k-n2k-cloud-import-integration.ko.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<!--
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.
-->
# ABLESTACK v2k/n2k Cloud Import Integration Design

## 1. 목표
Expand Down
18 changes: 18 additions & 0 deletions developer/design/import-vm-task-actions-design.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<!--
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.
-->
# Import VM Task Action Design

## Goal
Expand Down
18 changes: 18 additions & 0 deletions developer/design/import-vm-task-sync-progress-design.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<!--
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.
-->
# Import VM Task Sync Progress Design

## Goal
Expand Down
18 changes: 18 additions & 0 deletions developer/design/n2k-cloud-background-execution.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<!--
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.
-->
# N2K Cloud Background Execution Alignment

## Goal
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<!--
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.
-->
# `main -> ablestack-europa` 체리픽 후보 추적 문서

## 목적
Expand Down
18 changes: 18 additions & 0 deletions developer/history/ui-test-review-checklist-2026-04-17-plus.ko.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<!--
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.
-->
# UI 테스트 / 검토 체크리스트 - `2026-04-17` 이후 `ablestack-europa`

## 목적
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Script> ignored = Mockito.mockStatic(Script.class)) {
Mockito.when(Script.runSimpleBashScript(Mockito.anyString(), Mockito.anyInt())).thenReturn("Job type: None");

verify(libvirtComputingResourceMock, times(1)).getLibvirtUtilitiesHelper();
try {
verify(libvirtUtilitiesHelper, times(1)).getConnectionByVmName(vmName);
} catch (final LibvirtException e) {
fail(e.getMessage());
final Answer answer = wrapper.execute(command, libvirtComputingResourceMock);
assertTrue(answer.getResult());

verify(libvirtComputingResourceMock, times(1)).getLibvirtUtilitiesHelper();
try {
verify(libvirtUtilitiesHelper, times(1)).getConnectionByVmName(vmName);
} catch (final LibvirtException e) {
fail(e.getMessage());
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -200,6 +201,8 @@ public class SnapshotManagerTest {
ImageStoreEntity imageStoreEntityMock;
@Mock
DataStoreManager dataStoreManagerMock;
@Mock
BackupDao backupDao;

SnapshotPolicyVO snapshotPolicyVoInstance;

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -111,6 +113,9 @@ public class HypervisorTemplateAdapterTest {
@Mock
TemplateDataStoreDao _templateStoreDao;

@Mock
ImageStoreDao _imgStoreDao;

@Mock
UsageEventDao _usageEventDao;

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -466,12 +475,9 @@ public void isZoneAndImageStoreAvailableTestImageStoreDoesNotHaveEnoughCapacityS
Set<Long> 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);
Expand All @@ -489,12 +495,9 @@ public void isZoneAndImageStoreAvailableTestImageStoreHasEnoughCapacityAndZoneSe
Set<Long> 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);
Expand All @@ -512,12 +515,9 @@ public void isZoneAndImageStoreAvailableTestTemplateIsPrivateAndItIsAlreadyAlloc
Set<Long> 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);
Expand All @@ -535,12 +535,9 @@ public void isZoneAndImageStoreAvailableTestTemplateIsPrivateAndItIsNotAlreadyAl
Set<Long> 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);
Expand Down
5 changes: 0 additions & 5 deletions server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<VirtualMachineProfile.Param, Object> params = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -145,6 +148,8 @@ public class VMSnapshotManagerTest {
@Mock
UserVmManager _userVmManager;
@Mock
BackupDao backupDao;
@Mock
DiskOfferingDao _diskOfferingDao;
@Mock
DiskOfferingVO diskOffering;
Expand Down Expand Up @@ -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<VMSnapshotVO>());
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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, BackupProvider> backupProvidersMap = new HashMap<>();
backupProvidersMap.put(backupProvider.getName().toLowerCase(), backupProvider);
ReflectionTestUtils.setField(backupManager, "backupProvidersMap", backupProvidersMap);
Expand Down Expand Up @@ -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<Long> 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);
Expand Down
Loading