You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/02/08 12:11:49 UTC
[cloudstack-primate] branch master updated: storage: fix migrate
volume API usage and update apis.remaining
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
The following commit(s) were added to refs/heads/master by this push:
new 94da69f storage: fix migrate volume API usage and update apis.remaining
94da69f is described below
commit 94da69f91caa2296838a6dc564616248f6d65d00
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Sat Feb 8 17:41:03 2020 +0530
storage: fix migrate volume API usage and update apis.remaining
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
docs/api/apis.remaining | 17 ---------------
src/views/storage/MigrateVolume.vue | 42 ++++++++++++++++++++++++-------------
2 files changed, 28 insertions(+), 31 deletions(-)
diff --git a/docs/api/apis.remaining b/docs/api/apis.remaining
index 57bb877..c995216 100644
--- a/docs/api/apis.remaining
+++ b/docs/api/apis.remaining
@@ -1,27 +1,10 @@
-addResourceDetail
createLBHealthCheckPolicy
-createManagementNetworkIpRange
-createNetworkACL
-createSnapshotFromVMSnapshot
-createStorageNetworkIpRange
-createVlanIpRange
-dedicatePublicIpRange
deleteLBHealthCheckPolicy
-deleteManagementNetworkIpRange
-deleteNetworkACL
-deleteStorageNetworkIpRange
-deleteVlanIpRange
-findStoragePoolsForMigration
listDeploymentPlanners
listHostTags
listInternalLoadBalancerVMs
listLBHealthCheckPolicies
-listStorageNetworkIpRange
listStorageProviders
listStorageTags
-listVlanIpRanges
-moveNetworkAclItem
-releasePublicIpRange
startInternalLoadBalancerVM
stopInternalLoadBalancerVM
-updateNetworkACLItem
diff --git a/src/views/storage/MigrateVolume.vue b/src/views/storage/MigrateVolume.vue
index 56ecfe7..fbfd694 100644
--- a/src/views/storage/MigrateVolume.vue
+++ b/src/views/storage/MigrateVolume.vue
@@ -22,7 +22,7 @@
<p class="modal-form__label">{{ $t('storagePool') }}</p>
<a-select v-model="selectedStoragePool" style="width: 100%;">
<a-select-option v-for="(storagePool, index) in storagePools" :value="storagePool.id" :key="index">
- {{ storagePool.name }}
+ {{ storagePool.name }} <span v-if="resource.virtualmachineid">{{ storagePool.suitableformigration ? '(Suitable)' : '(Not Suitable)'}}</span>
</a-select-option>
</a-select>
<template v-if="this.resource.virtualmachineid">
@@ -78,24 +78,39 @@ export default {
selectedDiskOffering: null
}
},
- created () {
+ mounted () {
this.fetchStoragePools()
this.resource.virtualmachineid && this.fetchDiskOfferings()
},
methods: {
fetchStoragePools () {
- api('listStoragePools', {
- zoneid: this.resource.zoneid
- }).then(response => {
- this.storagePools = response.liststoragepoolsresponse.storagepool
- this.selectedStoragePool = this.storagePools[0].id
- }).catch(error => {
- this.$notification.error({
- message: `Error ${error.response.status}`,
- description: error.response.data.errorresponse.errortext
+ if (this.resource.virtualmachineid) {
+ api('findStoragePoolsForMigration', {
+ id: this.resource.id
+ }).then(response => {
+ this.storagePools = response.findstoragepoolsformigrationresponse.storagepool || []
+ this.selectedStoragePool = this.storagePools[0].id || ''
+ }).catch(error => {
+ this.$notification.error({
+ message: `Error ${error.response.status}`,
+ description: error.response.data.errorresponse.errortext
+ })
+ this.closeModal()
})
- this.closeModal()
- })
+ } else {
+ api('listStoragePools', {
+ zoneid: this.resource.zoneid
+ }).then(response => {
+ this.storagePools = response.liststoragepoolsresponse.storagepool || []
+ this.selectedStoragePool = this.storagePools[0].id || ''
+ }).catch(error => {
+ this.$notification.error({
+ message: `Error ${error.response.status}`,
+ description: error.response.data.errorresponse.errortext
+ })
+ this.closeModal()
+ })
+ }
},
fetchDiskOfferings () {
api('listDiskOfferings', {
@@ -180,7 +195,6 @@ export default {
margin-top: -20px;
&__label {
- font-weight: bold;
margin-top: 10px;
margin-bottom: 5px;
}