The default url should be of type "OPENSTACK_ENDPOINT_TYPE"
parameter as specified in settings.
Closes-Bug: #1873353
Change-Id: I05ce933e5bd01bf59a52e7d49facce26efa693aa
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
Fix tempest jobs to properly use tempest-horizon as tempest-plugin in
job configuration.
Flake8 3.8.0 fixed a few bugs so that additional issues are marked, fix
these.
Co-Authored-By: Andreas Jaeger <aj@suse.com>
Change-Id: I2aca3286ea2cc1ade567087786781952489d6efa
Kyestone V2 support was removed in Train, so it's safe to do such cleanup.
* Functions which just return horizon settings are dropped and
the settings are referred directly now.
* The service catalog in the sample test data is updated to match
the format of the keystone API v3.
* Related to the above change of the sample service catalog,
openstack_dashboard.test.unit.api.test_keystone.ServiceAPITests is
updated to specify the region name explicitly because 'RegionTwo'
endpoint is no longer the second entry of the endpoint list in the
keystone API v3.
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Ib60f360c96341fa5c618595f4a9bfdfe7ec5ae83
+ Adds endpoint for listing available policies
+ Support to select a storage policy for new containers
+ Display container storage polcy on dashboard.
Change-Id: I588452fd5d6417859f5dd19ccedcb18f420ab646
When the image upload finishes, we try to delete the temporary
file that was used for the upload. However, depending on how
Horizon is deployed, instead of a file it can be a BytesIO
instance, which leads to an AttributeError. This happens in
a separate thread, so Horizon itself doesn't crash, but it's
better to catch that exception.
Change-Id: Iaa66d9c87060c1e001f3f6e31f630d6092df55d3
Closes-Bug: #1866632
cinder microversion check (api.cinder.get_microversion) checks
volume endpoint availability in a different order as cinderclient()
does. It does not API_VERSIONS setting in horizon.
As a result, when multiple volume endpoints are configured,
get_microversion() accesses a volume endpoint with a different API
version. At the moment cinder v2 and v3 APIs returns the same info,
so it only affects when cinder v1 endpoint is configured.
This commit introduces a new function _find_cinder_url() to
retrieve a volume endpoint considering API_VERSIONS.
get_auth_params_from_request() is no longer needed and the variable
substitutions are now backed to cinderclient(). It was introduced
so that the memoized decorator worked but the memoized decorator
was improved and we no longer need it.
Change-Id: I69b1fc11caf8a78c49e98aba6c538e5f344b14f2
Closes-Bug: #1864133
We have several codes to handle the differences between py2 and py3.
py2 support has been dropped so there is no need for them now.
Change-Id: I30080f4e1a5ac04860c4341d966ee53131eb2022
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: I26a59176be9e9f213128e4945a58b9459334b626
This patch resolves an issue with the "prev" link when instances
have identical "created_at" values. This can occur when creating
instance using the "min/max count" option. The reverse sort does not
work correctly as the server list returned from nova is not an exact
reverse as the forward sort. It looks like the combination of sort_keys
must be unique to ensure the forward and reverse pagination properly.
As a workaround 'uuid' (server ID) is added to 'sort_keys'.
In addition, 'display_name' is added before 'uuid' in 'sort_keys'
to list servers in the alphabetical order (which sounds natural).
Closes-Bug #1856243
Change-Id: I73234b2c69ce8ea648b4a9721abe4f5670031909
This patch allows administrators to set disk_formats only for glance,
while horizon will retrieve list of supported formats from glance API.
IMAGE_BACKEND_SETTINGS still may be used to redefine display name
of the format or additionally limit list of availble ones.
Change-Id: Ia4ea513023895f4ad2a87f91e3d2837c7668d9ae
Closes-Bug: 1853822
In case of Keystone Multidomain setup, the project and users list
is empty when the domain context is changed. Horizon uses domain
scoped token for keystone api calls to get list of projects and users.
And domain scoped token cannot get information about projects and users
in other domains, the list is empty.
This patch modifies the use of domain scoped token only when domain
context is not modified.
The bug have 3 parts
1. Users are not listed on GUI in different domain
2. Projects are not listed on GUI in different domain
3. Gui hangs during creation of user/project using + option
This patch handles case 1 and 2.
Change-Id: Ibafe3e2eb3ee1ee5c9eb5d2a276a0edfa3e7c607
Partial-Bug: #1826114
Closes-Bug: #1830782
Horizon's AngularJS pages (for example Images and Keypairs)
display dates using browser's timezone now. This change makes
AngularJS pages use Horizon's Settings Timezone instead of
browser's timezone and if Timezone is not set under Settings,
AngularJS pages will display dates in 'UTC' timezone.
Closes-Bug: 1832768
Change-Id: Ibbed19600bfe6b13c43b9f09fa484cb78524b0d6
api.cinder.get_microversion function now supports OPENSTACK_SSL_NO_VERIFY
and OPENSTACK_SSL_CACERT config options.
This depends on commit 4a3a2c3c9a89ccff4e64d3da96de5b0af4303840 in
python-cinderclient, so the minimum version of python-cinderclient
is bumped to 5.0.0.
NOTE(amotoki): The stretegy of backporting to stable branches needs
a discussion with the requirements team as we cannot bump the
minimum version (at least the major version bump is surprising).
Change-Id: I22c6c60e10d8e9328f7f1e0c24d6c74496ec1a71
Closes-Bug: 1744670
The novaclient list_extensions API binding was removed in the
16.0.0 release [1]. The ability to enable/disable extensions
in nova has been deprecated since Liberty [2] and was removed
in Newton [3].
For horizon this only matters for the OPENSTACK_NOVA_EXTENSIONS_BLACKLIST
config setting and some javascript code used to compile panels based on
enabled extensions. In order to work with novaclient 16.0.0+, this
change removes the list_extensions usage since all extensions
are enabled in nova and thus for horizon a nova extension is only
not supported if it's in the configured blacklist. To continue supporting
the javascript code which uses the getExtensions function, the extension
names are hard-coded. Note that the method meant to test that code,
_test_extension_list, was wrong but never ran because of the underscore
prefix on the method name. That is fixed here.
[1] https://review.opendev.org/686516/
[2] https://review.opendev.org/214592/
[3] https://review.opendev.org/351362/
Change-Id: Iebb1e78c718b931d632445e4de6d7a29ccb92be2
Closes-Bug: #1847959
Glance V1 API was deprecated in Stein release in Horizon and
deprecated in Glance since Newton release.
Change-Id: I18f6fd03dd3e07fa4f2ccfdccfdc3ca766c91c16
In Train cycle, we moved the definition of default values
to openstack_dashboard/defaults.py. The current code accesses
a dict member using []. It requires operators to define a dict
setting with a full member.
This commit allows to use dict-type settings with partial members.
A new function is introduced to retrieve a dict-type setting
considering default values defined in
{openstack_dashboard,horizon,openstack_auth}/defaults.py
Change-Id: I7ff0ad4bca698aef9c0eba370b0570200a14367a
Closes-Bug: #1843104
When editing an image, if the disk_fomrat is 'vhd',
the container_format was wrongly set to 'bare' before.
'ovf' is the correct container_format for 'vhd' disk images.
Closes-Bug: #1539722
Change-Id: Ic6b0c66af0d5c8db2d802d6eea2b97721d92b7eb
Keystone V2 API was deprecated in Stein release in Horizon and
removed from Keystone in Queens release.
Change-Id: I917e273d3174adf0874e516b3d635ccb8ba58a27
Cookie-based settings related to openstack_dashboard are located
under horizon directory,, but they are not related to "horizon".
This commit moves them to "openstack_dashboard" directory.
Part of blueprint ini-based-configuration
Change-Id: Id48ececdbe819a95485e9a91dc5a1a163a5568c3
Resolves the following warning:
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will
stop working
Change-Id: Ib2214e7560cda1ef510c08859d5ee0726eb66b7b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
It seems the behavior of 'partial' argument of Version class __init__
has been changed between semantic-version 2.6.0 and 2.8.1
(though I could not identify the root cause).
'partial' argument is marked as deprecated in semantic-vesion 2.7.0,
so it is a good chance not to depend on 'partial' argument in horizon.
This commit uses Version.coerce() [1] instead to convert non-semver
version into a valid semver version.
We also need to keep the original version information as it is passed
when initializing python-*client (cinderclient and keystoneclient).
In addition, the previous implementation based on semantic-version 2.6.0
returns True for "Version("3.55") == 3". It depends on the behavior
of "partial" argument of semantic_version.Version. It was not
documented and it looks tricky to depend on this behavior.
"major" and "minor" properties are now introduced and api/cinder.py
is updated accordingly. I believe this approach is clearer and stable.
Unit test coverage on dict behavior is improved.
Variable names in the unit tests are adjusted to more meaningful ones.
[1] https://python-semanticversion.readthedocs.io/en/latest/#coercing-an-arbitrary-version-string
Change-Id: If0deee9d0289ff91d58d942b9612f7736356ae18
In the early days of OpenStack, user and project ids were not
uuids, but auto-incremented integers.
Since those early days, many operators fought long battles
against the unrelenting OpenStack behemoth.
Only those heroic operators who emerged victorious from the
brutal upgrade battles can show the scars of those integer
user and project ids like badges of honour.
Closes-Bug: #1842004
Change-Id: I0c3e3465e8e7499c94d1a82b7295aeec13955e55
When listing security groups in the dashboard and
one or more security groups had no rules it failed
because python throws a KeyError.
This commit changes the neutron API wrapper in horizon
to ensure ensure rule information in SG always exists.
Closes-Bug: #1840465
Co-Authored-By: Tobias Urdin <tobias.urdin@binero.se>
Change-Id: I6e05a7dc6b6655514ee2bff6bd327da86f13900a
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
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.
Note that redirects will be set up as well but let's point now to the
new location.
For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html
Change-Id: I644db7a0b86142551c0660e4e2fe3a1a4f6eede5
The call to allocate a new floating IP was incorrecting calling
tenant_floating_ip_allocate, this is used by neutron-lbaas-dashboard.
Change-Id: Ia4d1367ccd309a074a0ea84a555d7de6c07971a6
Closes-bug: #1831954
code in neutron api in some circumstances tries to access
a set or a frozenset by index, which does not work.
In particular it may manifest as
Unable to connect to Neutron: 'frozenset' object has
no attribute '__getitem__'
error in the horizon.log when opening an empty instances list page.
Convert to list instead, and skip conversion for `collections.Sequence`
objects only that support all the methods used for this object
further in this method.
Closes-bug: #1825961
Change-Id: I141a28d96f71c06a1ebe44d7067ccf4609e22db6
Cinder consistency group has been replaced by the generic group feature.
Horizon support of the generic group (in the project dashboard) is
available since Rocky release and it covers all existing support
for consistency group in horizon.
The consistency group support is horizon was marked as deprecated
in Stein release [1].
This commit drops the consistency group support.
[1] https://review.openstack.org/#/c/626846/
Change-Id: I11187d2b03b7e0033a6c6ba3f8be25b8b5e4dd74
Currently horizon defines default values of settings in the logic
using getattr(settings, <setting name>, <default value>) and
it is not easy to handle the default values of available settings.
This commit starts the effort to define default settings explicitly.
This is a preparation for ini-based-configurations.
It covers settings in openstack_dashboard/api.
Part of blueprint ini-based-configuration
Change-Id: Id4c3287f0a572fd14ea93b54bcab8fabda39e583
Several Angular based dashboards, such as images and snapshots,
not regenerated after some item on this page changes its status
from transition state.
For example, an image may be shown forever in the "Creating" state
with running progress bar. To improve UI this patch re-upload items
list until some item in transition state.
If status of item changed, then 'trackBy' field changed and
Angular will re-render row with this particular item with
ng-repeat-start directive and won't re-render all entire page.
Change-Id: I2308baebb65b11180d66bd69d834386022c2ad84
Closes-bug: #1797592