diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.js index 11d8d39472..9979156658 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.js @@ -33,8 +33,8 @@ 'hz.dashboard.identity.basePath', 'horizon.framework.widgets.toast.service', 'horizon.framework.util.i18n.gettext', - 'horizon.openstack-service-api.policy', - 'horizon.openstack-service-api.keystone' + 'horizon.app.core.openstack-service-api.policy', + 'horizon.app.core.openstack-service-api.keystone' ]; function identityUsersTableController(basepath, toast, gettext, policy, keystone) { diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.spec.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.spec.js index 3458df31f9..db81fe0b8e 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.spec.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.spec.js @@ -47,7 +47,7 @@ beforeEach(module('horizon.framework.util.http')); beforeEach(module('horizon.framework.util.i18n')); beforeEach(module('horizon.framework.widgets.toast')); - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module('hz.dashboard')); beforeEach(module('hz.dashboard.identity')); @@ -55,8 +55,8 @@ beforeEach(inject(function($injector) { toastService = $injector.get('horizon.framework.widgets.toast.service'); - policyAPI = $injector.get('horizon.openstack-service-api.policy'); - keystoneAPI = $injector.get('horizon.openstack-service-api.keystone'); + policyAPI = $injector.get('horizon.app.core.openstack-service-api.policy'); + keystoneAPI = $injector.get('horizon.app.core.openstack-service-api.keystone'); controller = $injector.get('$controller'); staticUrl = $injector.get('$window').STATIC_URL; diff --git a/openstack_dashboard/static/app/app.module.js b/openstack_dashboard/static/app/app.module.js index 886352b31e..afaa551906 100644 --- a/openstack_dashboard/static/app/app.module.js +++ b/openstack_dashboard/static/app/app.module.js @@ -35,8 +35,7 @@ 'horizon.app.tech-debt', 'horizon.auth', 'hz.dashboard', - 'horizon.framework', - 'horizon.openstack-service-api' + 'horizon.framework' ]; /** diff --git a/openstack_dashboard/static/app/core/cloud-services/cloud-services.js b/openstack_dashboard/static/app/core/cloud-services/cloud-services.js index c6bfe824ee..d73a6e6241 100644 --- a/openstack_dashboard/static/app/core/cloud-services/cloud-services.js +++ b/openstack_dashboard/static/app/core/cloud-services/cloud-services.js @@ -42,15 +42,15 @@ */ .factory('cloudServices', [ - 'horizon.openstack-service-api.cinder', - 'horizon.openstack-service-api.glance', - 'horizon.openstack-service-api.keystone', - 'horizon.openstack-service-api.neutron', - 'horizon.openstack-service-api.nova', - 'horizon.openstack-service-api.novaExtensions', - 'horizon.openstack-service-api.security-group', - 'horizon.openstack-service-api.serviceCatalog', - 'horizon.openstack-service-api.settings', + 'horizon.app.core.openstack-service-api.cinder', + 'horizon.app.core.openstack-service-api.glance', + 'horizon.app.core.openstack-service-api.keystone', + 'horizon.app.core.openstack-service-api.neutron', + 'horizon.app.core.openstack-service-api.nova', + 'horizon.app.core.openstack-service-api.novaExtensions', + 'horizon.app.core.openstack-service-api.security-group', + 'horizon.app.core.openstack-service-api.serviceCatalog', + 'horizon.app.core.openstack-service-api.settings', function (cinderAPI, glanceAPI, diff --git a/openstack_dashboard/static/app/core/cloud-services/cloud-services.spec.js b/openstack_dashboard/static/app/core/cloud-services/cloud-services.spec.js index 02d4657c83..2c80d79c3f 100644 --- a/openstack_dashboard/static/app/core/cloud-services/cloud-services.spec.js +++ b/openstack_dashboard/static/app/core/cloud-services/cloud-services.spec.js @@ -25,15 +25,15 @@ var cloudServices; beforeEach(module('horizon.app.core', function ($provide) { - $provide.value('horizon.openstack-service-api.cinder', {}); - $provide.value('horizon.openstack-service-api.glance', {}); - $provide.value('horizon.openstack-service-api.keystone', {}); - $provide.value('horizon.openstack-service-api.neutron', {}); - $provide.value('horizon.openstack-service-api.nova', {}); - $provide.value('horizon.openstack-service-api.novaExtensions', {}); - $provide.value('horizon.openstack-service-api.security-group', {}); - $provide.value('horizon.openstack-service-api.serviceCatalog', {}); - $provide.value('horizon.openstack-service-api.settings', {}); + $provide.value('horizon.app.core.openstack-service-api.cinder', {}); + $provide.value('horizon.app.core.openstack-service-api.glance', {}); + $provide.value('horizon.app.core.openstack-service-api.keystone', {}); + $provide.value('horizon.app.core.openstack-service-api.neutron', {}); + $provide.value('horizon.app.core.openstack-service-api.nova', {}); + $provide.value('horizon.app.core.openstack-service-api.novaExtensions', {}); + $provide.value('horizon.app.core.openstack-service-api.security-group', {}); + $provide.value('horizon.app.core.openstack-service-api.serviceCatalog', {}); + $provide.value('horizon.app.core.openstack-service-api.settings', {}); })); beforeEach(inject(function ($injector) { diff --git a/openstack_dashboard/static/app/core/core.module.js b/openstack_dashboard/static/app/core/core.module.js index f2f5c608f1..289c33d1d2 100644 --- a/openstack_dashboard/static/app/core/core.module.js +++ b/openstack_dashboard/static/app/core/core.module.js @@ -29,7 +29,8 @@ angular .module('horizon.app.core', [ 'horizon.app.core.images', - 'horizon.app.core.workflow' + 'horizon.app.core.workflow', + 'horizon.app.core.openstack-service-api' ]); })(); diff --git a/openstack_dashboard/static/app/core/images/table/images-table.controller.js b/openstack_dashboard/static/app/core/images/table/images-table.controller.js index 17706149d2..6b920a5fb3 100644 --- a/openstack_dashboard/static/app/core/images/table/images-table.controller.js +++ b/openstack_dashboard/static/app/core/images/table/images-table.controller.js @@ -31,7 +31,7 @@ ImagesTableController.$inject = [ 'horizon.app.core.images.basePath', - 'horizon.openstack-service-api.glance' + 'horizon.app.core.openstack-service-api.glance' ]; function ImagesTableController(basepath, glance) { diff --git a/openstack_dashboard/static/app/core/images/table/images-table.controller.spec.js b/openstack_dashboard/static/app/core/images/table/images-table.controller.spec.js index e20cca1f7d..c7b34a30ad 100644 --- a/openstack_dashboard/static/app/core/images/table/images-table.controller.spec.js +++ b/openstack_dashboard/static/app/core/images/table/images-table.controller.spec.js @@ -35,13 +35,13 @@ beforeEach(module('horizon.framework.util.http')); beforeEach(module('horizon.framework.widgets.toast')); - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module('horizon.app.core')); beforeEach(module('horizon.app.core.images')); beforeEach(inject(function($injector) { - glanceAPI = $injector.get('horizon.openstack-service-api.glance'); + glanceAPI = $injector.get('horizon.app.core.openstack-service-api.glance'); controller = $injector.get('$controller'); staticUrl = $injector.get('$window').STATIC_URL; diff --git a/openstack_dashboard/static/openstack-service-api/cinder.service.js b/openstack_dashboard/static/app/core/openstack-service-api/cinder.service.js similarity index 87% rename from openstack_dashboard/static/openstack-service-api/cinder.service.js rename to openstack_dashboard/static/app/core/openstack-service-api/cinder.service.js index 6ac5456f1e..9405ffcf74 100644 --- a/openstack_dashboard/static/openstack-service-api/cinder.service.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/cinder.service.js @@ -17,15 +17,15 @@ limitations under the License. 'use strict'; angular - .module('horizon.openstack-service-api') - .service('horizon.openstack-service-api.cinder', CinderAPI); + .module('horizon.app.core.openstack-service-api') + .service('horizon.app.core.openstack-service-api.cinder', CinderAPI); CinderAPI.$inject = ['horizon.framework.util.http.service', 'horizon.framework.widgets.toast.service']; /** * @ngdoc service - * @name horizon.openstack-service-api.cinder + * @name horizon.app.core.openstack-service-api.cinder * @description Provides direct access to Cinder APIs. */ function CinderAPI(apiService, toastService) { @@ -33,7 +33,7 @@ limitations under the License. // Volumes /** - * @name horizon.openstack-service-api.cinder.getVolumes + * @name horizon.app.core.openstack-service-api.cinder.getVolumes * @description * Get a list of volumes. * @@ -58,7 +58,7 @@ limitations under the License. // Volume Snapshots /** - * @name horizon.openstack-service-api.cinder.getVolumeSnapshots + * @name horizon.app.core.openstack-service-api.cinder.getVolumeSnapshots * @description * Get a list of volume snapshots. * diff --git a/openstack_dashboard/static/openstack-service-api/cinder.service.spec.js b/openstack_dashboard/static/app/core/openstack-service-api/cinder.service.spec.js similarity index 93% rename from openstack_dashboard/static/openstack-service-api/cinder.service.spec.js rename to openstack_dashboard/static/app/core/openstack-service-api/cinder.service.spec.js index 4119278e9c..eb3f57ce67 100644 --- a/openstack_dashboard/static/openstack-service-api/cinder.service.spec.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/cinder.service.spec.js @@ -22,13 +22,13 @@ var apiService = {}; var toastService = {}; - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module(function($provide) { window.apiTest.initServices($provide, apiService, toastService); })); - beforeEach(inject(['horizon.openstack-service-api.cinder', function(cinderAPI) { + beforeEach(inject(['horizon.app.core.openstack-service-api.cinder', function(cinderAPI) { service = cinderAPI; }])); diff --git a/openstack_dashboard/static/openstack-service-api/common-test.spec.js b/openstack_dashboard/static/app/core/openstack-service-api/common-test.spec.js similarity index 100% rename from openstack_dashboard/static/openstack-service-api/common-test.spec.js rename to openstack_dashboard/static/app/core/openstack-service-api/common-test.spec.js diff --git a/openstack_dashboard/static/openstack-service-api/glance.service.js b/openstack_dashboard/static/app/core/openstack-service-api/glance.service.js similarity index 92% rename from openstack_dashboard/static/openstack-service-api/glance.service.js rename to openstack_dashboard/static/app/core/openstack-service-api/glance.service.js index 87787065a6..dc0e692a24 100644 --- a/openstack_dashboard/static/openstack-service-api/glance.service.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/glance.service.js @@ -17,15 +17,15 @@ limitations under the License. 'use strict'; angular - .module('horizon.openstack-service-api') - .service('horizon.openstack-service-api.glance', GlanceAPI); + .module('horizon.app.core.openstack-service-api') + .service('horizon.app.core.openstack-service-api.glance', GlanceAPI); GlanceAPI.$inject = ['horizon.framework.util.http.service', 'horizon.framework.widgets.toast.service']; /** * @ngdoc service - * @name horizon.openstack-service-api.glance + * @name horizon.app.core.openstack-service-api.glance * @description Provides direct pass through to Glance with NO abstraction. */ function GlanceAPI(apiService, toastService) { @@ -33,7 +33,7 @@ limitations under the License. // Images /** - * @name horizon.openstack-service-api.glance.getImage + * @name horizon.app.core.openstack-service-api.glance.getImage * @description * Get a single image by ID * @param {string} id @@ -47,7 +47,7 @@ limitations under the License. }; /** - * @name horizon.openstack-service-api.glance.getImages + * @name horizon.app.core.openstack-service-api.glance.getImages * @description * Get a list of images. * @@ -91,7 +91,7 @@ limitations under the License. // Metadata Definitions - Namespaces /** - * @name horizon.openstack-service-api.glance.getNamespaces + * @name horizon.app.core.openstack-service-api.glance.getNamespaces * @description * Get a list of metadata definition namespaces. * diff --git a/openstack_dashboard/static/openstack-service-api/glance.service.spec.js b/openstack_dashboard/static/app/core/openstack-service-api/glance.service.spec.js similarity index 94% rename from openstack_dashboard/static/openstack-service-api/glance.service.spec.js rename to openstack_dashboard/static/app/core/openstack-service-api/glance.service.spec.js index a308434028..25d02a44cb 100644 --- a/openstack_dashboard/static/openstack-service-api/glance.service.spec.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/glance.service.spec.js @@ -22,13 +22,13 @@ var apiService = {}; var toastService = {}; - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module(function($provide) { window.apiTest.initServices($provide, apiService, toastService); })); - beforeEach(inject(['horizon.openstack-service-api.glance', function(glanceAPI) { + beforeEach(inject(['horizon.app.core.openstack-service-api.glance', function(glanceAPI) { service = glanceAPI; }])); diff --git a/openstack_dashboard/static/openstack-service-api/keystone.service.js b/openstack_dashboard/static/app/core/openstack-service-api/keystone.service.js similarity index 91% rename from openstack_dashboard/static/openstack-service-api/keystone.service.js rename to openstack_dashboard/static/app/core/openstack-service-api/keystone.service.js index 04d5d35e1b..c82f23f1ef 100644 --- a/openstack_dashboard/static/openstack-service-api/keystone.service.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/keystone.service.js @@ -17,8 +17,8 @@ limitations under the License. 'use strict'; angular - .module('horizon.openstack-service-api') - .service('horizon.openstack-service-api.keystone', KeystoneAPI); + .module('horizon.app.core.openstack-service-api') + .service('horizon.app.core.openstack-service-api.keystone', KeystoneAPI); KeystoneAPI.$inject = ['horizon.framework.util.http.service', 'horizon.framework.widgets.toast.service']; @@ -56,7 +56,7 @@ limitations under the License. }; /** - * @name horizon.openstack-service-api.keystone.getCurrentUserSession + * @name horizon.app.core.openstack-service-api.keystone.getCurrentUserSession * @description * Gets the current User Session Information * @example @@ -254,7 +254,7 @@ limitations under the License. }; /** - * @name horizon.openstack-service-api.keystone.serviceCatalog + * @name horizon.app.core.openstack-service-api.keystone.serviceCatalog * @description * Returns the service catalog. * @param {Object} config @@ -270,7 +270,7 @@ limitations under the License. /** * @ngdoc service - * @name horizon.openstack-service-api.userSession + * @name horizon.app.core.openstack-service-api.userSession * @description * Provides cached access to the user session. The cache may be reset * at any time by accessing the cache and calling removeAll, which means @@ -290,16 +290,16 @@ limitations under the License. * pass it through as an argument. */ angular - .module('horizon.openstack-service-api') - .factory('horizon.openstack-service-api.userSession', userSession); + .module('horizon.app.core.openstack-service-api') + .factory('horizon.app.core.openstack-service-api.userSession', userSession); - userSession.$inject = ['$cacheFactory', 'horizon.openstack-service-api.keystone']; + userSession.$inject = ['$cacheFactory', 'horizon.app.core.openstack-service-api.keystone']; function userSession($cacheFactory, keystoneAPI) { var service = {}; - service.cache = $cacheFactory('horizon.openstack-service-api.userSession', {capacity: 1}); + service.cache = $cacheFactory('horizon.app.core.openstack-service-api.userSession', {capacity: 1}); service.get = function () { return keystoneAPI.getCurrentUserSession({cache: service.cache}) @@ -314,7 +314,7 @@ limitations under the License. /** * @ngdoc service - * @name horizon.openstack-service-api.serviceCatalog + * @name horizon.app.core.openstack-service-api.serviceCatalog * @description * Provides cached access to the Service Catalog with utilities to help * with asynchronous data loading. The cache may be reset at any time @@ -333,21 +333,21 @@ limitations under the License. * pass it through as an argument. */ angular - .module('horizon.openstack-service-api') - .factory('horizon.openstack-service-api.serviceCatalog', serviceCatalog); + .module('horizon.app.core.openstack-service-api') + .factory('horizon.app.core.openstack-service-api.serviceCatalog', serviceCatalog); serviceCatalog.$inject = ['$cacheFactory', '$q', - 'horizon.openstack-service-api.keystone', - 'horizon.openstack-service-api.userSession']; + 'horizon.app.core.openstack-service-api.keystone', + 'horizon.app.core.openstack-service-api.userSession']; function serviceCatalog($cacheFactory, $q, keystoneAPI, userSession) { var service = {}; - service.cache = $cacheFactory('horizon.openstack-service-api.serviceCatalog', {capacity: 1}); + service.cache = $cacheFactory('horizon.app.core.openstack-service-api.serviceCatalog', {capacity: 1}); /** - * @name horizon.openstack-service-api.serviceCatalog.get + * @name horizon.app.core.openstack-service-api.serviceCatalog.get * @description * Returns the service catalog. This is cached. * @@ -367,7 +367,7 @@ limitations under the License. }; /** - * @name horizon.openstack-service-api.serviceCatalog.ifTypeEnabled + * @name horizon.app.core.openstack-service-api.serviceCatalog.ifTypeEnabled * @description * Checks if the desired service is enabled. If it is enabled, use the * promise returned to execute the desired function. If it is not enabled, diff --git a/openstack_dashboard/static/openstack-service-api/keystone.service.spec.js b/openstack_dashboard/static/app/core/openstack-service-api/keystone.service.spec.js similarity index 94% rename from openstack_dashboard/static/openstack-service-api/keystone.service.spec.js rename to openstack_dashboard/static/app/core/openstack-service-api/keystone.service.spec.js index 4fd6f69357..b99f188961 100644 --- a/openstack_dashboard/static/openstack-service-api/keystone.service.spec.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/keystone.service.spec.js @@ -22,13 +22,13 @@ var apiService = {}; var toastService = {}; - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module(function($provide) { window.apiTest.initServices($provide, apiService, toastService); })); - beforeEach(inject(['horizon.openstack-service-api.keystone', function(keystoneAPI) { + beforeEach(inject(['horizon.app.core.openstack-service-api.keystone', function(keystoneAPI) { service = keystoneAPI; }])); @@ -391,15 +391,15 @@ describe("userSession", function() { var factory, keystoneAPI; - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module(function($provide) { keystoneAPI = {getCurrentUserSession: angular.noop}; - $provide.value('horizon.openstack-service-api.keystone', keystoneAPI); + $provide.value('horizon.app.core.openstack-service-api.keystone', keystoneAPI); $provide.value('$cacheFactory', function() { return 'cache'; }); })); - beforeEach(inject(['horizon.openstack-service-api.userSession', function(userSession) { + beforeEach(inject(['horizon.app.core.openstack-service-api.userSession', function(userSession) { factory = userSession; }])); @@ -439,13 +439,13 @@ describe("serviceCatalog", function() { var factory, q, keystoneAPI, userSession, deferred; - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module(function($provide) { keystoneAPI = {serviceCatalog: angular.noop}; - $provide.value('horizon.openstack-service-api.keystone', keystoneAPI); + $provide.value('horizon.app.core.openstack-service-api.keystone', keystoneAPI); userSession = {get: angular.noop}; - $provide.value('horizon.openstack-service-api.userSession', userSession); + $provide.value('horizon.app.core.openstack-service-api.userSession', userSession); deferred = {promise: angular.noop, reject: angular.noop, resolve: angular.noop}; q = {all: function() {return {then: angular.noop};}, defer: function() { return deferred;}}; @@ -453,7 +453,7 @@ $provide.value('$cacheFactory', function() { return 'cache'; }); })); - beforeEach(inject(['horizon.openstack-service-api.serviceCatalog', function(serviceCatalog) { + beforeEach(inject(['horizon.app.core.openstack-service-api.serviceCatalog', function(serviceCatalog) { factory = serviceCatalog; }])); diff --git a/openstack_dashboard/static/openstack-service-api/neutron.service.js b/openstack_dashboard/static/app/core/openstack-service-api/neutron.service.js similarity index 91% rename from openstack_dashboard/static/openstack-service-api/neutron.service.js rename to openstack_dashboard/static/app/core/openstack-service-api/neutron.service.js index 1d80c320cc..3cd73aac34 100644 --- a/openstack_dashboard/static/openstack-service-api/neutron.service.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/neutron.service.js @@ -17,15 +17,15 @@ 'use strict'; angular - .module('horizon.openstack-service-api') - .service('horizon.openstack-service-api.neutron', NeutronAPI); + .module('horizon.app.core.openstack-service-api') + .service('horizon.app.core.openstack-service-api.neutron', NeutronAPI); NeutronAPI.$inject = ['horizon.framework.util.http.service', 'horizon.framework.widgets.toast.service']; /** * @ngdoc service - * @name horizon.openstack-service-api.neutron + * @name horizon.app.core.openstack-service-api.neutron * @description Provides access to Neutron APIs. */ function NeutronAPI(apiService, toastService) { @@ -33,7 +33,7 @@ // Networks /** - * @name horizon.openstack-service-api.neturonAPI.getNetworks + * @name horizon.app.core.openstack-service-api.neturonAPI.getNetworks * @description * Get a list of networks for a tenant. * @@ -48,7 +48,7 @@ }; /** - * @name horizon.openstack-service-api.neutron.createNetwork + * @name horizon.app.core.openstack-service-api.neutron.createNetwork * @description * Create a new network. * @returns The new network object on success. @@ -99,7 +99,7 @@ // Subnets /** - * @name horizon.openstack-service-api.neutron.getSubnets + * @name horizon.app.core.openstack-service-api.neutron.getSubnets * @description * Get a list of subnets for a network. * @@ -117,7 +117,7 @@ }; /** - * @name horizon.openstack-service-api.neutron.createSubnet + * @name horizon.app.core.openstack-service-api.neutron.createSubnet * @description * Create a Subnet for given Network. * @returns The JSON representation of Subnet on success. @@ -183,7 +183,7 @@ // Ports /** - * @name horizon.openstack-service-api.neutron.getPorts + * @name horizon.app.core.openstack-service-api.neutron.getPorts * @description * Get a list of ports for a network. * diff --git a/openstack_dashboard/static/openstack-service-api/neutron.service.spec.js b/openstack_dashboard/static/app/core/openstack-service-api/neutron.service.spec.js similarity index 93% rename from openstack_dashboard/static/openstack-service-api/neutron.service.spec.js rename to openstack_dashboard/static/app/core/openstack-service-api/neutron.service.spec.js index 0e67a8aa70..d5d1560344 100644 --- a/openstack_dashboard/static/openstack-service-api/neutron.service.spec.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/neutron.service.spec.js @@ -22,13 +22,13 @@ var apiService = {}; var toastService = {}; - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module(function($provide) { window.apiTest.initServices($provide, apiService, toastService); })); - beforeEach(inject(['horizon.openstack-service-api.neutron', function(neutronAPI) { + beforeEach(inject(['horizon.app.core.openstack-service-api.neutron', function(neutronAPI) { service = neutronAPI; }])); diff --git a/openstack_dashboard/static/openstack-service-api/nova.service.js b/openstack_dashboard/static/app/core/openstack-service-api/nova.service.js similarity index 89% rename from openstack_dashboard/static/openstack-service-api/nova.service.js rename to openstack_dashboard/static/app/core/openstack-service-api/nova.service.js index e77f155a1a..8ceb6c5e0f 100644 --- a/openstack_dashboard/static/openstack-service-api/nova.service.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/nova.service.js @@ -17,15 +17,15 @@ limitations under the License. 'use strict'; angular - .module('horizon.openstack-service-api') - .service('horizon.openstack-service-api.nova', NovaAPI); + .module('horizon.app.core.openstack-service-api') + .service('horizon.app.core.openstack-service-api.nova', NovaAPI); NovaAPI.$inject = ['horizon.framework.util.http.service', 'horizon.framework.widgets.toast.service']; /** * @ngdoc service - * @name horizon.openstack-service-api.nova + * @name horizon.app.core.openstack-service-api.nova * @description Provides access to Nova APIs. */ function NovaAPI(apiService, toastService) { @@ -33,7 +33,7 @@ limitations under the License. // Keypairs /** - * @name horizon.openstack-service-api.nova.getKeypairs + * @name horizon.app.core.openstack-service-api.nova.getKeypairs * @description * Get a list of keypairs. * @@ -48,7 +48,7 @@ limitations under the License. }; /** - * @name horizon.openstack-service-api.nova.createKeypair + * @name horizon.app.core.openstack-service-api.nova.createKeypair * @description * Create a new keypair. This returns the new keypair object on success. * @@ -75,7 +75,7 @@ limitations under the License. // Availability Zones /** - * @name horizon.openstack-service-api.nova.getAvailabilityZones + * @name horizon.app.core.openstack-service-api.nova.getAvailabilityZones * @description * Get a list of Availability Zones. * @@ -93,7 +93,7 @@ limitations under the License. // Limits /** - * @name horizon.openstack-service-api.nova.getLimits + * @name horizon.app.core.openstack-service-api.nova.getLimits * @description * Returns current limits. * @@ -131,7 +131,7 @@ limitations under the License. // Servers /** - * @name horizon.openstack-service-api.nova.createServer + * @name horizon.app.core.openstack-service-api.nova.createServer * @description * Create a server using the parameters supplied in the * newServer. The required parameters: @@ -156,7 +156,7 @@ limitations under the License. }; /** - * @name horizon.openstack-service-api.nova.getServer + * @name horizon.app.core.openstack-service-api.nova.getServer * @description * Get a single server by ID * @param {string} id @@ -170,7 +170,7 @@ limitations under the License. }; /** - * @name horizon.openstack-service-api.nova.getExtensions + * @name horizon.app.core.openstack-service-api.nova.getExtensions * @description * Returns a list of enabled extensions. * @@ -200,7 +200,7 @@ limitations under the License. }; /** - * @name horizon.openstack-service-api.nova.getFlavors + * @name horizon.app.core.openstack-service-api.nova.getFlavors * @description * Returns a list of flavors. * @@ -245,7 +245,7 @@ limitations under the License. }; /** - * @name horizon.openstack-service-api.nova.getFlavor + * @name horizon.app.core.openstack-service-api.nova.getFlavor * @description * Get a single flavor by ID. * @param {string} id @@ -263,7 +263,7 @@ limitations under the License. }; /** - * @name horizon.openstack-service-api.nova.getFlavorExtraSpecs + * @name horizon.app.core.openstack-service-api.nova.getFlavorExtraSpecs * @description * Get a single flavor's extra specs by ID. * @param {string} id @@ -279,7 +279,7 @@ limitations under the License. /** * @ngdoc service - * @name horizon.openstack-service-api.novaExtensions + * @name horizon.app.core.openstack-service-api.novaExtensions * @description * Provides cached access to Nova Extensions with utilities to help * with asynchronous data loading. The cache may be reset at any time @@ -291,16 +291,16 @@ limitations under the License. * this saved between 30 - 100 ms per request. */ angular - .module('horizon.openstack-service-api') - .factory('horizon.openstack-service-api.novaExtensions', NovaExtensionsAPI); + .module('horizon.app.core.openstack-service-api') + .factory('horizon.app.core.openstack-service-api.novaExtensions', NovaExtensionsAPI); NovaExtensionsAPI.$inject = ['$cacheFactory', '$q', - 'horizon.openstack-service-api.nova']; + 'horizon.app.core.openstack-service-api.nova']; function NovaExtensionsAPI($cacheFactory, $q, novaAPI) { var service = {}; - service.cache = $cacheFactory('horizon.openstack-service-api.novaExtensions', {capacity: 1}); + service.cache = $cacheFactory('horizon.app.core.openstack-service-api.novaExtensions', {capacity: 1}); service.get = function () { return novaAPI.getExtensions({cache: service.cache}) diff --git a/openstack_dashboard/static/openstack-service-api/nova.service.spec.js b/openstack_dashboard/static/app/core/openstack-service-api/nova.service.spec.js similarity index 95% rename from openstack_dashboard/static/openstack-service-api/nova.service.spec.js rename to openstack_dashboard/static/app/core/openstack-service-api/nova.service.spec.js index a29a482836..32129d7088 100644 --- a/openstack_dashboard/static/openstack-service-api/nova.service.spec.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/nova.service.spec.js @@ -22,13 +22,13 @@ var apiService = {}; var toastService = {}; - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module(function($provide) { window.apiTest.initServices($provide, apiService, toastService); })); - beforeEach(inject(['horizon.openstack-service-api.nova', function(novaAPI) { + beforeEach(inject(['horizon.app.core.openstack-service-api.nova', function(novaAPI) { service = novaAPI; }])); @@ -247,18 +247,18 @@ describe("novaExtensions", function() { var factory, q, novaAPI; - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module(function($provide) { novaAPI = {getExtensions: function() {return {then: angular.noop};}}; q = {defer: function() { return {resolve: angular.noop}; }}; $provide.value('$cacheFactory', function() {return "cache";}); $provide.value('$q', q); - $provide.value('horizon.openstack-service-api.nova', novaAPI); + $provide.value('horizon.app.core.openstack-service-api.nova', novaAPI); })); beforeEach(inject(function($injector) { - factory = $injector.get('horizon.openstack-service-api.novaExtensions'); + factory = $injector.get('horizon.app.core.openstack-service-api.novaExtensions'); })); it("is defined", function() { diff --git a/openstack_dashboard/static/openstack-service-api/openstack-service-api.module.js b/openstack_dashboard/static/app/core/openstack-service-api/openstack-service-api.module.js similarity index 91% rename from openstack_dashboard/static/openstack-service-api/openstack-service-api.module.js rename to openstack_dashboard/static/app/core/openstack-service-api/openstack-service-api.module.js index f57aeb6207..2d2479f7a9 100644 --- a/openstack_dashboard/static/openstack-service-api/openstack-service-api.module.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/openstack-service-api.module.js @@ -17,5 +17,5 @@ limitations under the License. 'use strict'; angular - .module('horizon.openstack-service-api', []); + .module('horizon.app.core.openstack-service-api', []); }()); diff --git a/openstack_dashboard/static/openstack-service-api/policy.service.js b/openstack_dashboard/static/app/core/openstack-service-api/policy.service.js similarity index 90% rename from openstack_dashboard/static/openstack-service-api/policy.service.js rename to openstack_dashboard/static/app/core/openstack-service-api/policy.service.js index 533583e625..ea4132d346 100644 --- a/openstack_dashboard/static/openstack-service-api/policy.service.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/policy.service.js @@ -15,22 +15,22 @@ limitations under the License. 'use strict'; angular - .module('horizon.openstack-service-api') - .service('horizon.openstack-service-api.policy', PolicyService); + .module('horizon.app.core.openstack-service-api') + .service('horizon.app.core.openstack-service-api.policy', PolicyService); PolicyService.$inject = ['horizon.framework.util.http.service', 'horizon.framework.widgets.toast.service']; /** * @ngdoc service - * @name horizon.openstack-service-api.policy + * @name horizon.app.core.openstack-service-api.policy * @description Provides a direct pass through to the policy engine in * Horizon. */ function PolicyService(apiService, toastService) { /** - * @name horizon.openstack-service-api.policy.check + * @name horizon.app.core.openstack-service-api.policy.check * @description * Check the passed in policy rule list to determine if the user has * permission to perform the actions specified by the rules. The service diff --git a/openstack_dashboard/static/openstack-service-api/policy.service.spec.js b/openstack_dashboard/static/app/core/openstack-service-api/policy.service.spec.js similarity index 91% rename from openstack_dashboard/static/openstack-service-api/policy.service.spec.js rename to openstack_dashboard/static/app/core/openstack-service-api/policy.service.spec.js index dd1c43ca7e..92e11bbcbb 100644 --- a/openstack_dashboard/static/openstack-service-api/policy.service.spec.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/policy.service.spec.js @@ -22,13 +22,13 @@ var apiService = {}; var toastService = {}; - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module(function($provide) { window.apiTest.initServices($provide, apiService, toastService); })); - beforeEach(inject(['horizon.openstack-service-api.policy', function(policyAPI) { + beforeEach(inject(['horizon.app.core.openstack-service-api.policy', function(policyAPI) { service = policyAPI; }])); diff --git a/openstack_dashboard/static/openstack-service-api/security-group.service.js b/openstack_dashboard/static/app/core/openstack-service-api/security-group.service.js similarity index 89% rename from openstack_dashboard/static/openstack-service-api/security-group.service.js rename to openstack_dashboard/static/app/core/openstack-service-api/security-group.service.js index 338acca678..9e95a66941 100644 --- a/openstack_dashboard/static/openstack-service-api/security-group.service.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/security-group.service.js @@ -16,21 +16,21 @@ limitations under the License. (function () { 'use strict'; - angular.module('horizon.openstack-service-api') - .service('horizon.openstack-service-api.security-group', SecurityGroupAPI); + angular.module('horizon.app.core.openstack-service-api') + .service('horizon.app.core.openstack-service-api.security-group', SecurityGroupAPI); SecurityGroupAPI.$inject = ['horizon.framework.util.http.service', 'horizon.framework.widgets.toast.service']; /** * @ngdoc service - * @name horizon.openstack-service-api.security-group + * @name horizon.app.core.openstack-service-api.security-group * @description Provides access to Security Groups */ function SecurityGroupAPI(apiService, toastService) { /** - * @name horizon.openstack-service-api.security-group.list + * @name horizon.app.core.openstack-service-api.security-group.list * @description * Get a list of security groups. * diff --git a/openstack_dashboard/static/openstack-service-api/security-group.service.spec.js b/openstack_dashboard/static/app/core/openstack-service-api/security-group.service.spec.js similarity index 90% rename from openstack_dashboard/static/openstack-service-api/security-group.service.spec.js rename to openstack_dashboard/static/app/core/openstack-service-api/security-group.service.spec.js index c58b917db1..f4b6cce2c9 100644 --- a/openstack_dashboard/static/openstack-service-api/security-group.service.spec.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/security-group.service.spec.js @@ -22,13 +22,13 @@ var apiService = {}; var toastService = {}; - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module(function($provide) { window.apiTest.initServices($provide, apiService, toastService); })); - beforeEach(inject(['horizon.openstack-service-api.security-group', function(securityGroup) { + beforeEach(inject(['horizon.app.core.openstack-service-api.security-group', function(securityGroup) { service = securityGroup; }])); diff --git a/openstack_dashboard/static/openstack-service-api/settings.service.js b/openstack_dashboard/static/app/core/openstack-service-api/settings.service.js similarity index 95% rename from openstack_dashboard/static/openstack-service-api/settings.service.js rename to openstack_dashboard/static/app/core/openstack-service-api/settings.service.js index 354a73c2bb..ec438f4963 100644 --- a/openstack_dashboard/static/openstack-service-api/settings.service.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/settings.service.js @@ -18,14 +18,14 @@ 'use strict'; angular - .module('horizon.openstack-service-api') - .factory('horizon.openstack-service-api.settings', settingsService); + .module('horizon.app.core.openstack-service-api') + .factory('horizon.app.core.openstack-service-api.settings', settingsService); settingsService.$inject = ['$q', 'horizon.framework.util.http.service']; /** * @ngdoc service - * @name horizon.openstack-service-api.settings + * @name horizon.app.core.openstack-service-api.settings * @description * Provides utilities to the cached settings data. This helps * with asynchronous data loading. @@ -46,7 +46,7 @@ var service = {}; /** - * @name horizon.openstack-service-api.config.getSettings + * @name horizon.app.core.openstack-service-api.config.getSettings * @description * Gets all the allowed settings * @@ -74,7 +74,7 @@ }; /** - * @name horizon.openstack-service-api.settings.getSetting + * @name horizon.app.core.openstack-service-api.settings.getSetting * @description * This retrieves a specific setting. * @@ -143,7 +143,7 @@ }; /** - * @name horizon.openstack-service-api.settings.ifEnabled + * @name horizon.app.core.openstack-service-api.settings.ifEnabled * @description * Checks if the desired setting is enabled. This returns a promise. * If the setting is enabled, the promise will be resolved. diff --git a/openstack_dashboard/static/openstack-service-api/settings.service.spec.js b/openstack_dashboard/static/app/core/openstack-service-api/settings.service.spec.js similarity index 97% rename from openstack_dashboard/static/openstack-service-api/settings.service.spec.js rename to openstack_dashboard/static/app/core/openstack-service-api/settings.service.spec.js index 416ec741ab..0b065f8932 100644 --- a/openstack_dashboard/static/openstack-service-api/settings.service.spec.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/settings.service.spec.js @@ -32,14 +32,14 @@ return responseMockOpts.succeed ? [200, testData, {}] : [500, 'Fail', {}]; } - describe('horizon.openstack-service-api.settings', function () { + describe('horizon.app.core.openstack-service-api.settings', function () { var settingsService; - beforeEach(module('horizon.openstack-service-api')); + beforeEach(module('horizon.app.core.openstack-service-api')); beforeEach(module('horizon.framework.util.http')); beforeEach(inject(function (_$httpBackend_, $injector) { responseMockOpts.succeed = true; - settingsService = $injector.get('horizon.openstack-service-api.settings'); + settingsService = $injector.get('horizon.app.core.openstack-service-api.settings'); $httpBackend = _$httpBackend_; $httpBackend.whenGET('/api/settings/').respond(responseMockReturn); $httpBackend.expectGET('/api/settings/'); diff --git a/openstack_dashboard/static/app/core/workflow/decorator.service.js b/openstack_dashboard/static/app/core/workflow/decorator.service.js index 0c300add47..e7c5e2b2f7 100644 --- a/openstack_dashboard/static/app/core/workflow/decorator.service.js +++ b/openstack_dashboard/static/app/core/workflow/decorator.service.js @@ -32,7 +32,7 @@ * * Injected dependencies: * - $q - * - serviceCatalog horizon.openstack-service-api.serviceCatalog + * - serviceCatalog horizon.app.core.openstack-service-api.serviceCatalog * * @param {Object} spec The input workflow specification object. * @returns {Object} The decorated workflow specification object, the same @@ -49,7 +49,7 @@ dashboardWorkflowDecorator.$inject = [ '$q', - 'horizon.openstack-service-api.serviceCatalog' + 'horizon.app.core.openstack-service-api.serviceCatalog' ]; ///////////// diff --git a/openstack_dashboard/static/dashboard/launch-instance/keypair/keypair.js b/openstack_dashboard/static/dashboard/launch-instance/keypair/keypair.js index 734dafc4c9..8f14254a9a 100644 --- a/openstack_dashboard/static/dashboard/launch-instance/keypair/keypair.js +++ b/openstack_dashboard/static/dashboard/launch-instance/keypair/keypair.js @@ -159,7 +159,7 @@ */ module.controller('LaunchInstanceCreateKeyPairCtrl', [ '$modalInstance', - 'horizon.openstack-service-api.nova', + 'horizon.app.core.openstack-service-api.nova', 'horizon.framework.widgets.toast.service', LaunchInstanceCreateKeyPairCtrl ]); @@ -235,7 +235,7 @@ */ module.controller('LaunchInstanceImportKeyPairCtrl', [ '$modalInstance', - 'horizon.openstack-service-api.nova', + 'horizon.app.core.openstack-service-api.nova', 'horizon.framework.widgets.toast.service', LaunchInstanceImportKeyPairCtrl ]); diff --git a/openstack_dashboard/static/dashboard/launch-instance/keypair/keypair.spec.js b/openstack_dashboard/static/dashboard/launch-instance/keypair/keypair.spec.js index 95e8c6cbc2..66c8a097c8 100644 --- a/openstack_dashboard/static/dashboard/launch-instance/keypair/keypair.spec.js +++ b/openstack_dashboard/static/dashboard/launch-instance/keypair/keypair.spec.js @@ -100,7 +100,7 @@ beforeEach(module(function ($provide) { $provide.value('$modalInstance', {}); - $provide.value('horizon.openstack-service-api.nova', {}); + $provide.value('horizon.app.core.openstack-service-api.nova', {}); $provide.value('horizon.framework.widgets.toast.service', {}); })); @@ -159,7 +159,7 @@ beforeEach(module(function ($provide) { $provide.value('$modalInstance', {}); - $provide.value('horizon.openstack-service-api.nova', {}); + $provide.value('horizon.app.core.openstack-service-api.nova', {}); $provide.value('horizon.framework.widgets.toast.service', {}); })); diff --git a/openstack_dashboard/static/dashboard/launch-instance/launch-instance-model.js b/openstack_dashboard/static/dashboard/launch-instance/launch-instance-model.js index 24d64b5d04..6fd5abe200 100644 --- a/openstack_dashboard/static/dashboard/launch-instance/launch-instance-model.js +++ b/openstack_dashboard/static/dashboard/launch-instance/launch-instance-model.js @@ -28,14 +28,14 @@ */ module.factory('launchInstanceModel', ['$q', '$log', - 'horizon.openstack-service-api.cinder', - 'horizon.openstack-service-api.glance', - 'horizon.openstack-service-api.keystone', - 'horizon.openstack-service-api.neutron', - 'horizon.openstack-service-api.nova', - 'horizon.openstack-service-api.novaExtensions', - 'horizon.openstack-service-api.security-group', - 'horizon.openstack-service-api.serviceCatalog', + 'horizon.app.core.openstack-service-api.cinder', + 'horizon.app.core.openstack-service-api.glance', + 'horizon.app.core.openstack-service-api.keystone', + 'horizon.app.core.openstack-service-api.neutron', + 'horizon.app.core.openstack-service-api.nova', + 'horizon.app.core.openstack-service-api.novaExtensions', + 'horizon.app.core.openstack-service-api.security-group', + 'horizon.app.core.openstack-service-api.serviceCatalog', function ($q, $log, diff --git a/openstack_dashboard/static/dashboard/launch-instance/launch-instance-model.spec.js b/openstack_dashboard/static/dashboard/launch-instance/launch-instance-model.spec.js index 10859adbbf..ca71dad289 100644 --- a/openstack_dashboard/static/dashboard/launch-instance/launch-instance-model.spec.js +++ b/openstack_dashboard/static/dashboard/launch-instance/launch-instance-model.spec.js @@ -27,7 +27,7 @@ beforeEach(module('hz.dashboard.launch-instance')); beforeEach(module(function($provide) { - $provide.value('horizon.openstack-service-api.glance', { + $provide.value('horizon.app.core.openstack-service-api.glance', { getImages: function() { var images = [ { container_format: 'aki', properties: {} }, @@ -53,7 +53,7 @@ } }); - $provide.value('horizon.openstack-service-api.nova', { + $provide.value('horizon.app.core.openstack-service-api.nova', { createServer: function(finalSpec) { return finalSpec; }, @@ -97,7 +97,7 @@ } }); - $provide.value('horizon.openstack-service-api.security-group', { + $provide.value('horizon.app.core.openstack-service-api.security-group', { query: function() { var secGroups = [ { name: 'security-group-1' }, @@ -111,7 +111,7 @@ } }); - $provide.value('horizon.openstack-service-api.neutron', { + $provide.value('horizon.app.core.openstack-service-api.neutron', { getNetworks: function() { var networks = [ { id: 'net-1' }, { id: 'net-2' } ]; @@ -122,7 +122,7 @@ } }); - $provide.value('horizon.openstack-service-api.cinder', { + $provide.value('horizon.app.core.openstack-service-api.cinder', { getVolumes: function() { var volumes = [ { id: 'vol-1' }, { id: 'vol-2' } ]; @@ -141,7 +141,7 @@ } }); - $provide.value('horizon.openstack-service-api.serviceCatalog', { + $provide.value('horizon.app.core.openstack-service-api.serviceCatalog', { ifTypeEnabled: function(theType) { var deferred = $q.defer(); @@ -157,7 +157,7 @@ } }); - $provide.value('horizon.openstack-service-api.novaExtensions', { + $provide.value('horizon.app.core.openstack-service-api.novaExtensions', { ifNameEnabled: function() { var deferred = $q.defer(); @@ -171,7 +171,7 @@ } }); - $provide.value('horizon.openstack-service-api.keystone', {}); + $provide.value('horizon.app.core.openstack-service-api.keystone', {}); })); beforeEach(inject(function(launchInstanceModel, $rootScope, _$q_) { diff --git a/openstack_dashboard/static/dashboard/launch-instance/launch-instance-workflow.service.spec.js b/openstack_dashboard/static/dashboard/launch-instance/launch-instance-workflow.service.spec.js index 5c6b01a0c4..05899317f6 100644 --- a/openstack_dashboard/static/dashboard/launch-instance/launch-instance-workflow.service.spec.js +++ b/openstack_dashboard/static/dashboard/launch-instance/launch-instance-workflow.service.spec.js @@ -29,7 +29,7 @@ }); return spec; }; - $provide.value('horizon.openstack-service-api.serviceCatalog', {}); + $provide.value('horizon.app.core.openstack-service-api.serviceCatalog', {}); $provide.value('horizon.framework.util.workflow.service', workflow); })); diff --git a/openstack_dashboard/static_settings.py b/openstack_dashboard/static_settings.py index fe6f5dc1b4..8d573ace0d 100644 --- a/openstack_dashboard/static_settings.py +++ b/openstack_dashboard/static_settings.py @@ -145,11 +145,6 @@ def find_static_files(ROOT_PATH, HORIZON_CONFIG): # note the path must end in a '/' or the resultant file paths will have a # leading "/" - file_discovery.populate_horizon_config( - HORIZON_CONFIG, - os.path.join(ROOT_PATH, 'static/'), - sub_path='openstack-service-api/' - ) file_discovery.populate_horizon_config( HORIZON_CONFIG, os.path.join(ROOT_PATH, 'static/'),