vm: backend migration changes support by shwstppr · Pull Request #789 · apache/cloudstack-primate · GitHub
Skip to content
This repository was archived by the owner on Jan 20, 2021. It is now read-only.
8 changes: 8 additions & 0 deletions public/locales/en.json
12 changes: 2 additions & 10 deletions src/config/section/compute.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,8 @@ export default {
docHelp: 'adminguide/virtual_machines.html#moving-vms-between-hosts-manual-live-migration',
dataView: true,
show: (record, store) => { return ['Stopped'].includes(record.state) && ['Admin'].includes(store.userInfo.roletype) },
args: ['storageid', 'virtualmachineid'],
mapping: {
storageid: {
api: 'listStoragePools',
params: (record) => { return { zoneid: record.zoneid } }
},
virtualmachineid: {
value: (record) => { return record.id }
}
}
component: () => import('@/views/compute/MigrateVMStorage'),
popup: true
},
{
api: 'resetPasswordForVirtualMachine',
Expand Down
19 changes: 12 additions & 7 deletions src/config/section/infra/ilbvms.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,18 @@ export default {
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 }
}
}
show: (record, store) => { return record.state === 'Running' && ['Admin'].includes(store.userInfo.roletype) },
component: () => import('@/views/compute/MigrateWizard'),
popup: true
},
{
api: 'migrateSystemVm',
icon: 'drag',
label: 'label.action.migrate.systemvm.to.ps',
dataView: true,
show: (record, store) => { return ['Stopped'].includes(record.state) && ['VMware'].includes(record.hypervisor) },
component: () => import('@/views/compute/MigrateVMStorage'),
popup: true
}
]
}
23 changes: 12 additions & 11 deletions src/config/section/infra/routers.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,18 @@ export default {
icon: 'drag',
label: 'label.action.migrate.router',
dataView: true,
show: (record, store) => { return ['Running'].includes(record.state) && ['Admin'].includes(store.userInfo.roletype) },
args: ['virtualmachineid', 'hostid'],
mapping: {
virtualmachineid: {
value: (record) => { return record.id }
},
hostid: {
api: 'findHostsForMigration',
params: (record) => { return { virtualmachineid: record.id } }
}
}
show: (record, store) => { return record.state === 'Running' && ['Admin'].includes(store.userInfo.roletype) },
component: () => import('@/views/compute/MigrateWizard'),
popup: true
},
{
api: 'migrateSystemVm',
icon: 'drag',
label: 'label.action.migrate.systemvm.to.ps',
dataView: true,
show: (record, store) => { return ['Stopped'].includes(record.state) && ['VMware'].includes(record.hypervisor) },
component: () => import('@/views/compute/MigrateVMStorage'),
popup: true
},
{
api: 'runDiagnostics',
Expand Down
23 changes: 12 additions & 11 deletions src/config/section/infra/systemVms.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,18 @@ export default {
icon: 'drag',
label: 'label.action.migrate.systemvm',
dataView: true,
show: (record) => { return record.state === 'Running' },
args: ['virtualmachineid', 'hostid'],
mapping: {
virtualmachineid: {
value: (record) => { return record.id }
},
hostid: {
api: 'findHostsForMigration',
params: (record) => { return { virtualmachineid: record.id } }
}
}
show: (record, store) => { return record.state === 'Running' && ['Admin'].includes(store.userInfo.roletype) },
component: () => import('@/views/compute/MigrateWizard'),
popup: true
},
{
api: 'migrateSystemVm',
icon: 'drag',
label: 'label.action.migrate.systemvm.to.ps',
dataView: true,
show: (record, store) => { return ['Stopped'].includes(record.state) && ['VMware'].includes(record.hypervisor) },
component: () => import('@/views/compute/MigrateVMStorage'),
popup: true
},
{
api: 'runDiagnostics',
Expand Down
228 changes: 228 additions & 0 deletions src/views/compute/MigrateVMStorage.vue
Loading