Skip to content

Commit ca8c77f

Browse files
compute: fix usage of API based on storage motion requirement
Signed-off-by: Rohit Yadav <[email protected]>
1 parent 921ffe8 commit ca8c77f

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

ui/src/config/section/compute.js

-7
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,6 @@ export default {
193193
}
194194
}
195195
},
196-
{
197-
api: 'migrateVirtualMachineWithVolume',
198-
icon: 'export',
199-
label: 'Migrate VM with Volume(s)',
200-
dataView: true,
201-
show: (record) => { return ['Running'].includes(record.state) }
202-
},
203196
{
204197
api: 'migrateVirtualMachine',
205198
icon: 'drag',

ui/src/views/AutogenView.vue

-1
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ export default {
518518
this.listUuidOpts(param)
519519
}
520520
}
521-
console.log(this.currentAction.paramFields)
522521
this.currentAction.loading = false
523522
},
524523
listUuidOpts (param) {

ui/src/views/compute/MigrateWizard.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ export default {
112112
},
113113
submitForm () {
114114
this.loading = true
115-
api('migrateVirtualMachine', {
116-
hostid: this.hosts[this.selectedIndex].id,
115+
const host = this.hosts[this.selectedIndex]
116+
api(host.requiresStorageMotion ? 'migrateVirtualMachineWithVolume' : 'migrateVirtualMachine', {
117+
hostid: host.id,
117118
virtualmachineid: this.resource.id
118119
}).then(response => {
119120
this.$store.dispatch('AddAsyncJob', {

0 commit comments

Comments
 (0)