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
After dropping the flavor edit feature was dropped in Rocky-1,
we still allow to edit flavor in the "Modify Access" form.
This commit drops the remaining flavor edit forms.
Duplicated API calls (flavor_get and flavor_access_list)
in the UpdateFlavorAccess form are refactored into one API
call per request.
Change-Id: I009fe285d2263fd9b9f07ed1c3f4c96df261b535
Closes-Bug: #1766053
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3
blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
Many of the Python table views are using identical (or nearly identical)
table templates. This patch adds a common template and makes it the
default for a DataTableView, which allows us to remove many similar
templates and redundant lines of code.
Change-Id: I1e4e15e695ee1f21f4d44f141a854e30f1e567a1
Closes-Bug: 1653986
We have views that references angular.html all over the dashboard.
This patch creates a single view for angular views and consolidate others.
Change-Id: I31bd7eb1ce9eac5ec4e13531679b12fc5ebbe60b
This patch enables all of the features for the Flavors panel to use Angular but
disables it, so that it is easy to switch on/off.
Note that we add integration test switches since it can't read the Django
conf.
Note that I changed the common tests to allow for testing of api calls that
don't produce error toasts, because we needed better branch coverage, and
the deleteFlavor api wasn't fully branch-tested.
Change-Id: I92b1b57bd486e5eb87179cb8d44b7551e9de2e0f
Partially-Implements: blueprint ng-flavors
More link for flavors table is already supported, this patch adds
support to prev link for flavors table.
Implement blueprint: pagination-for-flavor
Change-Id: I3111e929c59077a0e52bf8f84a512ee18eee5f12
Nova and novaclient already support pagination for flavor, it would be
nice to have this in horizon. Adding pagination for flavors table.
Implement blueprint: pagination-for-flavor
Change-Id: Icff51302158263f2101a78519f509415514cd880
Patch https://review.openstack.org/#/c/142802/15 adds a method of
reducing duplication of page title logic, this patch applies that change
to the admin flavors view.
Change-Id: I2a75ec719b4e126775cd763caeee0266b87944a5
Partial-Bug: 1413749
Fix review comments on https://review.openstack.org/#/c/112874/
in admin/flavors/views.py regarding exception handling. Also
adding unit test to test negative scenario after changes.
Closes-Bug: 1369678
Co-Authored-By: Bartosz Fic <bartosz.fic@intel.com>
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
Change-Id: I5ea1216a22560cc0e8a5ba57be548b54674db689
Nova currently expose an api to let the users update
the flavors metadata so horizon should expose
this functionality. At the same time Glance is exposing
a metadata dictionary in Juno, where users can register
the key/value pairs that describe their cloud deployment.
This patch uses the glance metadata api to expose the available
metadata and the nova api to update the aggregates metadata.
Implements: blueprint glaance-metadata-flavors
Co-Authored-By: Santiago Baldassin <santiago.b.baldassin@intel.com>
Co-Authored-By: Pawel Skowron <pawel.skowron@intel.com>
Co-Authored-By: Pawel Koniszewski <pawel.koniszewski@intel.com>
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
DocImpact:
New UI. FLAVOR_EXTRA_KEYS setting deprecated.
Change-Id: Ica9d3d06314a4d5afa77f644bd1f8900a1c328f7
Remove vim setting:
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4
at the top of source code files, except for files in
openstack/common.
Change-Id: I9a5c6b17c6ef7ecec601f4503dfc7b31fc72e90a
Close-bug: #1229324
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
In some files, we import logging and define
LOG, but we never used it later, so i remove
those unused LOG and make horizon code clean.
Fixed: bug #1231761
Change-Id: I1ebf0098c647e7522f5f1a93cfece7a52bdc05c1
Change CreateFlavor/EditFlavor forms to CreateFlavor/UpdateFlavor
workflows. Provide access flavor management in each project. Add
the filtering function in Flavors page.
Implements blueprint define-flavor-for-project
Change-Id: I723bbf250a46af8de58de06a907f6efc737778db
This patch replaces some method imports with module imports and
makes H302 test enabled.
Fixes bug 1188531
Change-Id: Ibfbddeaa19cbbb244da58ffd5c918c41f03a0c65
Fixes all occurrences of this. We have a custom exception handler
in Horizon anyway that only catches ClientException in most of these
cases, but this commit lets us gate on the other cases.
Change-Id: Iea3dc13817f3e5b775b2024424bf3a906da5584b
Closes-Bug: #1211657
This patch replaces relative imports with full paths and
makes H304 test enabled.
Fixes bug 1188535
Change-Id: I47254cf9a790727102f7993d0fd107da514983df
This patch also re-organizes imports to import one per line.
Change-Id: Ia958e3a30a48d4308d08d51df243c1272425c316
Fixes: bug 1188529
Fixes: bug 1188537
In the current code both api.<method> and api.<category>.<method> are used.
Using api.<method> directly makes it difficult to identify which module
defined a method and forces developers to use unique method names among
projects. This commit removes api.<method> style method calls.
Change-Id: Iaefa1061f99b7865e02541df87c112a6b2868ec0
At the moment the swap disk entry of flavors is not listed in
the syspanel listing of flavors and it's not possible to create
a new flavor or edit an existing flavor with the swap size
Change-Id: I92195671024bb361fa5825cbdcea515850ddee31
Moves everything OpenStack-specific (dashboards, apis, etc.)
into the openstack_dashboard project, achieving a much
cleaner separation between the project-specific code and
the generic Horizon framework code.
Change-Id: I7235b41d449b26c980668fc3eb4360b24508717b