Rename service to 'container-infra'
Magnum renames its service_type [1]. According to that, this patch renames service name, Angular module name, related URLs and related strings. [1] https://bugs.launchpad.net/magnum/+bug/1584251 Change-Id: If730ff75826b7f6d50b308b78f8e881da6696966 Implements: blueprint rename-service
This commit is contained in:
parent
5767efec84
commit
b31c2bfc90
@ -48,9 +48,9 @@ Install Magnum UI with all dependencies in your virtual environment::
|
||||
|
||||
And enable it in Horizon::
|
||||
|
||||
cp ../magnum-ui/enabled/_50_project_containers_panelgroup.py openstack_dashboard/local/enabled
|
||||
cp ../magnum-ui/enabled/_51_project_containers_bays_panel.py openstack_dashboard/local/enabled
|
||||
cp ../magnum-ui/enabled/_52_project_containers_baymodels_panel.py openstack_dashboard/local/enabled
|
||||
cp ../magnum-ui/enabled/_50_project_container-infra_panelgroup.py openstack_dashboard/local/enabled
|
||||
cp ../magnum-ui/enabled/_51_project_container-infra_bays_panel.py openstack_dashboard/local/enabled
|
||||
cp ../magnum-ui/enabled/_52_project_container-infra_baymodels_panel.py openstack_dashboard/local/enabled
|
||||
|
||||
To run horizon with the newly enabled Magnum UI plugin run::
|
||||
|
||||
|
@ -14,16 +14,16 @@
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
# The slug of the panel group to be added to HORIZON_CONFIG. Required.
|
||||
PANEL_GROUP = 'containers'
|
||||
PANEL_GROUP = 'container-infra'
|
||||
# The display name of the PANEL_GROUP. Required.
|
||||
PANEL_GROUP_NAME = _('Containers')
|
||||
PANEL_GROUP_NAME = _('Container Infrastructure')
|
||||
# The slug of the dashboard the PANEL_GROUP associated with. Required.
|
||||
PANEL_GROUP_DASHBOARD = 'project'
|
||||
|
||||
ADD_INSTALLED_APPS = ['magnum_ui']
|
||||
|
||||
ADD_ANGULAR_MODULES = [
|
||||
'horizon.dashboard.containers'
|
||||
'horizon.dashboard.container-infra'
|
||||
]
|
||||
|
||||
ADD_JS_FILES = [
|
||||
@ -31,7 +31,7 @@ ADD_JS_FILES = [
|
||||
]
|
||||
|
||||
ADD_SCSS_FILES = [
|
||||
'dashboard/containers/containers.scss'
|
||||
'dashboard/container-infra/container-infra.scss'
|
||||
]
|
||||
|
||||
AUTO_DISCOVER_STATIC_FILES = True
|
@ -15,7 +15,7 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'bays'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'containers'
|
||||
PANEL_GROUP = 'container-infra'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
|
@ -15,7 +15,7 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'baymodels'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'containers'
|
||||
PANEL_GROUP = 'container-infra'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
|
@ -39,9 +39,10 @@ BAY_CREATE_ATTRS = ['name', 'baymodel_id', 'node_count', 'discovery_url',
|
||||
def magnumclient(request):
|
||||
magnum_url = ""
|
||||
try:
|
||||
magnum_url = base.url_for(request, 'container')
|
||||
magnum_url = base.url_for(request, 'container-infra')
|
||||
except exceptions.ServiceCatalogException:
|
||||
LOG.debug('No Containers service is configured.')
|
||||
LOG.debug('No Container Infrastructure Management service is '
|
||||
'configured.')
|
||||
return None
|
||||
|
||||
LOG.debug('magnumclient connection created using the token "%s" and url'
|
||||
|
@ -33,7 +33,7 @@ def change_to_id(obj):
|
||||
@urls.register
|
||||
class Baymodel(generic.View):
|
||||
"""API for retrieving a single baymodel"""
|
||||
url_regex = r'containers/baymodels/(?P<baymodel_id>[^/]+)$'
|
||||
url_regex = r'container-infra/baymodels/(?P<baymodel_id>[^/]+)$'
|
||||
|
||||
@rest_utils.ajax()
|
||||
def get(self, request, baymodel_id):
|
||||
@ -44,7 +44,7 @@ class Baymodel(generic.View):
|
||||
@urls.register
|
||||
class Baymodels(generic.View):
|
||||
"""API for Magnum Baymodels"""
|
||||
url_regex = r'containers/baymodels/$'
|
||||
url_regex = r'container-infra/baymodels/$'
|
||||
|
||||
@rest_utils.ajax()
|
||||
def get(self, request):
|
||||
@ -73,14 +73,14 @@ class Baymodels(generic.View):
|
||||
"""
|
||||
new_baymodel = magnum.baymodel_create(request, **request.DATA)
|
||||
return rest_utils.CreatedResponse(
|
||||
'/api/containers/baymodel/%s' % new_baymodel.uuid,
|
||||
'/api/container-infra/baymodel/%s' % new_baymodel.uuid,
|
||||
new_baymodel.to_dict())
|
||||
|
||||
|
||||
@urls.register
|
||||
class Bay(generic.View):
|
||||
"""API for retrieving a single bay"""
|
||||
url_regex = r'containers/bays/(?P<bay_id>[^/]+)$'
|
||||
url_regex = r'container-infra/bays/(?P<bay_id>[^/]+)$'
|
||||
|
||||
@rest_utils.ajax()
|
||||
def get(self, request, bay_id):
|
||||
@ -91,7 +91,7 @@ class Bay(generic.View):
|
||||
@urls.register
|
||||
class Bays(generic.View):
|
||||
"""API for Magnum Bays"""
|
||||
url_regex = r'containers/bays/$'
|
||||
url_regex = r'container-infra/bays/$'
|
||||
|
||||
@rest_utils.ajax()
|
||||
def get(self, request):
|
||||
@ -120,5 +120,5 @@ class Bays(generic.View):
|
||||
"""
|
||||
new_bay = magnum.bay_create(request, **request.DATA)
|
||||
return rest_utils.CreatedResponse(
|
||||
'/api/containers/bay/%s' % new_bay.uuid,
|
||||
'/api/container-infra/bay/%s' % new_bay.uuid,
|
||||
new_bay.to_dict())
|
||||
|
@ -17,21 +17,21 @@
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @ngname horizon.dashboard.containers.baymodels.actions
|
||||
* @ngname horizon.dashboard.container-infra.baymodels.actions
|
||||
*
|
||||
* @description
|
||||
* Provides all of the actions for baymodels.
|
||||
*/
|
||||
angular.module('horizon.dashboard.containers.baymodels.actions', ['horizon.framework', 'horizon.dashboard.containers'])
|
||||
angular.module('horizon.dashboard.container-infra.baymodels.actions', ['horizon.framework', 'horizon.dashboard.container-infra'])
|
||||
.run(registerBaymodelActions);
|
||||
|
||||
registerBaymodelActions.$inject = [
|
||||
'horizon.framework.conf.resource-type-registry.service',
|
||||
'horizon.framework.util.i18n.gettext',
|
||||
'horizon.dashboard.containers.baymodels.create.service',
|
||||
'horizon.dashboard.containers.baymodels.delete.service',
|
||||
'horizon.dashboard.containers.bays.create.service',
|
||||
'horizon.dashboard.containers.baymodels.resourceType',
|
||||
'horizon.dashboard.container-infra.baymodels.create.service',
|
||||
'horizon.dashboard.container-infra.baymodels.delete.service',
|
||||
'horizon.dashboard.container-infra.bays.create.service',
|
||||
'horizon.dashboard.container-infra.baymodels.resourceType',
|
||||
];
|
||||
|
||||
function registerBaymodelActions(
|
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name horizon.dashboard.containers.baymodels
|
||||
* @name horizon.dashboard.container-infra.baymodels
|
||||
* @ngModule
|
||||
*
|
||||
* @description
|
||||
@ -27,19 +27,19 @@
|
||||
* panel
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels', ['horizon.dashboard.containers.baymodels.actions'])
|
||||
.constant('horizon.dashboard.containers.baymodels.events', events())
|
||||
.constant('horizon.dashboard.containers.baymodels.resourceType', 'OS::Magnum::Baymodel');
|
||||
.module('horizon.dashboard.container-infra.baymodels', ['horizon.dashboard.container-infra.baymodels.actions'])
|
||||
.constant('horizon.dashboard.container-infra.baymodels.events', events())
|
||||
.constant('horizon.dashboard.container-infra.baymodels.resourceType', 'OS::Magnum::Baymodel');
|
||||
|
||||
/**
|
||||
* @ngdoc constant
|
||||
* @name horizon.dashboard.containers.baymodels.events
|
||||
* @name horizon.dashboard.container-infra.baymodels.events
|
||||
* @description A list of events used by Baymodels
|
||||
*/
|
||||
function events() {
|
||||
return {
|
||||
CREATE_SUCCESS: 'horizon.dashboard.containers.baymodels.CREATE_SUCCESS',
|
||||
DELETE_SUCCESS: 'horizon.dashboard.containers.baymodels.DELETE_SUCCESS'
|
||||
CREATE_SUCCESS: 'horizon.dashboard.container-infra.baymodels.CREATE_SUCCESS',
|
||||
DELETE_SUCCESS: 'horizon.dashboard.container-infra.baymodels.DELETE_SUCCESS'
|
||||
};
|
||||
}
|
||||
})();
|
@ -16,9 +16,9 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
describe('horizon.dashboard.containers.baymodels', function() {
|
||||
describe('horizon.dashboard.container-infra.baymodels', function() {
|
||||
it('should exist', function() {
|
||||
expect(angular.module('horizon.dashboard.containers.baymodels')).toBeDefined();
|
||||
expect(angular.module('horizon.dashboard.container-infra.baymodels')).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
@ -18,7 +18,7 @@
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.module('horizon.dashboard.container-infra.baymodels')
|
||||
.factory('baymodelModel', baymodelModel);
|
||||
|
||||
baymodelModel.$inject = [
|
@ -18,11 +18,11 @@
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.factory('horizon.dashboard.containers.baymodels.workflow', baymodelWorkflow);
|
||||
.module('horizon.dashboard.container-infra.baymodels')
|
||||
.factory('horizon.dashboard.container-infra.baymodels.workflow', baymodelWorkflow);
|
||||
|
||||
baymodelWorkflow.$inject = [
|
||||
'horizon.dashboard.containers.basePath',
|
||||
'horizon.dashboard.container-infra.basePath',
|
||||
'horizon.app.core.workflow.factory',
|
||||
'horizon.framework.util.i18n.gettext'
|
||||
];
|
@ -19,19 +19,19 @@
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name horizon.dashboard.containers.baymodels.create.service
|
||||
* @description Service for the containers bay model create modal
|
||||
* @name horizon.dashboard.container-infra.baymodels.create.service
|
||||
* @description Service for the container-infra bay model create modal
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.factory('horizon.dashboard.containers.baymodels.create.service', createService);
|
||||
.module('horizon.dashboard.container-infra.baymodels')
|
||||
.factory('horizon.dashboard.container-infra.baymodels.create.service', createService);
|
||||
|
||||
createService.$inject = [
|
||||
'baymodelModel',
|
||||
'horizon.framework.widgets.modal.wizard-modal.service',
|
||||
'horizon.framework.widgets.toast.service',
|
||||
'horizon.dashboard.containers.baymodels.workflow',
|
||||
'horizon.dashboard.containers.baymodels.events',
|
||||
'horizon.dashboard.container-infra.baymodels.workflow',
|
||||
'horizon.dashboard.container-infra.baymodels.events',
|
||||
'horizon.app.core.openstack-service-api.policy',
|
||||
'horizon.framework.util.i18n.gettext',
|
||||
'horizon.framework.util.q.extensions'
|
@ -26,13 +26,13 @@
|
||||
* Controller for the bay model info step in create workflow
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.module('horizon.dashboard.container-infra.baymodels')
|
||||
.controller('createBaymodelInfoController', createBaymodelInfoController);
|
||||
|
||||
createBaymodelInfoController.$inject = [
|
||||
'$q',
|
||||
'$scope',
|
||||
'horizon.dashboard.containers.basePath',
|
||||
'horizon.dashboard.container-infra.basePath',
|
||||
'horizon.app.core.openstack-service-api.magnum',
|
||||
'horizon.framework.util.i18n.gettext'
|
||||
];
|
@ -26,13 +26,13 @@
|
||||
* Controller for the bay model labels step in create workflow
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.module('horizon.dashboard.container-infra.baymodels')
|
||||
.controller('createBaymodelLabelsController', createBaymodelLabelsController);
|
||||
|
||||
createBaymodelLabelsController.$inject = [
|
||||
'$q',
|
||||
'$scope',
|
||||
'horizon.dashboard.containers.basePath',
|
||||
'horizon.dashboard.container-infra.basePath',
|
||||
'horizon.app.core.openstack-service-api.magnum'
|
||||
];
|
||||
|
@ -26,13 +26,13 @@
|
||||
* Controller for the bay model network step in create workflow
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.module('horizon.dashboard.container-infra.baymodels')
|
||||
.controller('createBaymodelNetworkController', createBaymodelNetworkController);
|
||||
|
||||
createBaymodelNetworkController.$inject = [
|
||||
'$q',
|
||||
'$scope',
|
||||
'horizon.dashboard.containers.basePath',
|
||||
'horizon.dashboard.container-infra.basePath',
|
||||
'horizon.app.core.openstack-service-api.magnum'
|
||||
];
|
||||
|
@ -26,13 +26,13 @@
|
||||
* Controller for the bay model spec step in create workflow
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.module('horizon.dashboard.container-infra.baymodels')
|
||||
.controller('createBaymodelSpecController', createBaymodelSpecController);
|
||||
|
||||
createBaymodelSpecController.$inject = [
|
||||
'$q',
|
||||
'$scope',
|
||||
'horizon.dashboard.containers.basePath',
|
||||
'horizon.dashboard.container-infra.basePath',
|
||||
'horizon.app.core.openstack-service-api.magnum',
|
||||
'horizon.app.core.openstack-service-api.nova',
|
||||
'horizon.app.core.openstack-service-api.glance'
|
@ -16,8 +16,8 @@
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.factory('horizon.dashboard.containers.baymodels.delete.service', deleteService);
|
||||
.module('horizon.dashboard.container-infra.baymodels')
|
||||
.factory('horizon.dashboard.container-infra.baymodels.delete.service', deleteService);
|
||||
|
||||
deleteService.$inject = [
|
||||
'horizon.app.core.openstack-service-api.magnum',
|
||||
@ -25,12 +25,12 @@
|
||||
'horizon.framework.widgets.modal.deleteModalService',
|
||||
'horizon.framework.util.i18n.gettext',
|
||||
'horizon.framework.util.q.extensions',
|
||||
'horizon.dashboard.containers.baymodels.events'
|
||||
'horizon.dashboard.container-infra.baymodels.events'
|
||||
];
|
||||
|
||||
/**
|
||||
* @ngDoc factory
|
||||
* @name horizon.dashboard.containers.baymodels.delete.service
|
||||
* @name horizon.dashboard.container-infra.baymodels.delete.service
|
||||
*
|
||||
* @Description
|
||||
* Brings up the delete baymodels confirmation modal dialog.
|
@ -17,7 +17,7 @@
|
||||
"use strict";
|
||||
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.module('horizon.dashboard.container-infra.baymodels')
|
||||
.controller('BaymodelDetailController', BaymodelDetailController);
|
||||
|
||||
BaymodelDetailController.$inject = [
|
||||
@ -27,10 +27,10 @@
|
||||
'$routeParams',
|
||||
'horizon.app.core.openstack-service-api.magnum',
|
||||
'horizon.app.core.openstack-service-api.glance',
|
||||
'horizon.dashboard.containers.baymodels.events',
|
||||
'horizon.dashboard.containers.bays.events',
|
||||
'horizon.dashboard.container-infra.baymodels.events',
|
||||
'horizon.dashboard.container-infra.bays.events',
|
||||
'horizon.framework.conf.resource-type-registry.service',
|
||||
'horizon.dashboard.containers.baymodels.resourceType'
|
||||
'horizon.dashboard.container-infra.baymodels.resourceType'
|
||||
];
|
||||
|
||||
function BaymodelDetailController($scope, $window, $location, $routeParams, magnum, glance, events, bayEvents, registry, baymodelResourceType) {
|
@ -19,27 +19,27 @@
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name containersBaymodelsTableController
|
||||
* @name BaymodelsTableController
|
||||
* @ngController
|
||||
*
|
||||
* @description
|
||||
* Controller for the containers bay model table
|
||||
* Controller for the container-infra bay model table
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.controller('containersBaymodelsTableController', containersBaymodelsTableController);
|
||||
.module('horizon.dashboard.container-infra.baymodels')
|
||||
.controller('BaymodelsTableController', BaymodelsTableController);
|
||||
|
||||
containersBaymodelsTableController.$inject = [
|
||||
BaymodelsTableController.$inject = [
|
||||
'$scope',
|
||||
'$location',
|
||||
'horizon.app.core.openstack-service-api.magnum',
|
||||
'horizon.dashboard.containers.baymodels.events',
|
||||
'horizon.dashboard.containers.bays.events',
|
||||
'horizon.dashboard.container-infra.baymodels.events',
|
||||
'horizon.dashboard.container-infra.bays.events',
|
||||
'horizon.framework.conf.resource-type-registry.service',
|
||||
'horizon.dashboard.containers.baymodels.resourceType'
|
||||
'horizon.dashboard.container-infra.baymodels.resourceType'
|
||||
];
|
||||
|
||||
function containersBaymodelsTableController($scope, $location, magnum, events, bayEvents, registry, baymodelResourceType) {
|
||||
function BaymodelsTableController($scope, $location, magnum, events, bayEvents, registry, baymodelResourceType) {
|
||||
var ctrl = this;
|
||||
ctrl.baymodels = [];
|
||||
ctrl.baymodelsSrc = [];
|
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<hz-magic-search-context ng-controller="containersBaymodelsTableController as table"
|
||||
<hz-magic-search-context ng-controller="BaymodelsTableController as table"
|
||||
filter-facets="table.baymodelFacets">
|
||||
<hz-magic-search-bar></hz-magic-search-bar>
|
||||
<actions class="batch-action" allowed="table.baymodelResource.batchActions" type="batch"></actions>
|
@ -17,20 +17,20 @@
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @ngname horizon.dashboard.containers.bays.actions
|
||||
* @ngname horizon.dashboard.container-infra.bays.actions
|
||||
*
|
||||
* @description
|
||||
* Provides all of the actions for bays.
|
||||
*/
|
||||
angular.module('horizon.dashboard.containers.bays.actions', ['horizon.framework', 'horizon.dashboard.containers'])
|
||||
angular.module('horizon.dashboard.container-infra.bays.actions', ['horizon.framework', 'horizon.dashboard.container-infra'])
|
||||
.run(registerBayActions);
|
||||
|
||||
registerBayActions.$inject = [
|
||||
'horizon.framework.conf.resource-type-registry.service',
|
||||
'horizon.framework.util.i18n.gettext',
|
||||
'horizon.dashboard.containers.bays.create.service',
|
||||
'horizon.dashboard.containers.bays.delete.service',
|
||||
'horizon.dashboard.containers.bays.resourceType',
|
||||
'horizon.dashboard.container-infra.bays.create.service',
|
||||
'horizon.dashboard.container-infra.bays.delete.service',
|
||||
'horizon.dashboard.container-infra.bays.resourceType',
|
||||
];
|
||||
|
||||
function registerBayActions(
|
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name horizon.dashboard.containers.bays
|
||||
* @name horizon.dashboard.container-infra.bays
|
||||
* @ngModule
|
||||
*
|
||||
* @description
|
||||
@ -27,9 +27,9 @@
|
||||
* panel
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.bays', ['horizon.dashboard.containers.bays.actions'])
|
||||
.constant('horizon.dashboard.containers.bays.events', events())
|
||||
.constant('horizon.dashboard.containers.bays.resourceType', 'OS::Magnum::Bay');
|
||||
.module('horizon.dashboard.container-infra.bays', ['horizon.dashboard.container-infra.bays.actions'])
|
||||
.constant('horizon.dashboard.container-infra.bays.events', events())
|
||||
.constant('horizon.dashboard.container-infra.bays.resourceType', 'OS::Magnum::Bay');
|
||||
|
||||
/**
|
||||
* @ngdoc constant
|
||||
@ -38,8 +38,8 @@
|
||||
*/
|
||||
function events() {
|
||||
return {
|
||||
CREATE_SUCCESS: 'horizon.dashboard.containers.bays.CREATE_SUCCESS',
|
||||
DELETE_SUCCESS: 'horizon.dashboard.containers.bays.DELETE_SUCCESS'
|
||||
CREATE_SUCCESS: 'horizon.dashboard.container-infra.bays.CREATE_SUCCESS',
|
||||
DELETE_SUCCESS: 'horizon.dashboard.container-infra.bays.DELETE_SUCCESS'
|
||||
};
|
||||
}
|
||||
})();
|
@ -16,9 +16,9 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
describe('horizon.dashboard.containers.bays', function() {
|
||||
describe('horizon.dashboard.container-infra.bays', function() {
|
||||
it('should exist', function() {
|
||||
expect(angular.module('horizon.dashboard.containers.bays')).toBeDefined();
|
||||
expect(angular.module('horizon.dashboard.container-infra.bays')).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('horizon.dashboard.containers.bays')
|
||||
.factory('horizon.dashboard.containers.bays.bayModel', bayModel);
|
||||
.module('horizon.dashboard.container-infra.bays')
|
||||
.factory('horizon.dashboard.container-infra.bays.bayModel', bayModel);
|
||||
|
||||
bayModel.$inject = [
|
||||
'horizon.app.core.openstack-service-api.magnum'
|
@ -18,11 +18,11 @@
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('horizon.dashboard.containers.bays')
|
||||
.factory('horizon.dashboard.containers.bays.workflow', bayWorkflow);
|
||||
.module('horizon.dashboard.container-infra.bays')
|
||||
.factory('horizon.dashboard.container-infra.bays.workflow', bayWorkflow);
|
||||
|
||||
bayWorkflow.$inject = [
|
||||
'horizon.dashboard.containers.basePath',
|
||||
'horizon.dashboard.container-infra.basePath',
|
||||
'horizon.app.core.workflow.factory',
|
||||
'horizon.framework.util.i18n.gettext'
|
||||
];
|
@ -17,19 +17,19 @@
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name horizon.dashboard.containers.bays.create.service
|
||||
* @description Service for the containers bay create modal
|
||||
* @name horizon.dashboard.container-infra.bays.create.service
|
||||
* @description Service for the container-infra bay create modal
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.bays')
|
||||
.factory('horizon.dashboard.containers.bays.create.service', createService);
|
||||
.module('horizon.dashboard.container-infra.bays')
|
||||
.factory('horizon.dashboard.container-infra.bays.create.service', createService);
|
||||
|
||||
createService.$inject = [
|
||||
'horizon.dashboard.containers.bays.bayModel',
|
||||
'horizon.dashboard.container-infra.bays.bayModel',
|
||||
'horizon.framework.widgets.modal.wizard-modal.service',
|
||||
'horizon.framework.widgets.toast.service',
|
||||
'horizon.dashboard.containers.bays.workflow',
|
||||
'horizon.dashboard.containers.bays.events',
|
||||
'horizon.dashboard.container-infra.bays.workflow',
|
||||
'horizon.dashboard.container-infra.bays.events',
|
||||
'horizon.app.core.openstack-service-api.policy',
|
||||
'horizon.framework.util.i18n.gettext',
|
||||
'horizon.framework.util.q.extensions'
|
@ -23,16 +23,16 @@
|
||||
* @ngController
|
||||
*
|
||||
* @description
|
||||
* Controller for the containers bay info step in create workflow
|
||||
* Controller for the container-infra bay info step in create workflow
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.bays')
|
||||
.module('horizon.dashboard.container-infra.bays')
|
||||
.controller('createBayInfoController', createBayInfoController);
|
||||
|
||||
createBayInfoController.$inject = [
|
||||
'$q',
|
||||
'$scope',
|
||||
'horizon.dashboard.containers.basePath',
|
||||
'horizon.dashboard.container-infra.basePath',
|
||||
'horizon.app.core.openstack-service-api.magnum'
|
||||
];
|
||||
|
@ -23,15 +23,15 @@
|
||||
* @ngController
|
||||
*
|
||||
* @description
|
||||
* Controller for the containers bay misc step in create workflow
|
||||
* Controller for the container-infra bay misc step in create workflow
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.bays')
|
||||
.module('horizon.dashboard.container-infra.bays')
|
||||
.controller('createBayMiscController', createBayMiscController);
|
||||
|
||||
createBayMiscController.$inject = [
|
||||
'$scope',
|
||||
'horizon.dashboard.containers.basePath',
|
||||
'horizon.dashboard.container-infra.basePath',
|
||||
'horizon.app.core.openstack-service-api.magnum'
|
||||
];
|
||||
|
@ -23,15 +23,15 @@
|
||||
* @ngController
|
||||
*
|
||||
* @description
|
||||
* Controller for the containers bay size step in create workflow
|
||||
* Controller for the container-infra bay size step in create workflow
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.bays')
|
||||
.module('horizon.dashboard.container-infra.bays')
|
||||
.controller('createBaySizeController', createBaySizeController);
|
||||
|
||||
createBaySizeController.$inject = [
|
||||
'$scope',
|
||||
'horizon.dashboard.containers.basePath',
|
||||
'horizon.dashboard.container-infra.basePath',
|
||||
'horizon.app.core.openstack-service-api.magnum'
|
||||
];
|
||||
|
@ -16,8 +16,8 @@
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('horizon.dashboard.containers.bays')
|
||||
.factory('horizon.dashboard.containers.bays.delete.service', deleteService);
|
||||
.module('horizon.dashboard.container-infra.bays')
|
||||
.factory('horizon.dashboard.container-infra.bays.delete.service', deleteService);
|
||||
|
||||
deleteService.$inject = [
|
||||
'horizon.app.core.openstack-service-api.magnum',
|
||||
@ -25,12 +25,12 @@
|
||||
'horizon.framework.widgets.modal.deleteModalService',
|
||||
'horizon.framework.util.i18n.gettext',
|
||||
'horizon.framework.util.q.extensions',
|
||||
'horizon.dashboard.containers.bays.events'
|
||||
'horizon.dashboard.container-infra.bays.events'
|
||||
];
|
||||
|
||||
/**
|
||||
* @ngDoc factory
|
||||
* @name horizon.dashboard.containers.bays.delete.service
|
||||
* @name horizon.dashboard.container-infra.bays.delete.service
|
||||
*
|
||||
* @Description
|
||||
* Brings up the delete bays confirmation modal dialog.
|
@ -17,7 +17,7 @@
|
||||
"use strict";
|
||||
|
||||
angular
|
||||
.module('horizon.dashboard.containers.bays')
|
||||
.module('horizon.dashboard.container-infra.bays')
|
||||
.controller('BayDetailController', BayDetailController);
|
||||
|
||||
BayDetailController.$inject = [
|
||||
@ -26,9 +26,9 @@
|
||||
'$location',
|
||||
'$routeParams',
|
||||
'horizon.app.core.openstack-service-api.magnum',
|
||||
'horizon.dashboard.containers.bays.events',
|
||||
'horizon.dashboard.container-infra.bays.events',
|
||||
'horizon.framework.conf.resource-type-registry.service',
|
||||
'horizon.dashboard.containers.bays.resourceType'
|
||||
'horizon.dashboard.container-infra.bays.resourceType'
|
||||
];
|
||||
|
||||
function BayDetailController(
|
||||
@ -72,4 +72,4 @@
|
||||
deleteWatcher();
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
@ -19,26 +19,26 @@
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name containersBaysTableController
|
||||
* @name BaysTableController
|
||||
* @ngController
|
||||
*
|
||||
* @description
|
||||
* Controller for the containers bay table
|
||||
* Controller for the container-infra bay table
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.bays')
|
||||
.controller('containersBaysTableController', containersBaysTableController);
|
||||
.module('horizon.dashboard.container-infra.bays')
|
||||
.controller('BaysTableController', BaysTableController);
|
||||
|
||||
containersBaysTableController.$inject = [
|
||||
BaysTableController.$inject = [
|
||||
'$scope',
|
||||
'$location',
|
||||
'horizon.app.core.openstack-service-api.magnum',
|
||||
'horizon.dashboard.containers.bays.events',
|
||||
'horizon.dashboard.container-infra.bays.events',
|
||||
'horizon.framework.conf.resource-type-registry.service',
|
||||
'horizon.dashboard.containers.bays.resourceType'
|
||||
'horizon.dashboard.container-infra.bays.resourceType'
|
||||
];
|
||||
|
||||
function containersBaysTableController($scope, $location, magnum, events, registry, bayResourceType) {
|
||||
function BaysTableController($scope, $location, magnum, events, registry, bayResourceType) {
|
||||
var ctrl = this;
|
||||
ctrl.bays = [];
|
||||
ctrl.baysSrc = [];
|
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<hz-magic-search-context ng-controller="containersBaysTableController as table"
|
||||
<hz-magic-search-context ng-controller="BaysTableController as table"
|
||||
filter-facets="table.bayFacets">
|
||||
<hz-magic-search-bar></hz-magic-search-bar>
|
||||
<actions class="batch-action" allowed="table.bayResource.batchActions" type="batch"></actions>
|
||||
@ -136,4 +136,4 @@
|
||||
<tfoot hz-table-footer items="table.bays"></tfoot>
|
||||
</table>
|
||||
</hz-magic-search-context>
|
||||
</div>
|
||||
</div>
|
@ -19,15 +19,15 @@
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name horizon.dashboard.containers
|
||||
* @name horizon.dashboard.container-infra
|
||||
*
|
||||
* @description
|
||||
* Dashboard module to host various containers panels.
|
||||
* Dashboard module to host various container-infra panels.
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers', [
|
||||
'horizon.dashboard.containers.bays',
|
||||
'horizon.dashboard.containers.baymodels',
|
||||
.module('horizon.dashboard.container-infra', [
|
||||
'horizon.dashboard.container-infra.bays',
|
||||
'horizon.dashboard.container-infra.baymodels',
|
||||
'ngRoute'
|
||||
])
|
||||
.config(config)
|
||||
@ -36,8 +36,8 @@
|
||||
'$routeProvider', '$locationProvider'];
|
||||
|
||||
function config($provide, $windowProvider, $routeProvider, $locationProvider) {
|
||||
var path = $windowProvider.$get().STATIC_URL + 'dashboard/containers/';
|
||||
$provide.constant('horizon.dashboard.containers.basePath', path);
|
||||
var path = $windowProvider.$get().STATIC_URL + 'dashboard/container-infra/';
|
||||
$provide.constant('horizon.dashboard.container-infra.basePath', path);
|
||||
|
||||
$routeProvider
|
||||
.when('/project/baymodels', {
|
@ -16,9 +16,9 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
describe('horizon.dashboard.containers', function() {
|
||||
describe('horizon.dashboard.container-infra', function() {
|
||||
it('should exist', function() {
|
||||
expect(angular.module('horizon.dashboard.containers')).toBeDefined();
|
||||
expect(angular.module('horizon.dashboard.container-infra')).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
@ -47,28 +47,28 @@
|
||||
//////////
|
||||
|
||||
function createBay(params) {
|
||||
return apiService.post('/api/containers/bays/', params)
|
||||
return apiService.post('/api/container-infra/bays/', params)
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to create Bay.'));
|
||||
});
|
||||
}
|
||||
|
||||
function getBay(id) {
|
||||
return apiService.get('/api/containers/bays/' + id)
|
||||
return apiService.get('/api/container-infra/bays/' + id)
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to retrieve the Bay.'));
|
||||
});
|
||||
}
|
||||
|
||||
function getBays() {
|
||||
return apiService.get('/api/containers/bays/')
|
||||
return apiService.get('/api/container-infra/bays/')
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to retrieve the Bays.'));
|
||||
});
|
||||
}
|
||||
|
||||
function deleteBay(id, suppressError) {
|
||||
var promise = apiService.delete('/api/containers/bays/', [id]);
|
||||
var promise = apiService.delete('/api/container-infra/bays/', [id]);
|
||||
return suppressError ? promise : promise.error(function() {
|
||||
var msg = gettext('Unable to delete the Bay with id: %(id)s');
|
||||
toastService.add('error', interpolate(msg, { id: id }, true));
|
||||
@ -77,7 +77,7 @@
|
||||
|
||||
// FIXME(shu-mutou): Unused for batch-delete in Horizon framework in Feb, 2016.
|
||||
function deleteBays(ids) {
|
||||
return apiService.delete('/api/containers/bays/', ids)
|
||||
return apiService.delete('/api/container-infra/bays/', ids)
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to delete the Bays.'));
|
||||
});
|
||||
@ -88,28 +88,28 @@
|
||||
///////////////
|
||||
|
||||
function createBaymodel(params) {
|
||||
return apiService.post('/api/containers/baymodels/', params)
|
||||
return apiService.post('/api/container-infra/baymodels/', params)
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to create Baymodel'));
|
||||
});
|
||||
}
|
||||
|
||||
function getBaymodel(id) {
|
||||
return apiService.get('/api/containers/baymodels/' + id)
|
||||
return apiService.get('/api/container-infra/baymodels/' + id)
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to retrieve the Baymodel.'));
|
||||
});
|
||||
}
|
||||
|
||||
function getBaymodels() {
|
||||
return apiService.get('/api/containers/baymodels/')
|
||||
return apiService.get('/api/container-infra/baymodels/')
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to retrieve the Baymodels.'));
|
||||
});
|
||||
}
|
||||
|
||||
function deleteBaymodel(id, suppressError) {
|
||||
var promise = apiService.delete('/api/containers/baymodels/', [id]);
|
||||
var promise = apiService.delete('/api/container-infra/baymodels/', [id]);
|
||||
return suppressError ? promise : promise.error(function() {
|
||||
var msg = gettext('Unable to delete the Baymodel with id: %(id)s');
|
||||
toastService.add('error', interpolate(msg, { id: id }, true));
|
||||
@ -118,7 +118,7 @@
|
||||
|
||||
// FIXME(shu-mutou): Unused for batch-delete in Horizon framework in Feb, 2016.
|
||||
function deleteBaymodels(ids) {
|
||||
return apiService.delete('/api/containers/baymodels/', ids)
|
||||
return apiService.delete('/api/container-infra/baymodels/', ids)
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to delete the Baymodels.'));
|
||||
})
|
@ -48,7 +48,7 @@ class MagnumRestTestCase(test.TestCase):
|
||||
|
||||
self.assertStatusCode(response, 201)
|
||||
self.assertEqual(response['location'],
|
||||
'/api/containers/baymodel/%s' % test_bmodel.uuid)
|
||||
'/api/container-infra/baymodel/%s' % test_bmodel.uuid)
|
||||
client.baymodel_create.assert_called_once_with(request,
|
||||
**test_bmodel.to_dict())
|
||||
|
||||
@ -87,7 +87,7 @@ class MagnumRestTestCase(test.TestCase):
|
||||
|
||||
self.assertStatusCode(response, 201)
|
||||
self.assertEqual(response['location'],
|
||||
'/api/containers/bay/%s' % test_bay.uuid)
|
||||
'/api/container-infra/bay/%s' % test_bay.uuid)
|
||||
client.bay_create.assert_called_once_with(request,
|
||||
**test_bay.to_dict())
|
||||
|
||||
|
@ -16,7 +16,7 @@ from openstack_dashboard.test.test_data import utils
|
||||
|
||||
|
||||
def data(TEST):
|
||||
# Test Data Containers
|
||||
# Test Data Container in Horizon
|
||||
TEST.baymodels = utils.TestDataContainer()
|
||||
TEST.bays = utils.TestDataContainer()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user