"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "openstack_dashboard/static/app/core/openstack-service-api/network.service.js" between
horizon-22.1.0.tar.gz and horizon-23.0.0.tar.gz

About: OpenStack Horizon (Optional Service: Dashboard) provides a web-based self-service portal to interact with underlying OpenStack services, such as launching an instance, assigning IP addresses and configuring access controls.
The "Zed" series (latest release).

network.service.js  (horizon-22.1.0):network.service.js  (horizon-23.0.0)
skipping to change at line 62 skipping to change at line 62
/** /**
* @name getFloatingIps * @name getFloatingIps
* @description * @description
* Get a list of floating IP addresses. * Get a list of floating IP addresses.
* *
* @returns {Object} An object with property "items". Each item is * @returns {Object} An object with property "items". Each item is
* a floating IP address. * a floating IP address.
*/ */
function getFloatingIps() { function getFloatingIps() {
return apiService.get('/api/network/floatingips/') return apiService.get('/api/network/floatingips/')
.error(function () { .catch(function onError() {
toastService.add('error', gettext('Unable to retrieve floating IPs.')) ; toastService.add('error', gettext('Unable to retrieve floating IPs.')) ;
}); });
} }
/** /**
* @name getFloatingIpPools * @name getFloatingIpPools
* @description * @description
* Get a list of floating IP pools. * Get a list of floating IP pools.
* *
* @returns {Object} An object with property "items". Each item is * @returns {Object} An object with property "items". Each item is
* a floating IP address. * a floating IP address.
*/ */
function getFloatingIpPools() { function getFloatingIpPools() {
return apiService.get('/api/network/floatingippools/') return apiService.get('/api/network/floatingippools/')
.error(function () { .catch(function onError() {
toastService.add('error', gettext('Unable to retrieve floating IP pool s.')); toastService.add('error', gettext('Unable to retrieve floating IP pool s.'));
}); });
} }
/** /**
* @name allocateFloatingIp * @name allocateFloatingIp
* @description * @description
* Allocate a floating IP address within a pool. * Allocate a floating IP address within a pool.
* *
* @param {string} poolId * @param {string} poolId
* The Id of the pool in which to allocate the new floating IP address. * The Id of the pool in which to allocate the new floating IP address.
* *
* @returns {Object} the new floating IP address on success. * @returns {Object} the new floating IP address on success.
*/ */
function allocateFloatingIp(poolId) { function allocateFloatingIp(poolId) {
return apiService.post('/api/network/floatingip/', { pool_id: poolId }) return apiService.post('/api/network/floatingip/', { pool_id: poolId })
.error(function () { .catch(function onError() {
toastService.add('error', gettext('Unable to allocate new floating IP address.')); toastService.add('error', gettext('Unable to allocate new floating IP address.'));
}); });
} }
/** /**
* @name associateFloatingIp * @name associateFloatingIp
* @description * @description
* Associate a floating IP address with a port. * Associate a floating IP address with a port.
* *
* @param {string} addressId * @param {string} addressId
* The Id of the floating IP address to associate. * The Id of the floating IP address to associate.
* *
* @param {string} portId * @param {string} portId
* The Id of the port to associate. * The Id of the port to associate.
* @returns {Object} The result of the API call * @returns {Object} The result of the API call
*/ */
function associateFloatingIp(addressId, portId) { function associateFloatingIp(addressId, portId) {
var params = { address_id: addressId, port_id: portId }; var params = { address_id: addressId, port_id: portId };
return apiService.patch('/api/network/floatingip/', params) return apiService.patch('/api/network/floatingip/', params)
.error(function () { .catch(function onError() {
toastService.add('error', gettext('Unable to associate floating IP add ress.')); toastService.add('error', gettext('Unable to associate floating IP add ress.'));
}); });
} }
/** /**
* @name disassociateFloatingIp * @name disassociateFloatingIp
* @description * @description
* Disassociate a floating IP address. * Disassociate a floating IP address.
* *
* @param {string} addressId * @param {string} addressId
* The Id of the floating IP address to disassociate. * The Id of the floating IP address to disassociate.
* @returns {Object} The result of the API call * @returns {Object} The result of the API call
*/ */
function disassociateFloatingIp(addressId) { function disassociateFloatingIp(addressId) {
return apiService.patch('/api/network/floatingip/', { address_id: addressI d }) return apiService.patch('/api/network/floatingip/', { address_id: addressI d })
.error(function () { .catch(function onError() {
toastService.add('error', gettext('Unable to disassociate floating IP address.')); toastService.add('error', gettext('Unable to disassociate floating IP address.'));
}); });
} }
} }
}()); }());
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)