Merge "Change checking cinder v1 to check v2 in panels" into stable/ocata

This commit is contained in:
Jenkins 2017-06-13 08:12:00 +00:00 committed by Gerrit Code Review
commit 173f35d313
4 changed files with 32 additions and 2 deletions

View File

@ -546,7 +546,17 @@
var volumeSnapshotDeferred = $q.defer();
serviceCatalog
.ifTypeEnabled('volume')
.then(onVolumeServiceEnabled, resolvePromises);
.then(onVolumeServiceEnabled, onCheckVolumeV2);
function onCheckVolumeV2() {
serviceCatalog
.ifTypeEnabled('volumev2')
.then(onVolumeServiceEnabled, onCheckVolumeV3);
}
function onCheckVolumeV3() {
serviceCatalog
.ifTypeEnabled('volumev3')
.then(onVolumeServiceEnabled, resolvePromises);
}
function onVolumeServiceEnabled() {
model.volumeBootable = true;
novaExtensions

View File

@ -244,6 +244,10 @@
deferred.resolve();
} else if (theType === 'volume' && cinderEnabled) {
deferred.resolve();
} else if (theType === 'volumev2' && cinderEnabled) {
deferred.resolve();
} else if (theType === 'volumev3' && cinderEnabled) {
deferred.resolve();
} else {
deferred.reject();
}

View File

@ -72,7 +72,13 @@
function initAction() {
createVolumePromise = policy.ifAllowed({rules: [['volume', 'volume:create']]});
volumeServiceEnabledPromise = serviceCatalog.ifTypeEnabled('volume');
if (serviceCatalog.ifTypeEnabled('volume') ||
serviceCatalog.ifTypeEnabled('volumev2') ||
serviceCatalog.ifTypeEnabled('volumev3')) {
volumeServiceEnabledPromise = true;
} else {
volumeServiceEnabledPromise = false;
}
}
function allowed(image) {

View File

@ -0,0 +1,10 @@
---
fixes:
- |
Previously horizon assumes only ``volume`` as an endpoint for the Cinder
regardless of the API version. As a result, if deployers configure
Cinder v2/v3 API endpoint as ``volumev2`` or ``volumev3``, Volume related
menus -- "Create Volume from instance snapshot" and "Create instance from
Volume" -- were not displayed. Horizon now checks the availability of the
Block Storage service by looking for all posible endpoints ``volume``,
``volumev2`` and ``volumev3``.