Merge "Dashboard ReOrg - Move APIs into app/core"
This commit is contained in:
commit
90636a3a54
@ -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) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -35,8 +35,7 @@
|
||||
'horizon.app.tech-debt',
|
||||
'horizon.auth',
|
||||
'hz.dashboard',
|
||||
'horizon.framework',
|
||||
'horizon.openstack-service-api'
|
||||
'horizon.framework'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -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,
|
||||
|
@ -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) {
|
||||
|
@ -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'
|
||||
]);
|
||||
|
||||
})();
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
*
|
@ -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;
|
||||
}]));
|
||||
|
@ -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.
|
||||
*
|
@ -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;
|
||||
}]));
|
||||
|
@ -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,
|
@ -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;
|
||||
}]));
|
||||
|
@ -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.
|
||||
*
|
@ -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;
|
||||
}]));
|
||||
|
@ -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})
|
@ -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() {
|
@ -17,5 +17,5 @@ limitations under the License.
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('horizon.openstack-service-api', []);
|
||||
.module('horizon.app.core.openstack-service-api', []);
|
||||
}());
|
@ -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
|
@ -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;
|
||||
}]));
|
||||
|
@ -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.
|
||||
*
|
@ -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;
|
||||
}]));
|
||||
|
@ -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.
|
@ -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/');
|
@ -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'
|
||||
];
|
||||
|
||||
/////////////
|
||||
|
@ -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
|
||||
]);
|
||||
|
@ -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', {});
|
||||
}));
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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_) {
|
||||
|
@ -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);
|
||||
}));
|
||||
|
||||
|
@ -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/'),
|
||||
|
Loading…
Reference in New Issue
Block a user