From 506bcf66f04f69c942f029b172c25ccc6397026d Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 6 Oct 2020 15:00:02 +0530 Subject: [PATCH 1/9] vm: backend migration changes support Signed-off-by: Abhishek Kumar --- src/config/section/compute.js | 2 ++ src/locales/en.json | 1 + 2 files changed, 3 insertions(+) diff --git a/src/config/section/compute.js b/src/config/section/compute.js index a283fce97..a164deadb 100644 --- a/src/config/section/compute.js +++ b/src/config/section/compute.js @@ -311,6 +311,8 @@ export default { dataView: true, show: (record, store) => { return ['Stopped'].includes(record.state) && ['Admin'].includes(store.userInfo.roletype) }, args: ['storageid', 'virtualmachineid'], + component: () => import('@/views/compute/MigrateVMStorage'), + popup: true, mapping: { storageid: { api: 'listStoragePools', diff --git a/src/locales/en.json b/src/locales/en.json index fa54ea1c4..071cc106f 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -2911,6 +2911,7 @@ "message.migrating.failed": "Migration failed", "message.migrating.processing": "Migration in progress for", "message.migrating.vm.to.host.failed": "Failed to migrate VM to host", +"message.migrating.vm.to.storage.failed": "Failed to migrate VM to storage", "message.move.acl.order": "Move ACL rule order", "message.move.acl.order.failed": "Failed to move ACL rule", "message.move.acl.order.processing": "Moving ACL rule...", From 5910756019b959325bcf3fdf23e8dc0110b8756c Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 6 Oct 2020 15:10:34 +0530 Subject: [PATCH 2/9] add missing file Signed-off-by: Abhishek Kumar --- src/views/compute/MigrateVMStorage.vue | 202 +++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 src/views/compute/MigrateVMStorage.vue diff --git a/src/views/compute/MigrateVMStorage.vue b/src/views/compute/MigrateVMStorage.vue new file mode 100644 index 000000000..a69c54ebd --- /dev/null +++ b/src/views/compute/MigrateVMStorage.vue @@ -0,0 +1,202 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + + + + + + From 92dd3c796df5110bdadf450d43836ba712fe7087 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 3 Nov 2020 18:01:07 +0530 Subject: [PATCH 3/9] show storage migration required Signed-off-by: Abhishek Kumar --- src/locales/en.json | 1 + src/views/compute/MigrateWizard.vue | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/locales/en.json b/src/locales/en.json index 071cc106f..4bb473cdb 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -2019,6 +2019,7 @@ "label.storage.tags": "Storage Tags", "label.storage.traffic": "Storage Traffic", "label.storageid": "Primary Storage", +"label.storagemigrationrequired": "Storage Migration Required", "label.storagemotionenabled": "Storage Motion Enabled", "label.storagepolicy": "Storage policy", "label.storagepool": "Storage Pool", diff --git a/src/views/compute/MigrateWizard.vue b/src/views/compute/MigrateWizard.vue index af305aedd..ed4cc097a 100644 --- a/src/views/compute/MigrateWizard.vue +++ b/src/views/compute/MigrateWizard.vue @@ -47,6 +47,9 @@
{{ record.memoryused | byteToGigabyte }} GB
+
+ {{ record.requiresStorageMotion ? $t('label.yes') : $t('label.no') }} +