abh1sar commented on code in PR #11754:
URL: https://github.com/apache/cloudstack/pull/11754#discussion_r2418553879
##########
ui/src/views/storage/CreateVMFromBackup.vue:
##########
@@ -29,7 +29,7 @@
<a-form-item :label="$t('label.name.optional')" name="name">
<a-input v-model:value="form.name" />
</a-form-item>
- <a-form-item v-if="!resource.virtualmachineid"
name="preserveIpAddresses" style="margin-top: 8px">
+ <a-form-item v-if="resource.backupvmexpunged"
name="preserveIpAddresses" style="margin-top: 8px">
Review Comment:
Done
##########
ui/src/views/storage/CreateVMFromBackup.vue:
##########
@@ -118,28 +118,17 @@ export default {
this.backupOffering = backupOfferings[0]
})
},
- fetchBackupRepository () {
- if (this.backupOffering.provider !== 'nas') {
- return
- }
- getAPI('listBackupRepositories', {
- id: this.backupOffering.externalid
- }).then(response => {
- const backupRepositories =
response.listbackuprepositoriesresponse.backuprepository || []
- this.backupRepository = backupRepositories[0]
- })
- },
populatePreFillData () {
this.vmdetails = this.resource.vmdetails
this.dataPreFill.zoneid = this.resource.zoneid
- this.dataPreFill.crosszoneinstancecreation =
this.backupRepository?.crosszoneinstancecreation ||
this.backupOffering.provider === 'dummy'
+ this.dataPreFill.crosszoneinstancecreation =
this.backupOffering?.crosszoneinstancecreation || this.backupOffering.provider
=== 'dummy'
this.dataPreFill.isIso = (this.vmdetails.isiso === 'true')
this.dataPreFill.backupid = this.resource.id
this.dataPreFill.computeofferingid = this.vmdetails.serviceofferingid
this.dataPreFill.templateid = this.vmdetails.templateid
this.dataPreFill.allowtemplateisoselection = true
this.dataPreFill.isoid = this.vmdetails.templateid
- this.dataPreFill.allowIpAddressesFetch = !this.resource.virtualmachineid
+ this.dataPreFill.allowIpAddressesFetch = this.resource.backupvmexpunged
Review Comment:
Done
##########
api/src/main/java/org/apache/cloudstack/api/ApiConstants.java:
##########
@@ -63,6 +63,7 @@ public class ApiConstants {
public static final String BACKUP_STORAGE_LIMIT = "backupstoragelimit";
public static final String BACKUP_STORAGE_TOTAL = "backupstoragetotal";
public static final String BACKUP_VM_OFFERING_REMOVED =
"vmbackupofferingremoved";
+ public static final String BACKUP_VM_EXPUNGED = "backupvmexpunged";
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]