13839 Commits

Author SHA1 Message Date
Akihiro Motoki
a72963bdbd Drop Django <= 1.10 support
After Django 2.0 support, we no longer supports Django 1.10 or older
(Actually Django 1.10 seems to work though).
The current django.VERSION branches are all related to Django 1.10
or older, so we can drop all conditions.

py35dj20 job is now voting.

blueprint django2-support
Change-Id: Iefc0ab1c62c82f2842ec7761a9b981da9351cbd2
2018-03-03 07:33:23 +09:00
Akihiro Motoki
4dd60373dc Fix python 3 related test failures
In Python 3.5 with Django 2.0 env, some tests fail.
This commit fixes them.

blueprint django2-support
Change-Id: Ib5ba46d501956ebc7d4f69f17ee86f44319418d2
2018-03-03 07:33:23 +09:00
Akihiro Motoki
d936ba4c31 Suppress unnecessary logging output in UTs
Change-Id: I2e36cc3401f406535dce24f0759a2ba402ca71f6
2018-03-03 07:33:23 +09:00
Akihiro Motoki
b017879500 Django2: Use new custom template loader interface
The new template loader interface is described here:
https://docs.djangoproject.com/en/2.0/ref/templates/api/#loader-methods

The old interface was deprecated in Django 1.9, and the old interface
load_template_sources() was removed in Django 2.0.
https://docs.djangoproject.com/en/2.0/releases/1.9/#template-loader-apis-have-changed

According to the UT result, force_escape in _detail_overview.html
looks unnecessary. If force_escape is used, the returned string will
be double-escaped and it is not what we expect.

blueprint django2-support
Change-Id: I8a5a79cb61a6ebd25453bde3e0ec64f5b5f50e1b
2018-03-03 07:22:35 +09:00
Akihiro Motoki
3ecda5ac67 django2: adopt New-style middleware
Django 1.10 introduces a new style of middleware and
the old style was removed in Django 2.0.

https://docs.djangoproject.com/en/2.0/releases/1.10/#new-style-middleware

blueprint django2-support
Change-Id: I2fba2b1b2b528096422df3ed558ad75a1b80bbb9
2018-03-03 07:22:35 +09:00
Akihiro Motoki
be197d11f1 django2: Drop SessionAuthenticationMiddleware
https://docs.djangoproject.com/en/2.0/releases/2.0/#miscellaneous
---
The SessionAuthenticationMiddleware class is removed. It provided
no functionality since session authentication is unconditionally
enabled in Django 1.10.
---

blueprint django2-support
Change-Id: I2767e01ec8879d6886152a0ed67f6738eb17209c
2018-03-03 07:22:35 +09:00
Akihiro Motoki
18684e1ff5 django2: Fix 3-tuple ImproperlyConfigured error
https://docs.djangoproject.com/en/2.0/releases/1.9/#passing-a-3-tuple-or-an-app-name-to-include

blueprint django2-support
Change-Id: Ifb9b7501363fe8a3ef417498e0932323240a6dcd
2018-03-03 07:20:43 +09:00
Akihiro Motoki
1a252cb5e8 django2: is_authenticated/is_anonymous is now property only
https://docs.djangoproject.com/en/2.0/releases/1.10/#user-is-auth-anon-deprecation

blueprint django2-support
Change-Id: I57a39417f0595eae8d1c06d7e61d0a67078bb231
2018-02-17 01:36:54 +09:00
Akihiro Motoki
826720ada3 django2: Replace assignment_tag with simple_tag
https://docs.djangoproject.com/en/2.0/releases/1.9/#assignment-tag

blueprint django2-support
Change-Id: Ib5021a4030fd9bc954365a352bdf4dccd049d28e
2018-02-17 01:36:54 +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
Akihiro Motoki
76fa01b7de Drop old django tests
django 1.8 to 1.10 are incompatible with django 2.0.
We only supports Django >= 1.11 in Rocky and UTs with
Django <= 1.10 are no longer needed.

Conditions using django.VERSION will be dropped in a later patch
only because moving them to this patch causes many merge conflicts.

blueprint django2-support
Change-Id: I0611297e70d8e58d53e94635b0b7175d94df195b
2018-02-17 00:23:28 +09:00
Zuul
317cd8e7da Merge "Add option --version to Zanata pull_catalog" 2018-02-16 13:07:04 +00:00
Zuul
82dd2ffeee Merge "Imported Translations from Zanata" 2018-02-16 12:42:45 +00:00
Zuul
e2d54a6979 Merge "Switch Nova API tests to mock" 2018-02-16 12:04:25 +00:00
Zuul
32f9d6b6a8 Merge "Provide a way to disable mox completely" 2018-02-16 12:03:36 +00:00
Frank Kloeker
06a63b4fdb Add option --version to Zanata pull_catalog
During translation phase it's required to pull different versions from
translation server instead only master branch.

Change-Id: I27ab5f678aae71846f5ec6191be08e05cf72e53e
2018-02-16 13:01:35 +01:00
OpenStack Proposal Bot
a44e67f9a0 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I69d0b67d3a3dfc47d92a6e2f580fc191f1237cc1
2018-02-16 06:24:31 +00:00
Akihiro Motoki
79ae866d57 Switch Nova API tests to mock
This patch changes mox to mock for the following test modules:
* openstack_dashboard/test/unit/api/test_nova.py
* openstack_dashboard/test/unit/api/rest/test_nova.py

Partially-Implements: blueprint mock-framework-in-unit-tests

Change-Id: I894ba4f1ab2123ce36f451013d8f7ebd70d9bd0f
2018-02-15 08:37:26 +00:00
Akihiro Motoki
51378f7058 Minor fix on mock migrated tests
Part of blueprint mock-framework-in-unit-tests

Change-Id: I40d18633889819e3087842e4fa9c7eccc2619c72
2018-02-15 08:37:11 +00:00
Akihiro Motoki
1a2c957fbb Provide a way to disable mox completely
This commit introduces 'use_mox' attribute to TestCase class.
If this is set to False, TestCase does not setup mox.

In addition, a common method to emit the deprecation warning
was introduced in APITestCase.

Part of blueprint mock-framework-in-unit-tests
Change-Id: I1e3df7ea2a867b8a7aa69523bed2beaab9663dc0
2018-02-15 08:36:57 +00:00
Zuul
d76e3ea5df Merge "Admin State is always UP whatever whether router Admin State is checked or not" 2018-02-14 18:23:27 +00:00
Zuul
71d9f8adc1 Merge "Imported Translations from Zanata" 2018-02-14 17:53:04 +00:00
OpenStack Proposal Bot
5a68a268b2 Updated from global requirements
Change-Id: I48b91d3b8dbf0f3d8761b893a839f814fbe9e191
2018-02-14 12:05:07 +00:00
OpenStack Proposal Bot
c687127833 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I2ddd8457e375a57e43e2f1370ea8e203fc74e438
2018-02-14 07:51:56 +00:00
Zuul
ccd0d86de8 Merge "Move test template to more proper directory" 2018-02-14 03:16:39 +00:00
Zuul
433e2f9756 Merge "Fix typos in horizon" 2018-02-13 14:53:22 +00:00
Zuul
cc35988ead Merge "Cache neutron extension list across requests" 2018-02-13 14:53:19 +00:00
Zuul
977d3d5cf5 Merge "Imported Translations from Zanata" 2018-02-13 14:42:39 +00:00
Nguyen Hung Phuong
a59ebd79ce Replaces yaml.load() with yaml.safe_load()
Yaml.load() return Python object may be dangerous if you receive a YAML
document from an untrusted source such as the Internet. The function
yaml.safe_load() limits this ability to simple Python objects like integers or
lists.

Reference:
https://security.openstack.org/guidelines/dg_avoid-dangerous-input-parsing-libraries.html

Change-Id: I7d130f1b4a1a00a255ce21742c9d89ba7f2bd90f
2018-02-13 09:26:00 +00:00
OpenStack Proposal Bot
974d05c359 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Id57169667ff3f8c8ac12e56cd6b96aa05b045088
2018-02-13 07:57:28 +00:00
Shu Muto
f2bff1370f Move test template to more proper directory
The template for testing ngdetails view is remaining in old directory,
so this patch moves it to more proper directory.

Change-Id: I321779ae115c462cf095cc7697fe8a3959f3d288
2018-02-13 12:23:32 +09:00
wei.ying
0cb96af3a2 Admin State is always UP whatever whether router Admin State is checked or not
On the project creation router page, if we don't check "Enable Admin
State" option, when the router is created, "Admin State" is displayed
as UP. This inconsistency is because the judgment condition of [1]
doesn't hold which causes the "admin_state_up" parameter not to be
passed by the call creation router interface. In this case, the
back-end defaults to "admin_state_up" to be UP.

Since the router "Enable Admin State" option has an initial value of
True, there is no need to check for [1].

[1] https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/routers/forms.py#L121

Change-Id: I6b95ffa680eab5c29d2bca6c91fc7f028f7f519a
Closes-Bug:#1748777
2018-02-13 10:53:24 +08:00
OpenStack Proposal Bot
18d3d5db88 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I54c414e07b4f95278354aeb8a2eda90a2062634f
2018-02-12 06:39:36 +00:00
OpenStack Proposal Bot
0039183879 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ie4e1ebbf6c61cb058473ceb9fae5ac7061846a73
2018-02-10 06:31:09 +00:00
Akihiro Motoki
b068d91c60 Cache neutron extension list across requests
Also improves the warning message of UnhashableWarning
and test_neutron UnhashableWarning.

Closes-Bug: #1747204
Change-Id: I876e3219dac570e8f7b10c5c126df74ca73f5197
2018-02-10 15:12:09 +09:00
Zuul
33068ecca4 Merge "Fix collectstatic in case of theme customization" 2018-02-09 14:52:38 +00:00
Zuul
709fa1377e Merge "Filtering networks or routers by non-existing tenants return an empty list" 2018-02-09 14:50:15 +00:00
Zuul
f1402f9226 Merge "Support specified security groups when creating a port" 2018-02-09 14:47:34 +00:00
Zuul
d14439e0d8 Merge "Refactor the create port form to workflow" 2018-02-09 14:11:34 +00:00
Zuul
06739bd073 Merge "Enable more hacking-extensions" 2018-02-09 14:00:46 +00:00
Zuul
45d96fbef7 Merge "Imported Translations from Zanata" 2018-02-09 13:57:09 +00:00
10ebb645e3 Update reno for stable/queens
Change-Id: I75b9d251f4dc4230e60f4f2f5a0768f4d9c331ab
2018-02-09 07:20:12 +00:00
OpenStack Proposal Bot
30aba39c77 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Iabbc49e7761de2252a09c09c8ecb9269802ed95c
2018-02-09 06:38:12 +00:00
baiwenteng
5bf92e84a6 Fix typos in horizon
Change-Id: I1deac0ff732c0e5fe94698be29d94f0be20023e4
2018-02-09 12:55:50 +08:00
Zuul
c2b5c642ee Merge "Network topology "Graph" tab always shows nothing" 2018-02-08 13:56:21 +00:00
Ameed Ashour
4a3f0dcef0 Network topology "Graph" tab always shows nothing
Network topology "Graph" tab always says "There are no networks,
routers, or connected instances to display."
This happens after a fix for bug 1661350
(commit f35eaa2d13fc5aff31b9a83dc729cc20b91fc611) was merged.

The problem with that in checking the length of object.
So always will be equal undefined,
also check the object before getting filled.

Closes-Bug: #1747196
Change-Id: I72dd8d2b472677411635f58309c780a8d602ffe3
2018-02-08 03:53:20 -05:00
wangliangyu
00ecfcdb0b Filtering networks or routers by non-existing tenants return an empty list
When networks or routers are filtered by a tenant which does not exist,
there will be return a list no filtered. But we expect an empty list.

Change-Id: I8faca01ab67240a76818d6752f796a6de3c51b5f
Closes-Bug: #1744846
2018-02-08 15:27:02 +08:00
OpenStack Proposal Bot
4e4429b330 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I20b7fdb3df2d998ba9b3f14ff9b22deb602c3870
2018-02-08 06:36:03 +00:00
Radomir Dopieralski
dc0bce63a0 Fix collectstatic in case of theme customization
When doing theme customization with templates
collectstatic failes with a traceback

Change-Id: I0fdb80ddde1f73b657d445c75b55636d6f2e8d88
Closes-bug: #1744239
2018-02-07 19:32:42 +01:00
Zuul
d09170e02a Merge "Remove empty test file" 2018-02-07 18:12:36 +00:00