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
horizon already deprecated launch instance Django based implementation
in the wallaby cycle [1]. This patch remove code for launch instance
Django based implementation as angular based implementation is the
default one from long and all features gaps between angular and Django
implementation is closed.
It also moves SetAdvanced step code to ``resize_instance.py`` as
``workflows/create_instance.py`` file is deleted and remove server_group
option from Advanced Options of resizing instance action because
"server_group" is not required while resizing an instance as per
nova-api reference [2].
Closes-Bug: #1869222
[1] https://review.opendev.org/c/openstack/horizon/+/779125
[2] https://docs.openstack.org/api-ref/compute/?expanded=resize-server-resize-action-detail#resize-server-resize-action
Change-Id: I5e01cd81f309491f1a58ea93911030366a86e3c7
All strings are considered as unicode strings in python 3,
so we no longer need "u" prefix (u'...').
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I796d2fcdca066475bbf29d25cbf2aa67b2b2178b
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
This patch adds a tab for cinder user messages for volumes and
snapshots. Cinder user messages shows error details for cinder
resources like if we are unable to create a volume due to some
failure in cinder it will shows us the reason of failure.
Implements blueprint cinder-user-facing-messages
Change-Id: I6f1539ffebdf2dfd0a470009e9171e868c2a9ad3
"Update Metadata" button is visible by all
roles on "Volumes" and "Snaphsots".
"policy_rules" is defined in "UpdateMetadata"
class to fix it.
Change-Id: Ibbdd4e4874c7cea97c91948003a68ebf43b8c934
closes-bug: #1873007
Make it possible to use horizon for backing
up snapshots.
* Add snapshot column to backups table
* Add snapshot information to backup detail
* Fix wrong template path in create_backup.html
* Add ChoiceField with snapshots belonging
to the volume in create backup form
* Add create backup option in snapshots table
* Adjust tests and test data
When backing up from snapshots table the snapshot
ChoiceField is preset with the choosen snapshot
as the only option.
Implements: blueprint volume-snapshot-backups
Change-Id: I4b7707d95756501e0622460e3ddc4e3f7624f02e
This commit mainly covers settings
in openstack_dashboard/dashboards/project/.
Part of blueprint ini-based-configuration
Change-Id: I22413d2fe20576a507634dc4e2d0354c7db8800a
Previously the volume group table in the project dashboard checked if
'volume' endpoint is available and 'volumev3' endpoint was not checked.
'volumev3' is an endpoint name commonly used for Volume v3 API and
it is not surprising that only volumev3 is configured in deployments,
so we should ensure that horizon works with environments only with
'volumev3' endpoint.
The service endpoints are already checked in panel.py, so there is no
need to have the permission check (i.e., service check) in the table.
Similar patterns are found in tables in project/snapshots and
project/vg_snapshots. They are also cleanup by this commit.
Change-Id: I12d03745bec5d8dec10a8e2b4306c595f2f39560
Closes-Bug: #1829461
Previously allowed() methods in DeleteVolume and DeleteVolumeSnapshot
actions assume that the cinder generic group is always available.
The current admin volume and volume snapshot tables do not load
generic group information, so these allowed() methods failed and
as a result these delete actions are not shown.
This commit checks if a volume belongs to a generic group in more
robust way. This change makes the project volume table work with
deployments without the generic group as well.
Change-Id: Idd887434153966d9188acaf08346fa6a0f0e6719
Closes-Bug: #1787065
(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
Cinder API v3 was introduced several releases ago and is backward
compatible with API v2 so it's safe to swith to use it.
Change-Id: I550e6c59bb14c17da78d7b2abcde5783b2b6825d
Closes-Bug: #1728761
Currently, there is no way to filter and see the snapshots for
just a single Volume. As the combined list of volume snapshots
increases, so does the difficulty in viewing and using them. It
would be beneficial to have these snapshots isolated from each other
based on the volume they were created from.
This change adds a "Snapshots" tab to the Volume Details page that
shows a table of snapshots associated with only that specific Volume.
This will not only make it easier to just view the snapshots for a
particular Volume, but will also make it much more approachable to
manage and delete them as well.
Change-Id: I0a80ef2c8171c81f73e3abf5ab461dae3a3a9afe
Closes-Bug: #1323644
Variable contents in Django templates are escaped by default, no need
to do it explicitly.
Change-Id: I0b9619b7b1605bcdb17fe3b7204bf6e6c2520454
Closes-Bug: #1597751
Note that there was state leaking from one of the existing
tests that was relied upon in other tests and moving that test
in the run order caused the others to fail. All related tests
have been altered to not leak state.
Change-Id: I972bc5650fa77044de8a027f570cf2cb41febef8
Implements: blueprint reorganise-volumes
In doing this I found that the permission check on the
project Volume Snapshots table was incorrectly defined,
resulting in always-denied. Removing a level of nesting
in the permission structure fixed it.
Change-Id: I1bc5bd4820700d29861ec1dcd6c87a41b5230266
Implements: blueprint reorganise-volumes