Skip to content

Commit ba7b6dc

Browse files
author
Landry JUGE
committed
Fixing ConfigurationManagerImpl to implement offering categories
1 parent 104cb32 commit ba7b6dc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3943,7 +3943,7 @@ public ServiceOffering cloneServiceOffering(final CloneServiceOfferingCmd cmd) {
39433943
diskParams.iopsWriteRate, diskParams.iopsWriteRateMax, diskParams.iopsWriteRateMaxLength,
39443944
diskParams.hypervisorSnapshotReserve, diskParams.cacheMode, customParams.storagePolicy, dynamicScalingEnabled,
39453945
diskOfferingId, diskOfferingStrictness, isCustomized, encryptRoot,
3946-
vgpuProfileId, finalGpuCount, gpuDisplay, purgeResources, leaseParams.leaseDuration, leaseParams.leaseExpiryAction);
3946+
vgpuProfileId, finalGpuCount, gpuDisplay, purgeResources, leaseParams.leaseDuration, leaseParams.leaseExpiryAction, sourceOffering.getCategoryId());
39473947
}
39483948

39493949
private ServiceOfferingVO getAndValidateSourceOffering(Long sourceOfferingId) {

server/src/test/java/com/cloud/configuration/ConfigurationManagerCloneIntegrationTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public void testCloneServiceOfferingInheritsAllPropertiesFromSource() {
251251
anyString(), anyMap(), anyLong(), any(Boolean.class),
252252
anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(),
253253
any(Integer.class), anyString(), anyLong(), anyBoolean(), anyLong(), anyBoolean(), anyBoolean(), anyBoolean(),
254-
anyLong(), any(Integer.class), any(Boolean.class), anyBoolean(), any(Integer.class), any(VMLeaseManager.ExpiryAction.class)
254+
anyLong(), any(Integer.class), any(Boolean.class), anyBoolean(), any(Integer.class), any(VMLeaseManager.ExpiryAction.class), anyLong()
255255
);
256256

257257
ServiceOffering result = configurationManager.cloneServiceOffering(cmd);
@@ -328,7 +328,7 @@ public void testCloneServiceOfferingOverridesProvidedParameters() {
328328
anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(),
329329
anyLong(), anyLong(), anyInt(), anyString(), anyLong(), anyBoolean(), anyLong(),
330330
anyBoolean(), anyBoolean(), anyBoolean(), anyLong(), anyInt(), anyBoolean(),
331-
anyBoolean(), anyInt(), any());
331+
anyBoolean(), anyInt(), any(), anyLong());
332332

333333
ServiceOffering result = configurationManager.cloneServiceOffering(cmd);
334334

@@ -553,7 +553,7 @@ public void testCloneServiceOfferingCanInheritDetailsFromSource() {
553553
anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(),
554554
anyLong(), anyLong(), anyInt(), anyString(), anyLong(), anyBoolean(), anyLong(),
555555
anyBoolean(), anyBoolean(), anyBoolean(), anyLong(), anyInt(), anyBoolean(),
556-
anyBoolean(), anyInt(), any());
556+
anyBoolean(), anyInt(), any(), anyLong());
557557

558558
ServiceOffering result = configurationManager.cloneServiceOffering(cmd);
559559

0 commit comments

Comments
 (0)