infra: add support for ILBVM migration

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2020-02-10 15:21:49 +05:30
parent f20d9cb50a
commit f3a174b29c
2 changed files with 14 additions and 1 deletions

View File

@ -17,7 +17,7 @@
<template>
<a
v-if="['vm', 'systemvm', 'router'].includes($route.meta.name)"
v-if="['vm', 'systemvm', 'router', 'ilbvm'].includes($route.meta.name)"
:href="'/client/console?cmd=access&vm=' + resource.id"
target="_blank">
<a-button style="margin-right: 5px" shape="circle" type="dashed" :size="size" :disabled="['Stopped', 'Error', 'Destroyed'].includes(resource.state)" >

View File

@ -37,6 +37,19 @@ export default {
dataView: true,
args: ['forced'],
show: (record) => { return record.state === 'Running' }
},
{
api: 'migrateSystemVm',
icon: 'drag',
label: 'label.action.migrate.router',
dataView: true,
show: (record) => { return record.state === 'Running' },
args: ['virtualmachineid', 'hostid'],
mapping: {
virtualmachineid: {
value: (record) => { return record.id }
}
}
}
]
}