Skip to content

Commit 425d8c7

Browse files
committed
address copilot comments
1 parent 6ea054c commit 425d8c7

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

api/src/main/java/org/apache/cloudstack/api/command/admin/backup/CloneBackupOfferingCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
@APICommand(name = "cloneBackupOffering",
5050
description = "Clones a backup offering from an existing offering",
51-
responseObject = BackupOfferingResponse.class, since = "4.14.0",
51+
responseObject = BackupOfferingResponse.class, since = "4.23.0",
5252
authorized = {RoleType.Admin})
5353
public class CloneBackupOfferingCmd extends BaseAsyncCmd implements DomainAndZoneIdResolver {
5454

@@ -63,7 +63,7 @@ public class CloneBackupOfferingCmd extends BaseAsyncCmd implements DomainAndZon
6363
required = true, description = "The ID of the source backup offering to clone from")
6464
private Long sourceOfferingId;
6565

66-
@Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING, required = false,
66+
@Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING, required = true,
6767
description = "The name of the cloned offering")
6868
private String name;
6969

server/src/main/java/com/cloud/network/vpc/VpcManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ private List<String> resolveFinalServicesList(CloneVPCOfferingCmd cmd,
955955
}
956956
normalizedDropServices.add(service.getName());
957957
}
958-
finalServices.removeAll(dropServices);
958+
finalServices.removeAll(normalizedDropServices);
959959
logger.debug("Dropped services from clone: {}", dropServices);
960960
}
961961

ui/src/components/offering/DiskOfferingForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ export default {
420420
}
421421
},
422422
handleWriteCacheTypeChange (val) {
423-
this.form.writeCacheType = val
423+
this.form.writecachetype = val
424424
},
425425
isDomainAdmin () {
426426
return ['DomainAdmin'].includes(this.$store.getters.userInfo.roletype)

ui/src/views/offering/CloneComputeOffering.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ import DetailsInput from '@/components/widgets/DetailsInput'
6868
import store from '@/store'
6969
7070
export default {
71-
name: 'CreateComputeOffering',
71+
name: 'CloneComputeOffering',
7272
mixins: [mixinForm],
7373
components: {
7474
ComputeOfferingForm,
@@ -404,7 +404,7 @@ export default {
404404
}).then(json => {
405405
this.diskOfferings = json.listdiskofferingsresponse.diskoffering || []
406406
if (this.selectedDiskOfferingId === '') {
407-
this.selectedDiskOfferingId = this.diskOfferings[0].id || ''
407+
this.selectedDiskOfferingId = this.diskOfferings?.[0]?.id || ''
408408
}
409409
}).finally(() => {
410410
this.diskOfferingLoading = false
@@ -636,7 +636,7 @@ export default {
636636
}
637637
638638
params.sourceofferingid = this.resource.id
639-
639+
this.loading = true
640640
postAPI('cloneServiceOffering', params).then(json => {
641641
const message = this.isSystem
642642
? `${this.$t('message.clone.service.offering')}: `

0 commit comments

Comments
 (0)