summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-13 08:12:00 +0000
committerGerrit Code Review <review@openstack.org>2017-06-13 08:12:00 +0000
commit173f35d31303868ba177d273904233e9ece49d2a (patch)
tree0df19aaa5917e659649c5bc7fff52e23041994f7
parent3bc399f3ae34b5eb3b18544c55c65ff8a6dc7a71 (diff)
parent7c2cd41ca2f8843fcc5931b308f1bf13a8b31606 (diff)
Merge "Change checking cinder v1 to check v2 in panels" into stable/ocata
-rw-r--r--openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js12
-rw-r--r--openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js4
-rw-r--r--openstack_dashboard/static/app/core/images/actions/create-volume.service.js8
-rw-r--r--releasenotes/notes/bug-1670789-volume-v2-v3-endpoint-e48a0a62f85b5207.yaml10
4 files changed, 32 insertions, 2 deletions
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js
index dbe2b00..f03ddb2 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js
@@ -546,7 +546,17 @@
546 var volumeSnapshotDeferred = $q.defer(); 546 var volumeSnapshotDeferred = $q.defer();
547 serviceCatalog 547 serviceCatalog
548 .ifTypeEnabled('volume') 548 .ifTypeEnabled('volume')
549 .then(onVolumeServiceEnabled, resolvePromises); 549 .then(onVolumeServiceEnabled, onCheckVolumeV2);
550 function onCheckVolumeV2() {
551 serviceCatalog
552 .ifTypeEnabled('volumev2')
553 .then(onVolumeServiceEnabled, onCheckVolumeV3);
554 }
555 function onCheckVolumeV3() {
556 serviceCatalog
557 .ifTypeEnabled('volumev3')
558 .then(onVolumeServiceEnabled, resolvePromises);
559 }
550 function onVolumeServiceEnabled() { 560 function onVolumeServiceEnabled() {
551 model.volumeBootable = true; 561 model.volumeBootable = true;
552 novaExtensions 562 novaExtensions
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js
index 133b336..87b07fe 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js
@@ -244,6 +244,10 @@
244 deferred.resolve(); 244 deferred.resolve();
245 } else if (theType === 'volume' && cinderEnabled) { 245 } else if (theType === 'volume' && cinderEnabled) {
246 deferred.resolve(); 246 deferred.resolve();
247 } else if (theType === 'volumev2' && cinderEnabled) {
248 deferred.resolve();
249 } else if (theType === 'volumev3' && cinderEnabled) {
250 deferred.resolve();
247 } else { 251 } else {
248 deferred.reject(); 252 deferred.reject();
249 } 253 }
diff --git a/openstack_dashboard/static/app/core/images/actions/create-volume.service.js b/openstack_dashboard/static/app/core/images/actions/create-volume.service.js
index 594ecf1..e80daad 100644
--- a/openstack_dashboard/static/app/core/images/actions/create-volume.service.js
+++ b/openstack_dashboard/static/app/core/images/actions/create-volume.service.js
@@ -72,7 +72,13 @@
72 72
73 function initAction() { 73 function initAction() {
74 createVolumePromise = policy.ifAllowed({rules: [['volume', 'volume:create']]}); 74 createVolumePromise = policy.ifAllowed({rules: [['volume', 'volume:create']]});
75 volumeServiceEnabledPromise = serviceCatalog.ifTypeEnabled('volume'); 75 if (serviceCatalog.ifTypeEnabled('volume') ||
76 serviceCatalog.ifTypeEnabled('volumev2') ||
77 serviceCatalog.ifTypeEnabled('volumev3')) {
78 volumeServiceEnabledPromise = true;
79 } else {
80 volumeServiceEnabledPromise = false;
81 }
76 } 82 }
77 83
78 function allowed(image) { 84 function allowed(image) {
diff --git a/releasenotes/notes/bug-1670789-volume-v2-v3-endpoint-e48a0a62f85b5207.yaml b/releasenotes/notes/bug-1670789-volume-v2-v3-endpoint-e48a0a62f85b5207.yaml
new file mode 100644
index 0000000..6642d86
--- /dev/null
+++ b/releasenotes/notes/bug-1670789-volume-v2-v3-endpoint-e48a0a62f85b5207.yaml
@@ -0,0 +1,10 @@
1---
2fixes:
3 - |
4 Previously horizon assumes only ``volume`` as an endpoint for the Cinder
5 regardless of the API version. As a result, if deployers configure
6 Cinder v2/v3 API endpoint as ``volumev2`` or ``volumev3``, Volume related
7 menus -- "Create Volume from instance snapshot" and "Create instance from
8 Volume" -- were not displayed. Horizon now checks the availability of the
9 Block Storage service by looking for all posible endpoints ``volume``,
10 ``volumev2`` and ``volumev3``.