14577 Commits

Author SHA1 Message Date
Ivan Kolodyazhny
de69edd040 Add Fix django.contrib.auth.middleware monkey patching for APITestCase
This patch rollbacks changes in APITestCase introduced in the
0d163613265e036818fe567793a4fc88fe140d4a commit to unblock Horizon
plugins gates.

Change-Id: I6b2be31568e4aa4273990f9cfa76ca139620c84b
Closes-bug: #1806053
Closes-bug: #1805240
2018-11-30 17:33:21 +02:00
OpenStack Proposal Bot
04a0fdafcc Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I6895516e57701d502c5b8109d10499cd25ac965d
2018-11-30 09:13:29 +00:00
Zuul
478c1b8ad1 Merge "Updating "Create an Encrypted Volume Type" Picture" 2018-11-29 08:37:42 +00:00
manchandavishal
a0b72d54c0 Updating "Create an Encrypted Volume Type" Picture
With reference to I038918e4beef2ea4d346127713855e0421e8b721.
The description for "Key Size" field is changed.
So picture for the same also need to be updated.
This patch updates the picture in the doc.

Change-Id: Idfed41249cd6e74ff0ad209798dfc5f921552ed9
Related-Bug: #1780457
2018-11-29 04:34:36 +00:00
Zuul
0e75e2fb80 Merge "Remove "Change Password" from users table for non-admin users" 2018-11-27 13:38:18 +00:00
Zuul
485dae11d9 Merge "Fix bug about snapshot pagination" 2018-11-27 11:54:41 +00:00
Mohammed Naser
0630be639b Remove "Change Password" from users table for non-admin users
If you're a user without administrative permissions, you will
not be able to edit a password using the table inside the identity
section due to the fact that it uses a different edit API which
is not meant to be used for the user-side of things.

This patch adds a policy change in order to hide the change password
link for normal users, while keeping the functionality inside
the Settings panel still intact.

This change was first broken by I76eb9f95c7112bcbad75ee151f363f892298d081

Partial-Bug: 1788384
Change-Id: I7a64257ac274c9dac5705ba72a85833f8e7a1591
2018-11-27 05:14:05 +00:00
Zuul
7899b04888 Merge "[doc]Fix: Modify content of configure access and security for instance" 2018-11-26 21:33:47 +00:00
manchandavishal
8aea412a4f [doc]Fix: Modify content of configure access and security for instance
Step 7 of 'Add a key pair' instructs end users to respond to the prompt
 to download but Horizon now automatically download Key pair and no
prompt to download the key pair is displayed and moving a section of
code that should reside in 'Add a Key pair'.
This patch updates the doc correctly.

Change-Id: Ic96de6983c7d95c4eca19ae0b6e3d1c700aac9b5
Closes-Bug: #1804139
2018-11-26 15:20:54 +00:00
Zuul
269152feaa Merge "Fix: Help text for encrypted volume type has incorrect description" 2018-11-26 00:39:24 +00:00
Wangliangyu
9faf1cd109 Fix bug about snapshot pagination
Now, one page content will be changed after Clicking
"Next page" or "Prev page" to go back.

As we know, the order of the list could not be changed
at will, for one at the beginning or the end is a marker.
The marker is very importent for pagination.
So, this commit remove the sort of snapshots and reverse
the sort of the previous page ones.

Change-Id: I8d3d0cf4a1e6526bed3055b18741b1cf5d6166ff
Closes-Bug: #1804391
2018-11-23 17:12:46 +08:00
manchandavishal
9d5a266631 Fix: Help text for encrypted volume type has incorrect description
Volume type encryption help text states that "The Key Size is the
size of the encryption key, in bits (e.g., 128, 256).
If the field is left empty, the provider default will be used."
This is not really correct, because 128 bit keys do not actually
work with LUKS as used by Cinder volumes.
It should only recommend 256 bit keys.
This patch fixes the issue.

Change-Id: I038918e4beef2ea4d346127713855e0421e8b721
Closes-Bug: #1780457
2018-11-22 10:09:46 +00:00
Zuul
25d72fa5c5 Merge "Clarify middleware public methods" 2018-11-21 22:01:58 +00:00
Zuul
f535687c9f Merge "fix the bug of checkSpinnerValue" 2018-11-21 22:01:02 +00:00
Zuul
605f1a2d3c Merge "Fix: Inconsistent use of btn-danger" 2018-11-21 15:54:39 +00:00
Zuul
c4515d1bf3 Merge "add the assertWorkflowErrors" 2018-11-20 12:35:54 +00:00
Zuul
e09c11ac84 Merge "Update the HTTP links to HTTPS." 2018-11-20 11:07:59 +00:00
pengyuesheng
6216715e7d add the assertWorkflowErrors
some of the action pages use workflow,
but the check is using assertFormErrors,
which is unreasonable,
assertFormErrors only checks one step, not all

Change-Id: I764be4a243fb9c4790c195610514663d71e18373
2018-11-16 09:58:00 +08:00
Zuul
11fbb9dbd1 Merge "Make API calls in Volumes view parallel" 2018-11-15 14:28:34 +00:00
Mateusz Kowalski
9810711e75 Make API calls in Volumes view parallel
In order to increase rendering speed, make
api.cinder.volume_list_paged, api.nova.server_list
and api.cinder.volume_snapshot_list parallel.
For admin panel also api.keystone.tenant_list is
parallelized.

Closes-bug: #1660025
Partial-implements: blueprint fetch-resources-in-parallel

Change-Id: Ic789ff98a59ba792d77103e7778883562e7977d2
2018-11-15 14:50:01 +02:00
zhouxinyong
23313c7ec3 Update the HTTP links to HTTPS.
Change-Id: I7c45f9a54be390df2d965e181c581b26f17e70d5
2018-11-15 09:57:17 +00:00
manchandavishal
55835c7305 Fix: Inconsistent use of btn-danger
The color of delete image button is inconsistent with other
destructive buttons.
This patch fixes the issue.

Change-Id: Id7acd54e5535912eff4e69cbfd360ef02e7d8786
Closes-Bug: #1792778
2018-11-15 07:52:47 +00:00
Zuul
b402b2daf2 Merge "Imported Translations from Zanata" 2018-11-14 13:20:29 +00:00
Zuul
6cc2a5c053 Merge "Correct the word spell of "corporate firewall"" 2018-11-14 09:19:48 +00:00
Zuul
b30331224f Merge "Bump hacking to 1.1.0" 2018-11-14 09:19:47 +00:00
OpenStack Proposal Bot
127de2412e Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I9e2e45423de5b933b119abb3abc80346b338e1b2
2018-11-14 07:58:15 +00:00
Zuul
82ec5135d6 Merge "Add domain support for specialized test login" 2018-11-13 20:53:31 +00:00
Zuul
6555cbae3d Merge "Make table filters valid for every languages" 2018-11-13 17:21:08 +00:00
Zuul
bf16be4bca Merge "Ignore error msg for gateway IP when gateway is disabled" 2018-11-13 16:24:56 +00:00
pengyuesheng
a8006b4441 Ignore error msg for gateway IP when gateway is disabled
Although the gateway is disabled,
it still checks the format of the gateway ip and
throws an error if there is a problem with the format.

Change-Id: I8d13819175701885412ab4813e19aba0ac63a3c3
Closes-Bug: #1799896
2018-11-13 16:18:45 +08:00
OpenStack Proposal Bot
b5c5d81dce Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I487a071532a570d12b9b6991f4253ad6f76782e0
2018-11-13 07:59:04 +00:00
Zuul
51869de19d Merge "The metadata submit button ignore filtering" 2018-11-13 03:26:21 +00:00
wangliangyu
02b6c1b405 Make table filters valid for every languages
As we known, the table support filtered by local language
with some filters mapping, like below:
https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/networks/views.py#L46
We use the filter string given by user and look valid values
in those filters mapping. But the keys in filters mapping,
which is django.utils.functional.__proxy__, does not match
the filter string.
This commit valid them.

Change-Id: I40cb50bbf08fc457967615f2654026cfdafb9232
Closes-Bug: #1802228
2018-11-13 10:58:19 +08:00
pengyuesheng
a81098b1d3 fix the bug of checkSpinnerValue
The user setting page sets the "Items Per Page" minimum or maximum value,
which affects the display of "Log Lines Per Instance"

Change-Id: I087412272257b665b6ac1de6ba5eabd06f011e74
Closes-Bug: #1803014
2018-11-13 10:24:29 +08:00
Zuul
98126eb680 Merge "Fix bug of updating metadata for images" 2018-11-13 02:19:05 +00:00
nicolas
fe69104738 Add domain support for specialized test login
Some test servers require the domain parameter for login.
This small change provides support for servers that require
this additional login step.

Change-Id: Ia9f94b687ee6d3318fa61ad3f446b21ed6cfea6a
Closes-Bug: #1802343
2018-11-12 21:06:37 +00:00
Zuul
d45fb291d0 Merge "Properly calculate auth_url for WEBSSO from POST data" 2018-11-10 21:05:13 +00:00
Akihiro Motoki
cebe212d00 Bump hacking to 1.1.0
Fix the following new errors:
* E305 expected 2 blank lines after class or function definition, found 1
* E126 continuation line over-indented for hanging indent

max_line_length is set to 80 as the default value in pycodestyle is 79
but horizon uses 80 as max_line_length.

Ignore W504 and F405 by configurations.
Reasons of disabling them are explained as comments in tox.ini.

Change-Id: Iee8bcd60c30883fc8c74f08cf20af853cbb5e271
2018-11-10 16:44:25 +09:00
rongyaozu
2b011289cd Correct the word spell of "corporate firewall"
Change-Id: I0fcb03131b640fddd4d163513a86da5a2b4dd20c
2018-11-09 17:21:02 +08:00
OpenStack Proposal Bot
a3a4b93d32 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ic2c9268c7e2af73ed399d6a25925734cf1840295
2018-11-09 08:17:47 +00:00
Zuul
641a3ce2ab Merge "Fix django.contrib.auth.middleware monkey patching" 2018-11-08 17:38:34 +00:00
OpenStack Proposal Bot
a0226cf90b Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ia0e5274c3d2daa3fdf8769bfc56e1d68326a9b47
2018-11-08 08:12:57 +00:00
OpenStack Proposal Bot
21b581b49f Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I744eb6ddaa0d7fccd141c18c59e2865e771e6845
2018-11-07 08:04:09 +00:00
Zuul
799d543206 Merge "Show snapshots list correctly when launching instance" 2018-11-06 23:03:35 +00:00
wangliangyu
5f4057f8b5 Show snapshots list correctly when launching instance
In launch instance modal, when a user selects 'Instance Snapshots',
not all snapshots are listed. The snapshots which are created from
an instance with new volume or an instance created from volume
or volume snapshot don't have 'image_type' but 'block_device_mapping'.
So, judging only by image_type is not enough.

Change-Id: I7e175b6a7260ca3d82560427a8f742f8cfa35565
Closes-Bug: #1627619
2018-11-06 22:06:52 +00:00
Mathieu Gagné
0d16361326 Fix django.contrib.auth.middleware monkey patching
The "request" attribute is not available in
openstack_auth.backend.KeystoneBackend.get_user when session data is restored
and it's the first request to happen after a server restart.

As stated by the function document, the "request" attribute needs to be
monkey-patched by openstack_auth.utils.patch_middleware_get_user
for this function to work properly.

This should happen in openstack_auth.urls at import time. But there is nowhere
in Horizon where this module is imported at startup. It's only introspected
by openstack_dashboard.urls due to AUTHENTICATION_URLS setting.

Without this monkey-patching, the whole authentication mechanism falls back
to "AnonymousUser" and you will get redirected to the login page due
to horizon.exceptions.NotAuthenticated being raised by
horizon.decorators.require_auth as request.user.is_authenticated will be False.

But if a user requests a page under auth/, it will have the side-effect of
monkey-patching django.contrib.auth.middleware as expected. This means that
once this request is completed, all following requests to pages other than
the ones under auth/ will have there sessions properly restored and
you will be properly authenticated.

Therefore this change introduces a dummy middleware which sole purpose is
to perform this monkey-patching as early as possible.

There is also some cleanup to get rid of the previous attempts at
monkeypatching.

Closes-bug: #1764622
Change-Id: Ib9912090a87b716e7f5710f6f360b0df168ec2e3
2018-11-06 21:36:45 +00:00
Akihiro Motoki
b5d9aa16ce Clarify middleware public methods
In Django 1.10 the new middleware interface was introduced [1].
process_request and process_response are no longer part of the interface.
On the other hand, process_exception is the part of the interface.

To clarify that we are using the new middleware interface,
it looks better to rename the methods in the old interface to private.

[1] https://docs.djangoproject.com/en/2.0/topics/http/middleware/

Change-Id: I0bb39321f3659458a86beb2b258e9e903392620a
2018-11-07 06:24:24 +09:00
Zuul
bafb90e5ff Merge "Call Glance list with certain image ids" 2018-11-06 18:30:06 +00:00
Zuul
ee1d7a57e7 Merge "Add "Create Router" button to admin panel" 2018-11-06 17:16:24 +00:00
BubaVV
deb55b8411 Call Glance list with certain image ids
This patch uses glance list filtering, which allow to query images
for the list of required ids. See [1] for details.

Patch rebased to master. Added test for proposed Glance API request

[1] https://developer.openstack.org/api-ref/image/v2/#show-images

Related-Bug: #1508554
Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Co-Authored-By: Vadym Markov <markov.vadim@gmail.com>
Change-Id: Iac485c1b448011fec97ba5bfaa83851914b294d9
2018-11-06 12:30:57 +02:00