21 Commits

Author SHA1 Message Date
Akihiro Motoki
cd7c1b5110 Address RemovedInDjango40Warning (2)
django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(),
ungettext(), and ungettext_lazy() are deprecated in favor of the
functions that they’re aliases for: django.utils.translation.gettext(),
gettext_lazy(), gettext_noop(), ngettext(), and ngettext_lazy().

https://docs.djangoproject.com/en/4.0/releases/3.0/#id3

Change-Id: I77878f84e9d10cf6a136dada81eabf4e18676250
2022-02-04 16:22:07 +09:00
Akihiro Motoki
692778f8cf pylint: Address no-else-return warning
This pylint check 'no-else-return' might be debatable.
but as far as I checked it works in most cases.

Change-Id: Ie8574d4a529454c6e050fa62a7a17ea097d00240
2020-09-27 12:44:16 +09:00
Akihiro Motoki
196ce77141 Cinder REST API test: Make list_extensions test work properly
Previously cinder list_extensions test was disabled (by starting
the test name with an underscore) and REST API for cinder extensions
did not work properly.

This commit fixes the REST API and corresponding unit test.
To make it easy to write the test, test data for list_extensions
response of cinder v2 API is also added.

Related-Bug: #1752917
Change-Id: I5ac014d62462529e186e9dde3842c6a8a629f1c4
2018-04-13 12:53:56 +00:00
Zuul
2c079f423b Merge "NaNJSONEncoder should be used in api "cinder/tenantabsolutelimits"" 2017-11-21 18:35:22 +00:00
Ivan Kolodyazhny
b9972f73b0 Fetch Cinder availability zones list for volume creation
We have to fetch and show Cinder availability zones list during volume
creation and volume creation from image.

Change-Id: I1c8746870d94c183f5ef510c1ce09b3fc9c84220
Closes-Bug: #1721286
2017-10-23 14:25:04 +03:00
zhangdebo1987
de37fc1024 NaNJSONEncoder should be used in api "cinder/tenantabsolutelimits"
In api "cinder/tenantabsolutelimits", result maybe contains Infinity values,
but Infinity values are not supported by JSON standard, so NaNJSONEncoder is
needed here.

Change-Id: I750637e3214ad46a8b29e1ad565870cdcb827fe1
Closes-bug: #1714417
2017-09-15 06:10:00 +00:00
Ying Zuo
b00f8a603a Fix missing volume name on launch instance modal
The Volume object passed back from cinder doesn't have the name
for volumes created with an instance. It should be passed in to
api.cinder.Volume to get the name properly.

Change-Id: I2a812c898f601c741f232419f96bf93f3965bf81
Closes-bug: #1702966
2017-07-23 20:21:32 -07:00
Akihiro Motoki
b9d0243c33 Fix H405 (multi line docstring) warnings (openstack_dashboard)
H405: multi line docstring summary not separated with an empty line

Closes-Bug: #1696996

Change-Id: Id895695663b19522d9cdc22f8b012e49680d708b
2017-06-09 16:05:31 +00:00
Bartosz Fic
7f46e5dc23 Enable volumes metadata update
Cinder currently expose an api to let the users update the volumes
metadata so horizon should expose this functionality.

The metadata is filtered to remove image metadata attributes. There is
work in progress (in Cinder) that will expose the ability to
write-through image metadata to underlying images where appropriate.
Allowing setting of image properties in this UI would be confusing.

Change-Id: If721ac1c908df7651d630f6e7d36f2cc4d69f5da
Implements: blueprint ability-to-add-metadata-to-cinder-volumes-and-snapshots
Co-Authored-By: Santiago Baldassin <santiago.b.baldassin@intel.com>
Co-Authored-By: Pawel Skowron <pawel.skowron@intel.com>
Co-Authored-By: Bartosz Fic <bartosz.fic@intel.com>
Co-Authored-By: Pawel Koniszewski <pawel.koniszewski@intel.com>
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
Co-Authored-By: David Lyle <david.lyle@intel.com>
Co-Authored-By: Paul Karikh <pkarikh@mirantis.com>
2016-09-28 18:17:14 +03:00
majik
cf0c3bb09e Error in cinder quota RESTful api
Just a simple bug.
Missing the argument when calling.

Change-Id: I0bb6cdce8010c19db219ebfdbe7c7b5c40eb33c8
Closes-Bug: #1611212
2016-08-09 12:59:42 +00:00
Paulo Ewerton Gomes Fragoso
3945b24062 Adding Identity NGProjects API
This patch adds some projects-related endpoints to the Nova,
Cinder and Neutron REST/Angular APIs.

These changes are needed for the angular Identity Projects
actions that handle mainly project quota updates.

Partially-Implements: blueprint angularize-identity-projects

Change-Id: I98b8eb9e5e7bfb0d49a77c00115fe62d412abe21
2016-06-21 13:12:43 +00:00
Rajat Vig
df14d977c9 API for getting and updating quotas
Adding API for getting and updating default
quotas information from nova and cinder.

The patch for the panel is at
https://review.openstack.org/#/c/205296/

Co-Authored-By: Kyle Olivo <keolivo@thoughtworks.com>
Co-Authored-By: Kristine Brown<kbrown@thoughtworks.com>
Co-Authored-By: Dan Siwiec<dan.siwiec@thoughtworks.com>
Co-Authored-By: Paulo Ewerton <pauloewerton@lsd.ufcg.edu.br>

Change-Id: Ia8e26e10b816d0dba69542b8da4ad18cccf5173a
Partially-Implements: blueprint ng-defaults-panel
2016-06-06 11:58:14 +00:00
Bo Wang
f94463bb53 Switch to use "# noqa" correctly
"# flake8: noqa" option disables all checks for the whole file.
To disable one line we should use "# noqa".
switch to use "# noqa" and fix the hidden hacking issues.

Change-Id: I1fe747da7a9ab345d0c84a8cb82a8243bf1ee761
Closes-Bug: #1540254
2016-02-09 23:43:37 +08:00
Mingyan Bao
091d351553 Add pagination support to the volume page
Cinder v2 supports pagination.
Added to the volumes table for both admin and project.
Also fix the Cinder REST API to handle pagination (like Glance
REST API).

To test: set 'Items Per Page' in the UI Settings page to a low number.

Co-Authored-By: Cindy Lu <clu@us.ibm.com>
Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>

Change-Id: Ib1772d6e6214dc96a09ce32fb4d9f9fb79d161f0
Closes-Bug: #1316793
2016-01-22 15:18:47 +03:00
gavin.nie@cn.ibm.com
e36e666140 Fix some inconsistency in docstrings
Added colon after ":param"
according to: http://docs.openstack.org/developer/hacking

Change-Id: I9e1d54fdf4d56ccb6e976c96168fe31d8bf727e0
2015-12-23 11:10:59 +08:00
Rajat Vig
436e0fb868 Add API services for system information
Adding API services that are necessary for displaying System Information.
This patch will contain all of the APIs necessary to populate those tabs.
HTTP code 501 is introduced, to communicate to the UI that an API extension
is not available. This simplifies the UI implementation by avoiding making
an additional 'check' call from the UI

Co-Authored-By: Kristine Brown <kbrown@thoughtworks.com>
Co-Authored-By: Kyle Olivo <kyle@kyleolivo.com>
Co-Authored-By: Rajat Vig <rajatv@thoughtworks.com>
Co-Authored-By: Dan Siwiec <dan.siwiec@thoughtworks.com>

Change-Id: I64167d8f5f8e914667f4b6582edc00463f9e0d4a
Partially-Implements: blueprint ng-system-information
2015-12-16 23:22:20 +00:00
Valerie Roske
56e34bdf0c Add API services for Create a Volume, get QoS and tenant limits
Adding cinder services to create and update volumes and volume snapshots,
return Quality of Service and tenant absolute limits.

This is to support dependent patches that will create volumes for Images
from the angular panel for Images.

Co-Authored-By: Errol Pais<epais@thoughtworks.com>
Co-Authored-By: Nathan Zeplowitz<nzeplowi@thoughtworks.com>

Partially-Implements: blueprint angularize-images-table
Change-Id: I4c48c09a0f20f971588b1e920a555f12e7ed4498
2015-12-08 16:42:28 -08:00
Rajat Vig
1265bd6a5d REST API to Get a Volume and Volume Type(s)
It also adds the ability to get default volume type.

Change-Id: I01596032eed82b37eb8a0e4a279f9e683f4ecbd4
Partially-Implements: blueprint angularize-images-table
2015-11-24 11:52:53 +05:30
Rajat Vig
20bacf9545 Add API for getting Cinder Extensions
Adding API services for getting cinder extensions

Change-Id: Ib4b757637b6f97349c92580f3bfaa89d4c61df67
Partially-Implements: blueprint cinder-extensions.service
2015-10-14 10:20:51 -07:00
Cindy Lu
2cca73ff5f Rest API for Users list filter
Add the filter functionality that Keystone supports.
Used by Randy's Magic Search patch:
https://review.openstack.org/#/c/151386/.

Also refactor out parse_filters_kwargs method which is used
by several rest api.

Co-Authored-By: Justin Pomeroy <jpomero@linux.vnet.ibm.com>

Change-Id: Ib65395eae345e1368fbb45f6b4ce3cbb9595d61b
Partially-Implements: blueprint filtered-client-side-table
2015-03-02 13:12:05 -08:00
Cindy Lu
468ce38418 Cinder REST API for angular front end
This is a very early cut at the REST API needed to
support the create instance wizard work.

Partially Implements: blueprint launch-instance-redesign
Co-Authored-By: Michael Hagedorn <mike.hagedorn@hp.com>
Co-Authored-By: Richard Jones <r1chardj0n3s@gmail.com>
Co-Authored-By: Travis Tripp <travis.tripp@hp.com>

Change-Id: I0c37474e81f5ee9893768974e47a20532c535b91
2015-02-20 09:47:15 -08:00