Change the Octavia Barbican namespace
The octavia dashboard has a built-in barbican rest API client used to access barbican for certificate selection during load blanancer creation. Unfortunately, this client used the "barbican" namespace, which is now used by the barbican-ui dashboard. This patch renames the octavia client namespace to be octavia-barbican to eliminate any namespace collisions with the barbican-ui dashboard. Change-Id: Idec2c182b2758a148ae9d0efa251510d5e7985a3
This commit is contained in:
parent
91042f2b10
commit
7e390312ea
@ -52,7 +52,7 @@ class SSLCertificates(generic.View):
|
|||||||
"""API for working with SSL certificate containers.
|
"""API for working with SSL certificate containers.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
url_regex = r'barbican/certificates/$'
|
url_regex = r'octavia-barbican/certificates/$'
|
||||||
|
|
||||||
@rest_utils.ajax()
|
@rest_utils.ajax()
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
@ -72,7 +72,7 @@ class Secrets(generic.View):
|
|||||||
"""API for working with secrets.
|
"""API for working with secrets.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
url_regex = r'barbican/secrets/$'
|
url_regex = r'octavia-barbican/secrets/$'
|
||||||
|
|
||||||
@rest_utils.ajax()
|
@rest_utils.ajax()
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
|
@ -18,23 +18,23 @@
|
|||||||
|
|
||||||
angular
|
angular
|
||||||
.module('horizon.app.core.openstack-service-api')
|
.module('horizon.app.core.openstack-service-api')
|
||||||
.factory('horizon.app.core.openstack-service-api.barbican', barbicanAPI);
|
.factory('horizon.app.core.openstack-service-api.octavia-barbican', octaviaBarbicanAPI);
|
||||||
|
|
||||||
barbicanAPI.$inject = [
|
octaviaBarbicanAPI.$inject = [
|
||||||
'horizon.framework.util.http.service',
|
'horizon.framework.util.http.service',
|
||||||
'horizon.framework.widgets.toast.service'
|
'horizon.framework.widgets.toast.service'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc service
|
* @ngdoc service
|
||||||
* @name horizon.app.core.openstack-service-api.barbican
|
* @name horizon.app.core.openstack-service-api.octavia-barbican
|
||||||
* @description Provides direct pass through to barbican with NO abstraction.
|
* @description Provides direct pass through to barbican with NO abstraction.
|
||||||
* @param apiService The horizon core API service.
|
* @param apiService The horizon core API service.
|
||||||
* @param toastService The horizon toast service.
|
* @param toastService The horizon toast service.
|
||||||
* @returns The barbican service API.
|
* @returns The octavia barbican service API.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function barbicanAPI(apiService, toastService) {
|
function octaviaBarbicanAPI(apiService, toastService) {
|
||||||
var service = {
|
var service = {
|
||||||
getCertificates: getCertificates,
|
getCertificates: getCertificates,
|
||||||
getSecrets: getSecrets
|
getSecrets: getSecrets
|
||||||
@ -47,7 +47,7 @@
|
|||||||
// SSL Certificate Containers
|
// SSL Certificate Containers
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name horizon.app.core.openstack-service-api.barbican.getCertificates
|
* @name horizon.app.core.openstack-service-api.octavia-barbican.getCertificates
|
||||||
* @description
|
* @description
|
||||||
* Get a list of SSL certificate containers.
|
* Get a list of SSL certificate containers.
|
||||||
*
|
*
|
||||||
@ -57,7 +57,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function getCertificates(quiet) {
|
function getCertificates(quiet) {
|
||||||
var promise = apiService.get('/api/barbican/certificates/');
|
var promise = apiService.get('/api/octavia-barbican/certificates/');
|
||||||
return quiet ? promise : promise.error(function handleError() {
|
return quiet ? promise : promise.error(function handleError() {
|
||||||
toastService.add('error', gettext('Unable to retrieve SSL certificates.'));
|
toastService.add('error', gettext('Unable to retrieve SSL certificates.'));
|
||||||
});
|
});
|
||||||
@ -66,7 +66,7 @@
|
|||||||
// Secrets
|
// Secrets
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name horizon.app.core.openstack-service-api.barbican.getSecrets
|
* @name horizon.app.core.openstack-service-api.octavia-barbican.getSecrets
|
||||||
* @description
|
* @description
|
||||||
* Get a list of secrets.
|
* Get a list of secrets.
|
||||||
*
|
*
|
||||||
@ -76,7 +76,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function getSecrets(quiet) {
|
function getSecrets(quiet) {
|
||||||
var promise = apiService.get('/api/barbican/secrets/');
|
var promise = apiService.get('/api/octavia-barbican/secrets/');
|
||||||
return quiet ? promise : promise.error(function handleError() {
|
return quiet ? promise : promise.error(function handleError() {
|
||||||
toastService.add('error', gettext('Unable to retrieve secrets.'));
|
toastService.add('error', gettext('Unable to retrieve secrets.'));
|
||||||
});
|
});
|
@ -27,9 +27,11 @@
|
|||||||
|
|
||||||
beforeEach(module('horizon.app.core.openstack-service-api'));
|
beforeEach(module('horizon.app.core.openstack-service-api'));
|
||||||
|
|
||||||
beforeEach(inject(['horizon.app.core.openstack-service-api.barbican', function(barbicanAPI) {
|
beforeEach(
|
||||||
service = barbicanAPI;
|
inject(['horizon.app.core.openstack-service-api.octavia-barbican',
|
||||||
}]));
|
function(octaviaBarbicanAPI) {
|
||||||
|
service = octaviaBarbicanAPI;
|
||||||
|
}]));
|
||||||
|
|
||||||
it('defines the service', function() {
|
it('defines the service', function() {
|
||||||
expect(service).toBeDefined();
|
expect(service).toBeDefined();
|
||||||
@ -39,13 +41,13 @@
|
|||||||
{
|
{
|
||||||
func: "getCertificates",
|
func: "getCertificates",
|
||||||
method: "get",
|
method: "get",
|
||||||
path: "/api/barbican/certificates/",
|
path: "/api/octavia-barbican/certificates/",
|
||||||
error: "Unable to retrieve SSL certificates."
|
error: "Unable to retrieve SSL certificates."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
func: "getSecrets",
|
func: "getSecrets",
|
||||||
method: "get",
|
method: "get",
|
||||||
path: "/api/barbican/secrets/",
|
path: "/api/octavia-barbican/secrets/",
|
||||||
error: "Unable to retrieve secrets."
|
error: "Unable to retrieve secrets."
|
||||||
}
|
}
|
||||||
];
|
];
|
@ -27,7 +27,7 @@
|
|||||||
'horizon.app.core.openstack-service-api.neutron',
|
'horizon.app.core.openstack-service-api.neutron',
|
||||||
'horizon.app.core.openstack-service-api.nova',
|
'horizon.app.core.openstack-service-api.nova',
|
||||||
'horizon.app.core.openstack-service-api.lbaasv2',
|
'horizon.app.core.openstack-service-api.lbaasv2',
|
||||||
'horizon.app.core.openstack-service-api.barbican',
|
'horizon.app.core.openstack-service-api.octavia-barbican',
|
||||||
'horizon.app.core.openstack-service-api.serviceCatalog',
|
'horizon.app.core.openstack-service-api.serviceCatalog',
|
||||||
'horizon.framework.util.i18n.gettext'
|
'horizon.framework.util.i18n.gettext'
|
||||||
];
|
];
|
||||||
@ -45,7 +45,7 @@
|
|||||||
* @param neutronAPI The neutron service API.
|
* @param neutronAPI The neutron service API.
|
||||||
* @param novaAPI The nova service API.
|
* @param novaAPI The nova service API.
|
||||||
* @param lbaasv2API The LBaaS V2 service API.
|
* @param lbaasv2API The LBaaS V2 service API.
|
||||||
* @param barbicanAPI The barbican service API.
|
* @param octaviaBarbicanAPI The octavia barbican service API.
|
||||||
* @param serviceCatalog The keystone service catalog API.
|
* @param serviceCatalog The keystone service catalog API.
|
||||||
* @param gettext The horizon gettext function for translation.
|
* @param gettext The horizon gettext function for translation.
|
||||||
* @returns The model service for the create load balancer workflow.
|
* @returns The model service for the create load balancer workflow.
|
||||||
@ -56,7 +56,7 @@
|
|||||||
neutronAPI,
|
neutronAPI,
|
||||||
novaAPI,
|
novaAPI,
|
||||||
lbaasv2API,
|
lbaasv2API,
|
||||||
barbicanAPI,
|
octaviaBarbicanAPI,
|
||||||
serviceCatalog,
|
serviceCatalog,
|
||||||
gettext
|
gettext
|
||||||
) {
|
) {
|
||||||
@ -895,8 +895,8 @@
|
|||||||
|
|
||||||
function prepareCertificates() {
|
function prepareCertificates() {
|
||||||
return $q.all([
|
return $q.all([
|
||||||
barbicanAPI.getCertificates(true),
|
octaviaBarbicanAPI.getCertificates(true),
|
||||||
barbicanAPI.getSecrets(true)
|
octaviaBarbicanAPI.getSecrets(true)
|
||||||
]).then(onGetCertificates, certificatesError);
|
]).then(onGetCertificates, certificatesError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$provide.value('horizon.app.core.openstack-service-api.barbican', {
|
$provide.value('horizon.app.core.openstack-service-api.octavia-barbican', {
|
||||||
getCertificates: function() {
|
getCertificates: function() {
|
||||||
var containers = [
|
var containers = [
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes a namespace collision with the barbican-ui dashboard.
|
Loading…
Reference in New Issue
Block a user