15475 Commits

Author SHA1 Message Date
Marc Methot
207ebdf27c Removing USE_SSL parameter from the configuration documentation
Change-Id: I15be80d6c02ea2cc1b8434cf930879b782360dd6
Closes-Bug: #1860614
2020-01-22 17:44:56 -05:00
Zuul
5129d958fd Merge "Remove Pint from requirements.txt" 2020-01-22 17:42:04 +00:00
Zuul
19de1f16ba Merge "Add pagination to Security Groups table in Launch Instance wizard" 2020-01-22 17:28:50 +00:00
Zuul
64fc992f2a Merge "Remove flavor disk size ckeck when create instance from volume" 2020-01-20 21:58:03 +00:00
Zuul
8e83422edd Merge "Remove six.reraise usage" 2020-01-20 02:48:23 +00:00
Zuul
c340145ded Merge "Allow to evacuate without specifying a target host" 2020-01-18 06:21:33 +00:00
Zuul
7c54e7db93 Merge "Remove six usage from openstack_dashboard package" 2020-01-17 10:27:49 +00:00
Rikimaru Honjo
f9e0f8a976 Allow to evacuate without specifying a target host
When the evacuate is run without specifying a target host, horizon
sets an empty string for target host. But the evacuate api doesn't
allow an empty string. As a result, nova returns "HTTP 400 Bad
request".

So this patch sets None as the target host when it isn't specified.

Change-Id: Ia865a6c02e206fa49efc3095e8d3488f5638d0e3
Closes-Bug: 1793694
2020-01-17 08:47:00 +00:00
Zuul
0c33a4fd11 Merge "Remove six usage from horizon package" 2020-01-17 02:57:38 +00:00
Akihiro Motoki
4fc1b9c424 Remove six.reraise usage
six.reraise can be converted into "raise new_exc from original_exc"
introduced in python3.

In case of horizon.exceptions.handle(), six.reraise was used to
raise the original exception again, so we can convert it into "raise".

six is removed from requirements.txt.
Note that we need to keep six in lower-constraints.txt
as dependent libraries still use six.

Change-Id: I0672a516083727c245f1d4fa5b10eed9cd81a726
2020-01-17 07:31:26 +09:00
Tatiana Ovchinnikova
a62751ca4f Add pagination to Security Groups table in Launch Instance wizard
The most elegant way to add pagination is to refactor the table using
<hz-dynamic-table> which already contains pagination instead of wiring
it to the existing table framework.
This solution adds the pagination and makes the code more readable.

Partial-Bug: #1859423

Change-Id: Iaff9e1f3c834a2bdb5823249de632ce472811a7d
2020-01-16 08:58:22 +00:00
OpenStack Proposal Bot
01440a4cb8 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I4385ba30561121505d7eca551e57e97a1085ea3c
2020-01-16 07:45:51 +00:00
Ivan Kolodyazhny
d870b40583 Remove six usage from openstack_dashboard 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: I26a59176be9e9f213128e4945a58b9459334b626
2020-01-15 12:47:48 +02: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
Akihiro Motoki
1570e5c3ed Remove Pint from requirements.txt
Pint is no longer used after horizon/utils/units.py was cleanup
by commit 26eebd4abbbabc1475bae61c51d1cfcf14dba770.

Change-Id: I17add5dc20846be052577db1ed8ca8bf98819846
2020-01-15 13:12:50 +09:00
Zuul
180668b726 Merge "Skip horizon-integration-tests for translation jobs" 2020-01-14 15:30:24 +00:00
Zuul
91ed3a0695 Merge "Fix dupliated words issue like " by by which"" 2020-01-14 09:44:30 +00:00
Zuul
c93db9d1a2 Merge "Generate plugin registry based on releases repo" 2020-01-14 09:39:33 +00:00
Zuul
aa3c7e1919 Merge "Remove six usage from openstack_auth package" 2020-01-10 02:55:48 +00:00
Ivan Kolodyazhny
5dd2bf5fb6 Remove six usage from openstack_auth package
We don't support Python 2 anymore so we don't need this
compatibility library.

Change-Id: I0ecd706af1b4432fe439472189444141853c9d0b
2020-01-09 16:54:54 +02:00
Akihiro Motoki
a17aa5568a Skip horizon-integration-tests for translation jobs
There is no need to run horizon-integration-tests as we use
the default language, English, in the integration tests and
proposed translation files are validated in the pep8 job.
It reduced the CI resources and waiting time.

Change-Id: I70851622a91280eab99005bf285d8190bfbf8933
2020-01-09 16:26:57 +09:00
OpenStack Proposal Bot
0a4785c489 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Icf653870aaa78af6b85e829bea0773f343405e76
2020-01-09 07:04:20 +00:00
Akihiro Motoki
79fc46a064 Cap Django again
The detail context on why we need to cap Django version again
is explained in https://review.opendev.org/#/c/701213/.

Change-Id: I0685993b6c43e64a66a19fb0dd8857ab69998127
2020-01-08 15:03:41 +09:00
Zuul
e0eb3c3912 Merge "Use enmerkar instead of django-babel" 2020-01-08 03:16:33 +00:00
Zuul
f4dbae90f8 Merge "Change Rebuild Instance Form select widget to normal style" 2020-01-07 02:52:34 +00:00
Zuul
954ad0fdfc Merge "Fix pep8 failures with hacking 2.0.0" 2020-01-06 16:14:49 +00:00
Zuul
1b0c07b947 Merge "Fixes a series of bugs related to Floating IPs." 2020-01-06 16:14:47 +00:00
Zuul
767bd569a0 Merge "Deprecate OPENSTACK_NOVA_EXTENSIONS_BLACKLIST" 2020-01-06 15:22:12 +00:00
Zuul
6c2bb934b3 Merge "Add a separate tox env for extracting and compiling translations" 2020-01-06 15:22:04 +00:00
白子玉
6d149b0e81 Change Rebuild Instance Form select widget to normal style
Replace select widget from ThemableSelectWidget to SelectWidget.
When there are too many images, ThemableSelectWidget will be too long and
makes choosing an image hard. But normal style select can provide a scroll
bar there.

Change-Id: I843c5011d3caf9946210b7ee236e76318a646173
Closes-Bug: #1794000
2020-01-06 13:29:43 +00:00
Zuul
b7da38d005 Merge "Fix use of ngettext in registry getName" 2020-01-06 12:34:13 +00:00
Radomir Dopieralski
a617bb67e2 Add a separate tox env for extracting and compiling translations
Change-Id: I44d4c93142365f1a069be59a4c4d5650952c58c6
2020-01-06 09:32:08 +01:00
白子玉
5d7e3eac0f Remove flavor disk size ckeck when create instance from volume
No longer check flavor disk size larger or equal than image's mix disk when
you create instance from volume, because it's already checked when creating
volume.

Change-Id: I8e4fc074aafe7e880ceb7ab06d8ef565709beeeb
Closes-Bug: #1563529
2020-01-06 14:59:19 +08:00
zhufl
e6ce38822b Fix dupliated words issue like " by by which"
This is to fix the duplicated words issue like
"The name of key by by which".

Change-Id: I7b0897eb40c6b587521d727d4fd2f60e4058040b
2020-01-06 11:30:05 +08:00
Akihiro Motoki
5a1ab92d0a Use enmerkar instead of django-babel
Depends-On: https://review.opendev.org/#/c/700727/
Change-Id: If8af96389a2a8481b80b3297e4c231dd290eafbe
2019-12-29 08:45:50 +09:00
Akihiro Motoki
a2a3e8b6c3 Drop Django 1.11 support
Django 1.11 support was dropped. Django 1.11 ends its extended support
in April 2020 which is before Ussuri release. Considering this,
horizon dropped Django 1.11 support.

Unnecessary Django version checks in the code are also dropped.

Change-Id: I2c58934f2b026745fbc97a58212b91d149db3657
2019-12-29 06:20:37 +09:00
Akihiro Motoki
c5dd1536a0 Prepare non-primary Django tests in zuul jobs
We already have a template 'horizon-non-primary-django-jobs'
to test horizon and plugins with non-primary django versions,
but we still need to update tox.ini in all horizon plugins
whenever we change Django versions used.

This commit prepares per-Django environment in the zuul job.

Per-Django tox environments like py3-{dj111,dj20,dj22} are
no longer needed. It would be a big merit that we will no longer
need to update tox.ini in all horizon plugins.

The downside is that we do not provide a convenient way to
test it locally, but I think it can be covered in the document.

Change-Id: I726b19130ee9e7d06eb33231071c2673cfd3a49f
2019-12-29 05:20:33 +09:00
Akihiro Motoki
3e54ba096f Complete "Drop Python 2.7 Support" goal
The goal definition in the TC repo [1] defines the completion criteria.
We have already completed 1, 2, 3 and partially 4 in [1].
This commit completes 4 (requirements.txt etc) and 5 (release note).

Python dependency in the installation guide is updated.
Django support plan in Ussuri is updated as well.
References to python 2.7 in the document are updated as well.

[1] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I0383920e32e053e1611519be774fab8dec124ccc
2019-12-29 01:42:54 +09:00
Zuul
ee36da77f5 Merge "Fix "prev" link pagination for instances with identical timestamps" 2019-12-27 17:44:58 +00:00
Zuul
142425d6b0 Merge "Drop babel extractor definitions from babel config" 2019-12-26 16:29:17 +00:00
KeithMnemonic
9637d73374 Fix "prev" link pagination for instances with identical timestamps
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
2019-12-25 20:12:03 +09:00
Robin Cernin
31f7fc6bb2 Deprecate exceptions.check_message
exceptions.handle() is used in most cases consistently.
check_message() is a legacy which was introduced when exceptions
were not well classified. exceptions.handle() should cover all
common error scenarios and there is no role played by check_messages().
Let's clean up its usage and deprecate it for the future removal.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I545b6c666d13d39cf5287ccc7c972dc746faf2fb
Closes-Bug: #1339885
2019-12-23 20:12:30 +09:00
Akihiro Motoki
cd80207d09 Generate plugin registry based on releases repo
The plugin registry is maintained manually, so it tends to be out-of-date.
The deliverble files in openstack/releases repository provide information
on repositories and bug trackers. It sounds reasonable to me to generate
the plugin registry based on infomration in the openstack/releases repo.

The script added picks up deliverables marked as horizon-plugin.
mistral-dashboard and networking-bgpvpn dashboard are released in
different ways, so they are handled specially in the script.

How to run:
  ./tools/list-horizon-plugins.py \
      --csv-file plugin-registry.csv \
      ../releases ussuri

Note that this commit does not autogenerate the plugin registry.
The script still needs to be run manually.
Further automation would be the next step.

Note that bug trackers of senlin-dashboard and trove-dashboard in
the releases repo looks out-of-date. I will submit a fix for them soon.

The downside of the automation is that we cannot list non-official
horizon plugins but I believe it is a good compromise.
The only non-offical plugin listed now is the group-based-policy UI,
but it is questionable whether it is still maintained well.

Change-Id: Id56be13fb93c6dc123e7cfb1c906357cdf59732b
2019-12-23 18:43:24 +09:00
Akihiro Motoki
155bf22788 Drop babel extractor definitions from babel config
Babel allows us to register babel extractors via entry points.
This means we no longer need to have extractor definitions in
each babel config files. All horizon plugins have copies of
babel-django.cfg and babel-djangojs.cfg now. By dropping the
extractor defintiions from babel config files, we can make
a potential migration from django-babel to enmerkar (and
we can also avoid more modifications of babel config files
even if more transition is required).

django-babel and enmerkar both define 'django' extractor
in the entry point, so we can drop it from babel-django.cfg.
This commit also registers 'angular' extractor, so we can drop
the extractor for AngularJS from babel-djangojs.cfg.

Change-Id: Icf93d4551bd3db1baa84c110f06dcc1c36e18b7e
2019-12-23 17:25:38 +09:00
Radomir Dopieralski
ef4055e288 Fix use of ngettext in registry getName
The setNames and getNames functions in the resource registry were
calling ngettext() on already translated strings that were marked for
translation with gettext() and not ngetttext(). That lead to some
page titles in some locales being displayed as single characters.

Closes-Bug: #1762089
Change-Id: I0ef365e0c0de6ae27a2e80bcb5257132f8c6ba29
2019-12-20 09:44:48 +00:00
Zuul
3a829be260 Merge "Add support to get disk_formats from glance" 2019-12-19 15:19:56 +00:00
Dmitriy Rabotyagov
04a3535e18 Add support to get disk_formats from glance
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
2019-12-17 14:56:44 +02:00
Akihiro Motoki
523fbce3de Deprecate OPENSTACK_NOVA_EXTENSIONS_BLACKLIST
All of the nova API extensions have been mainlined several releases ago
and there is no potential performance issue in the nova API.
This option is used only to toggle features in horizon and
there seems no performance issues controlled by the option in horizon.
Considering this situation, this option is deprecated now.

Change-Id: If8e58e8324bad919ea45d0ccb10e21371d97f470
2019-12-17 15:26:44 +09:00
Akihiro Motoki
a7b25f0cc4 Fix pep8 failures with hacking 2.0.0
It seems hacking 2.0.0 was shipped with incompatible changes
(which is not surprising as this is a new major version).
Let's fix these errors and use a newer hacking.

Change-Id: I8da9dca5d8d74f6dfc2340dabc8d50e6253358e2
2019-12-17 04:55:05 +00:00
Marek
161b4ae5d4 Fixes a series of bugs related to Floating IPs.
- Fixes KeyErrors when accessing 'floatingip' values in usages, which
  broken Floating IP allocation.
- The quota display in the bottom right of the Allocation dialog are
  only displayed if 'enabled_quotas' is True
- Adds security group rule tallying for the usages overview page, which
  fixes a KeyError crash for installations where Horizon 'enable_quotas'
  is set to true, but the 'quota_details' extension is not installed on
  in Neutron
- Adds a policy check to show and hide The plus/add button in
  Instances->Associate Floating IP to match the Allocate IP To Project
  button in Floating IPs
- Fixed the page title not being set for the non-modal version of the
  modal allocation dialog/form
- Added an 'allowed' functionality for network usage overview charts to
  allow for them to be dynamically disabled
- Added tests and mocks for the above
- Added tests for non-legacy quota tallying for networks
- Added test for disabled network quotas in overview

Change-Id: I47f73ff94664d315a2400feb8ce8a25f4e6beced
closes-bug: #1838522
2019-12-17 13:30:25 +09:00