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
Most units (KB, MB, GB, TB, PB) are shown in an abbreviated format.
The exception were bytes, which where shown as "Bytes". This commit
resolves this inconsistency by showing "B" for byte units.
Change-Id: Ied94c777a70bf8955f5a328ffcb63d98a7a2befd
Closes-Bug: 1411595
Signed-off-by: Iago Estrela <hiagoestrelas@gmail.com>
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.
pylint provides a check for this.
Let's enable 'super-with-arguments' check.
NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.
Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
Currently we can't set server groups and server group members quotas
in Horizon, they are still the back end definition of default.
In some cases, it will failed to create an instance when server group
members quota is insufficient. Therefore, it is necessary to specify
the quota of the server groups and server group members when creating
and editing the project. This patch allows the user to modify the
default values for the server groups and the server group members
quota.
Change-Id: Ifbd51bec3e775d8fecbf110da37309a443a3d1ba
Closes-Bug:#1732429
This is a preparation to support quotas for horizon plugins.
Part of blueprint horizon-plugin-tab-for-info-and-quotas
Change-Id: I11f9bfb6edae205f452e2619b33fa52254dcf37a
nova-network quotas are considered in usage/quotas.py previously.
This commit completely always disables nova-network quotas.
The nova API wrapper ensures nova-network quota fileds are not
included in responses from tenant_quota_get and default_quota_get.
Drop nova-network quota fields from the Admin Defaults panel and
the Identity Project quota form.
blueprint make-quotas-great-again
Change-Id: Ie69d3003f62d3a124d79a1fea003092f73372187
Prevent raising of KeyError when one or more fields are missing in
the form data.
Change-Id: Icf795651773289ecc3b4ef5f22626947bdb5ccd2
Closes-bug: #1688577
There was an extra variable for the so called "missing"
quotas since 2013. This patch merges them with the
normal nova quotas, cleans up the tests, removes any
usage of that special var and as a side effect, adds
the missing keys to the project quota update page.
Change-Id: Icaac1ebb1749e13fdfc307e89dcc6bbd64bef922
Closes-Bug: 1655393
Volumes tabs should be enabled when volumev2 endpoint is registered.
Currently, Horizon considers no volume service is running if there
is no V1 endpoint, which doesn't make sense as Horizon no longer
supports the cinder V1 protocol.
Co-Authored-By: itxaka <itxaka@redhat.com>
Change-Id: I35d821eedb75f73f9330ed11f921694104eed0c6
Closes-Bug: 1415712
Cinder APIs require size values to be in gibibytes (GiB).
Horizon panels show these values in gigabytes (GB), which
confuses storage admins.
Change-Id: I62ab332d3415f35ead237dd1af5f6a11eb193654
Partially-Implements: blueprint gb-to-gib-conversion
Closes-bug: #1511167
"Update default quota" execute two apis
(nova.default_quota_update and cinder.default_quota_update).
At the moment, method of "handle" always retuen True,
even if both of their apis failed. Then success message is
displayed in spite of failure. I modifyed it. If both API
was an error, it returns False. And in this case, Horizon
will display only error message.
Change-Id: Icd0990a091cd59e3bf07094db59f71fe29c3c195
Closes-bug: #1517741
This reverts commit ed586a0355.
The quota_class subcommand in python-novaclient was used to set default
quota values so it shouldn't have been removed. As now it is being
restored, the defaults quota panel is being restored too.
Related mailing list thread on the topic:
http://lists.openstack.org/pipermail/openstack-dev/2014-May/035383.html
Resolved merge conflicts by hand in:
openstack_dashboard/api/cinder.py
openstack_dashboard/dashboards/admin/info/tabs.py
openstack_dashboard/dashboards/admin/info/tests.py
Updated translatable segments to match refactors in
openstack_dashboard/dashboards/admin/defaults/workflows.py
openstack_dashboard/dashboards/admin/defaults/tables.py
Fixed most egregious post-merge styling errors in
openstack_dashboard/dashboards/admin/defaults/templates/defaults/index.html
(probably should have been separate, but I just couldn't let it out that way!)
Removed unrelated file that was allowed to be part of the original commit
doc/source/topics/settings.rst
Co-Authored-By: Doug Fish <drfish@us.ibm.com>
Change-Id: Ic4c4ecec843c7ea9afd0db36ce0eb15952da15b3
Partial-Bug: #1299517
The default quota panel has been moved to a tab in the system
info panel.
The update default quotas feature has been removed.
The cinder quota-class methods have been removed to keep consistency.
The test cases and the apis for nova and cinder have been modified
according the change.
This change is done to support the change:
I1110022d6f628d03aaf363da707f2d2ef1600437
Change-Id: I193c7209d9681b6d69afe0d996153ac86850d243
Closes-Bug: #1292589
A class with the name of UpdateDefaultQuotas was declared twice in the
same file. Rename one occurrence to UpdateDefaultQuotasStep.
Change-Id: Ie2adb0d540656c5b106607bfc992f553ad1fa45b
Closes-Bug: #1285135
Changed the ordering of the the fields for update default quota form
so that it now matches the default quota table page.
Change-Id: I76c5b75f30d9db39c83b395bffbf11340b2e0bde
Closes-Bug: #1275892
Success and failure messages include formatting that adds name,
which makes for awkward phrasing when displayed to the user.
Removed formatting to clarify message text for both success and
failure messages.
Change-Id: Id754ec9cb132ba82c07c13b05c76367739d3faaf
Closes-Bug: #1274654
We have a lot of import with #noqa that is there to ignore h302,
because it's traditional to import and use a name directly, instead
of a whole module. This hides other errors and gives people the
impression that it's actually fine to import non-modules, you just
have to slap #noqa on those lines.
I went through the code and identified about a dozen names that are
most commonly imported this way. I remove the #noqa tag from them,
and added them to the list in import_exceptions.
I also removed a few unused imports that were revealed in the process.
Change-Id: I27afb8e2b1d4759ec974ded9464d8f010312ee78
Add update default quotas form to edit the default quotas.
Move the editable default quotas tab to a new panel called
"Defaults".
Implements blueprint edit-default-quota
Change-Id: I6e3806226cd2f699f16b93c25e294bc67883738f