Commit Graph

16 Commits

Author SHA1 Message Date
Zuul 34b2e82343 Merge "volume-backup add incremental flag" 2022-09-20 06:43:09 +00:00
Jesper Schmitz Mouridsen 20a571fdd2 Add cinder-user-facing messages for Backup
This patch adds a tab for cinder user messages for volume backups.
Cinder user messages show error details for cinder resources like if we
are unable to create a volume backup due to some failure in cinder it
will show us the reason for failure.
It also updates project and admin SnapshotDetailsTabs to use
DetailTabsGroup instead of TabGroup to improve top padding.
Also adds the fail_reason in the detail view, if backup errored.

Related-Bug https://bugs.launchpad.net/cinder/+bug/1978729

Change-Id: I4e639211043270e814fac489f915588af03f966a
2022-09-06 07:29:40 +00:00
Jesper Schmitz Mouridsen 61df006f4a volume-backup add incremental flag
Signed-off-by: Jesper Schmitz Mouridsen <jesper@schmitz.computer>
Change-Id: Ia99d045eda9a138cb0466930ccedf865d7a6b54f
2022-09-02 08:56:39 +00:00
Akihiro Motoki e4444e6979 Address RemovedInDjango40Warning (4)
In Django 3.0, django.utils.http.urlquote(), urlquote_plus(),
urlunquote(), and urlunquote_plus() are deprecated in favor of
the functions that they’re aliases for: urllib.parse.quote(),
quote_plus(), unquote(), and unquote_plus().

https: //docs.djangoproject.com/en/4.0/releases/3.0/
Change-Id: I37fcd917cbf87b4d3141cfbdd2675aa38f33f2a4
2022-02-04 16:27:18 +09:00
pedro 4c96f652ee Add pages menu to volume backups pagination
The backups pagination was with a bug that prevents users from
access older backups when the number of backups exceeds the
page size configurated in 'API_RESULT_PAGE_SIZE' properties.

The bug was occurring because the pages displays (Next, Prev) were
not displayed in the backups page, leaving the user with only
the first page to access their backups, so the backups from other
pages are unreachable.

Was fixed this bug and also was added new buttons to access
a specific, the last and the first pages. Easing the users'
navigation through the backups pages.

Change-Id: I148634152484f9718759775b81aab3703a296ef5
2020-05-28 16:21:45 +00:00
Ivan Kolodyazhny e976461d85 Remove six usage from horizon package
We don't support Python 2 anymore so we don't need this
compatibility library.

six.reraise usages are left as is until it'll be moved to some
base lib like oslo.utils to not re-implenent this method in
Horizon.

This patch also removes Python2-specific base test case methods
assertItemsEqual and assertNotRegexpMatches in flavor of new
Python 3 analogues.

Change-Id: I0b567382edf4d68674a7b8d0b02333fb57293958
2020-01-15 12:36:11 +02:00
Jesper Schmitz Mouridsen 9fa1cddf09 Enable volume snapshot backups
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
2019-07-25 19:15:01 +00:00
Akihiro Motoki 363802d9e9 Avoid using nova volume test data for cinder API mocking
self.volumes from nova test data is used as return values
of cinder API wrapper mock. Nova test data is based on
novaclient.v2.volumes.Volume class. This is not correct.
They should be based on cinderclient Volume class.

This commit changes to use cinder test data for
return values of openstack_dashboard.api.cinder mock.
'bootable' attribute is required, so it is added to cinder_data.

This confusion comes from the naming of self.volumes.
This commit renames self.volumes to self.nova_volumes
to avoid further confusions.

Note that api.nova.instance_volumes_list() calls get_server_volumes
from novaclient and it is correct to use self.nova_volumes.

Change-Id: I9c431dbb03f90bab84a4a6a3e3ea8fd5a5498b5b
2019-07-18 04:11:19 +09:00
PrivateRookie 19635237b3 fix volume status bug when restoring a Volume
Change-Id: I96b922d59908f19f2850c117e77ec8831e7fdd77
Closes-Bug:#1740260
2018-09-04 15:21:00 +08:00
Akihiro Motoki a0e4508c97 Fix confusing variable names in unit tests
mox_**** was used to store test data.
It is confusing and meaningless.
This commit fixes the usage.

Related to blueprint mock-framework-in-unit-tests

Change-Id: I35a13020962999c3f5b550208e6f0b82bf1648b6
2018-08-18 17:15:59 +09:00
Akihiro Motoki dd560d95fd Convert project tests into mock: api_access/backups/overview/snapshots
Partially-Implements: blueprint mock-framework-in-unit-tests
Change-Id: I5a61d26d21f14ec44e8e82f6539196d53b6783fd
2018-03-07 23:27:00 +09:00
Akihiro Motoki e477eafa45 django2: Replace django.core.urlresolves with django.urls
(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
2018-02-17 01:36:48 +09:00
Gary Smith eb49097519 Enable backups on in-use volumes
In addition to "available" volumes, those that are "in-use" can now be
backed up.  Backing up "in-use" volumes requires setting the "force"
parameter in the cinder backup call.

Closes-Bug: 1686671
Change-Id: I8a11216be49313f710ce5874499f8d2efba91e73
2017-05-11 16:00:33 -07:00
Akihiro Motoki baa4ca8dce hacking: noqa cleanup in openstack_dashboard
attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.

After this, there are only 3 noqa under openstack_dashboard/ :)

Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
2017-03-17 19:38:47 +00:00
Richard Jones 46ad19dbf0 Refactor Project Volumes stand-alone panel
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
2017-03-06 15:50:09 +11:00
Richard Jones 921f84a7ce Move Volume Backups out of tabbed panel
Notes on enabling backup:
https://github.com/coolsvap/devstack-cinder-backup

Change-Id: Ie6bcfad30d04ee35c75d693f5637197297ca84ef
Implements: blueprint reorganise-volumes
2017-03-06 15:49:45 +11:00