Commit Graph

331 Commits

Author SHA1 Message Date
Takashi Kajinami bced896d37 Remove workaround for old django-pyscss
This reverts the change[1] made earlier to workaround the issue caused
by usage of vendored version of six library in the django-pyscss
library.

The django-pyscss library no longer imports the vendored version of
six, since 2.0.3[2].

[1] 39f28ad5ed
[2] 1499332e1d

Change-Id: I22802b75d6a8d8f35930709e89d64dd65982cef0
2024-02-02 03:23:43 +09:00
manchandavishal 605a515ebc Drop Django 3.2 support
Django 3.2 support was dropped. Django 3.2 ends its extended support
in April 2024[1]. Considering this, horizon dropped Django 3.2 support
and used Django 4.2 as the default version of Django. It also updates
some references to Django 4.2 from Django 3.2 in the documentation.

[1] https://www.djangoproject.com/download/

Change-Id: I9fff310c5433cf96cdf0a2cd81d11a96c2a4a55b
2024-01-30 17:01:51 +05:30
manchandavishal 843f01c1b7 Allow both Django 3.2 and 4.2 for smooth transition
This patch update django upper bound in the ``requirements.txt``
file. Once this patch got merged only then I can update upper
bound in ``upper-constraints.txt`` file in openstack/requirements
repo [1].

[1] https://review.opendev.org/c/openstack/requirements/+/904202

Change-Id: I186fd4e1cdcb7b16f6e4ec7de08bb1277aca34e3
2024-01-10 19:10:05 +05:30
manchandavishal 20bdaa3867 Bump minor version of XStatic-jQuery
This patch update minor version of XStatic-jQuery
to 3.5.1.1 in the ``requirements.txt`` file.

Closes-bug: #1955556
Change-Id: I8fdcdddac6869af59a330d1181aed83c2c5770b3
2023-08-01 21:06:07 +05:30
Radomir Dopieralski 480aba9422 Bump XStatic-JQuery to make it work with jquery-migrate
The jquery-migrate 3 requires newer jquery than we have.
Also added all the other fixes for integration tests to see
if that resolves our problems.

This needs to be merge first so that patch which update the
upper bump of XStatic-JQuery in openstack/requiremensts [1]
can be merged.

Note: This patch also make horizon-integration job to non-voting
so that we can merge this patch and once openstack/requirements
[1] patch is merged, we will make horizon-integartion job voting
again

[1] https://review.opendev.org/c/openstack/requirements/+/887933

Co-Author-By: manchandavishal <manchandavishal143@gmail.com>

Change-Id: I9b8a5e8abe734e7fd99aa0066ede0377e34fbf44
2023-07-10 18:15:18 +05:30
manchandavishal a13e01bc46 Bump XStatic package version to latest i.e. 1.0.3
horizon does not support setuptools 67.3.1 and it broke Kolla
Horizon container builds. We recently cut a new release of Xstatic
[1] which may fix this setuptools issue. So this patch bump the
Xstatic version to 1.0.3 to fix setuptools issue. XStatic package
version is also bumped in openstack/requirements[2].

[1] 5cd7a23470
[2] https://review.opendev.org/c/openstack/requirements/+/882916
Related-Bug: #2007574

Change-Id: I0c463d205d4534f7b0cfcab00bec4b98cd429ae1
2023-05-16 09:36:56 +00:00
Pedro Martins 1db1764749 Add NAT rules to the floating IP workflow
The floating IP workflow is now able to manage NAT
rules (portforwarding) if the floating IP is not
associated with any NICs (ports).

This patch is the one of a series of patches
to implement floating ip port forwarding with
port ranges.

The specification is defined in:
https://github.com/openstack/neutron-specs/blob/master/specs/wallaby/port-forwarding-port-ranges.rst

Implements: blueprint https://blueprints.launchpad.net/neutron/+spec/floatingips-portforwarding-ranges
Change-Id: Id715da6591124de45f41cc367bf39a6bfe190c9a
2023-03-01 10:38:16 -03:00
manchandavishal a31da24844 Update Xstatic-angular version in ``requirements.txt``
As horizon already migrated to Xstatic-angular version 1.8.2.2
from 1.5.8.0 by patch f044c4b0a3. This patch updates xstatic-angular
version in ``requirements.txt``.

Change-Id: I3a7178fb6b558469f7cc746a56c6bab1dd4dc1e6
2022-08-18 18:41:13 +00:00
manchandavishal 68e12b8100 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: Ia315117f43a299fc68f3a15db59ddae37f8d30cf
2022-06-08 12:38:07 +00:00
Zuul 8d45a9f941 Merge "Update pyScss to 1.4.0" 2022-06-04 09:21:08 +00:00
manchandavishal 05473b765e Sync default policy rules
This patch updates default policy-in-code rules in horizon based on
nova/neutron/keystone/glance/cinder RC deliverables.

It also bumps a few packages versions in lower-constraints.txt and
requirements.txt to fix the failed lower-constraints job after
updating policy rules.

Change-Id: I168bb171076e3442b29670461a29d12c9988df52
2022-03-21 21:08:21 +05:30
manchandavishal e6d46b218c Update pyScss to 1.4.0
pyscss v1.3.7 doesn't work with python 3.10. So this patch bump
pyscss version to latest i.e. v1.4.0 so it can support python 3.10
and consume other fixes included in pyscss v1.4.0.

Closes-Bug: #1960204
Depends-On: https://review.opendev.org/c/openstack/requirements/+/830615
Change-Id: I764aa5491df8c8d39f4f168241f91d19ce7fed26
2022-02-23 19:33:25 +05:30
manchandavishal 8918bf751d Drop Django 2.2 support
Django 2.2 support was dropped. Django 2.2 ends its extended support
in April 2022[1]. Considering this, horizon dropped Django 2.2 support
and use Django 3.2 as default version of Django.

It also updates the python version from py38 to py39 for
"horizon-non-primary-django-jobs" and
"horizon-tox-python3-django" project template because py36
and py39 are now runtime for the Yoga cycle[2]. So I have updated it to
py39.

[1] https://www.djangoproject.com/download/
[2] https://review.opendev.org/c/openstack/governance/+/820195

Change-Id: I8886f12f7e51b721ac5123070086d5dcfefe4e72
2022-01-05 19:26:56 +00:00
Akihiro Motoki 9d1bb3626b Allow both Django 2.2 and 3.2 for smooth transition
I believe we need the following steps and it is what I did in past
when we bump the Django minimum version.

1. (already done) update global-requirements.txt to allow horizon to
   update requirements.txt to include Django 3.2.
2. specify the required Django version which includes both 2.2 and 3.2
   (at this point upper-constraints uses 2.2)
3. update upper-constraints.txt in the requirements repo to use Django 3.2
4. bump the min version of Django in horizon

(optionally) update non-primary-django tests to include non-primary versions of
Django. It seems you drops 2.2 support together when we support 3.2, so perhaps
this step is not the case though.

https://review.opendev.org/c/openstack/horizon/+/811412 directly updated
the min version to Django 3.2 which is incompatible with the global
upper-constraints.txt.
To avoid this, https://review.opendev.org/c/openstack/horizon/+/815206 made
almost all tests non-voting. I am not a fan of such approach and believe
there is a way to make the transition of Django version more smoothly.

---

This commit reverts the zuul configuration changes in
https://review.opendev.org/c/openstack/horizon/+/815206 and
https://review.opendev.org/c/openstack/horizon/+/811412.

horizon-tox-python3-django32 is voting now as we are making it
the default version.

Change-Id: I60bb672ef1b197e657a8b3bd86d07464bcb1759f
2021-10-26 09:57:06 +09:00
manchandavishal 7bfb56010d Bump Django version to Current LTS Version
This patch update Django version to the current LTS version i.e. 3.2.
Django 2.2 is going to end its extended support by April 2022[1].
horizon and all its plugins already support Django3.2 version, So
let's make this the default version. It also bump few other packages
version in lower-constraints.txt to make it work with Django 3.2.

Note: It also change 'openstack-tox-py38' job to non-voting
which I will revert in follow-up patch once this patch is merged.

[1] https://www.djangoproject.com/download/

Change-Id: I49e323b76ad2c2e680c3f133d0f219d850f7908c
2021-10-25 17:39:21 +05:30
Akihiro Motoki 39f28ad5ed Preparation for Django 3.0 and 3.1 support (2)
django-pyscss is not compatible with Django 3.0.
django_pyscss_fix is a temporary workaround for django.utils.six
used in django-pyscss. It also add six in requirements.txt
as we use six module for this workaround.
This is just to run horizon for testing with Django 3.0+.

six is re-added to requirements.txt as it is used in the workaround.
Note that other codes in the horizon repo should not depend on six.

Change-Id: If79289b7518dd8eaf292a90d6fb790beb154cb7c
2021-09-16 16:16:12 +09:00
Takashi Kajinami 788988f24f Clean up the workaround of cinderclient v2->v3 transition
cinderclient 8.0.0 has been released. The workaround in horizon UT
can be dropped now with cinderclient>=8.0.0.

requirements.txt and lower-constrints.txt are updated
according to python-cinderclient 8.0.0 dependencies.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Ia59b266516584be71ddec935feb671399e0fd7ec
2021-07-27 16:09:16 +09:00
David Hill f60220329a Get the timezone offset for the current day instead of January 1st.
This bug only appears to be a cosmetic one where the TZ offset
would be calculated on current_year/01/01 so would remain in
daylight saving offset when displaying the timezones list.

(Note by amotoki)
The minimum version of Babel is bumped to 2.6.0
as Babel 2.3.4 returns "New Zealand Time" instead of "New Zealand
(Auckland) Time" returned from the latest Babel (2.9.0).
It is not a good idea to handle such difference in Babel in our UT
and there is no reason to stick to Bump 2.3.4.
2.6.0 was chosen as it is available in Ubuntu Focal and there is
no more reason than this.

Change-Id: I0600086cc51cf5abcf1631565e75146114189667
Closes-bug: #1822849
2021-03-18 08:29:07 +09:00
Akihiro Motoki b7bb76eb20 Support policy-in-code and deprecated policy
This commit allows horizon to handle deprecated policy rules.
The approach is explained in the document updated by this change.

oslo.policy requirement is updated. oslo.policy 3.2.0 is chosen
just because it is the first release in Victoria cycle.
requirements.txt and lower-constraints.txt are updated accordingly
including oslo.policy dependencies.

Change-Id: If5059d03f6bd7e94796065aa1b51c0c23ac85f5e
2021-01-27 14:02:27 +00:00
Akihiro Motoki 4b48b5816c Bump min requirement of xstatic-jquery to 1.12.x
As discussed in the last horizon team meeting, we plan to upgrade
jquery to jquery 3 series. Jquery 3 upgrade assumes we already use
jquery 1.12.x ro 2.2.x. We already use jquery 1.12.4.1 in the master
for long but our requirements file says >=1.8.2. This commit bumps
the xstatic-jquery minimum requirement to 1.12.4.1 to ensure
we use 1.12.x before upgrading jQuery to 3.

xstatic-jquery-ui min version is also bumped to 1.12.0.1.
The current requirement is >=1.10.4 but we use 1.12.x series for long
and use 1.12.1.1 since 2018, so I believe it is safe to bump it.

Change-Id: I2a1ff5a4df5e278f89fcd73c26f1d8527b9c4d7f
2021-01-20 18:06:15 +09:00
Akihiro Motoki 65e3917105 Bump xstatic-mdi lower-bound
xstatic-mdi 1.4.57.0 and 1.6.50.2 have different ways (variables)
to define classes for material design icons.
As a result we need different ways for a workaround like
commit ddc52a7405.
It looks good to support 1.6.50.2 only to simplify the maintenance.
1.6.50.2 was released Feb 2019 and is used in horizon since Stein
release (in upper-constraints), so this change would be not risky.

Change-Id: Idd2e035fa85dfe8c20397d63ed8ae4bd09c84078
2020-04-01 16:01:48 +09:00
Ivan Kolodyazhny 2c44702724 Update pyScss to 1.3.7
pyScss v1.3.7 doesn't require any bindep to be installed so it's prefer
to use it instead of adding bindep to all projects manually.

Depends-On: https://review.opendev.org/715240

Change-Id: I336a3449c1ed8be3984da6366e9b45f8e4d3f5c0
2020-03-26 17:15:13 +02:00
Ivan Kolodyazhny ddc52a7405 Fix Horizon to work with the latest pyScss
pyScss v1.3.5 implements 'function-exists' function now. It breaks
MaterialDesign-Webfont [1] which is provided by xstatic-mdi package.

This patch re-implements FontAwesome-based styles for Material theme to
not use MaterialDesign-Webfont classes.

Another advantage of this improvement is we can use the latest pyScss
(once it'll be released) and update xstatic-mdi too.

[1] https://github.com/Templarian/MaterialDesign-Webfont/issues/19

Closes-Bug: #1771559
Depends-On: https://review.opendev.org/714450
Change-Id: Ia9e1e807591d4428f585177f521d4cb9d463b917
2020-03-24 10:39:05 +00:00
Ivan Kolodyazhny 11d4954cc3 Use pyScss2 and django-pyscss2
pyScss and django-pyscss packages are not maintained for a long time. We
can't use the pyScss with teh setuptools>=46.0.0, so I forked these
project and switch horizon to use them.

Change-Id: I38a1c2c3455a10b4852d25f6c39b3c21f5c450fc
Depends-On: https://review.opendev.org/712976
2020-03-17 15:10:59 +02:00
Akihiro Motoki bb5a38f773 Note on enmerkar in requirements.txt
I was asked if enmerkar is a run-time requirements or not in IRC.
It is not a run-time requirements of horizon. I considered moving
it to test-requirements.txt but horizon plugins depends on horizon
requirements to ensure enmerkar is installed when extracting
translation strings, so we keep it in requirements.txt.
It is worth having a note on this in requirements.txt.

Change-Id: I3e97bb413f2030607da93d892808719fcf0d4a5f
2020-02-15 02:31:18 +09:00
Zuul 5129d958fd Merge "Remove Pint from requirements.txt" 2020-01-22 17:42:04 +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
Akihiro Motoki 1570e5c3ed Remove Pint from requirements.txt
Pint is no longer used after horizon/utils/units.py was cleanup
by commit 26eebd4abb.

Change-Id: I17add5dc20846be052577db1ed8ca8bf98819846
2020-01-15 13:12:50 +09: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
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 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
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
Sean McGinnis 80734efa8d Uncap django
Depends-on: https://review.opendev.org/#/c/697612/

Change-Id: I99732a523905d8d2f0348427a1a3689fef134906
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-12-06 06:54:11 +00:00
Zuul 5100262298 Merge "Pin jQuery to < 2; fixing unusable dashboard JS ('indexOf' of undefined)" 2019-11-28 13:31:04 +00:00
Walter Doekes 8a984300eb Pin jQuery to < 2; fixing unusable dashboard JS ('indexOf' of undefined)
Otherwise we get lots of:

    Uncaught TypeError: Cannot read property 'indexOf' of undefined

And the dashboard is completely unusable.

(Actually, <3 works, but the project-requirements-change.py Zuul check
doesn't pass when this isn't <2.)

Closes-Bug: #1794028
Change-Id: Iaf3d33d3200f2fed934bde4d7373674de722a9e1
2019-11-28 07:04:08 +00:00
Zuul f592481cc0 Merge "Add support for keystone access rules" 2019-11-25 09:25:56 +00:00
Colleen Murphy 4d1786c687 Add support for keystone access rules
Keystone implemented the ability to apply fine-grained access control
restrictions to application credentials[1]. This patch adds new fields
to the application credential creation form and detail view so that
horizon users can use this feature.

[1] http://specs.openstack.org/openstack/keystone-specs/specs/keystone/train/capabilities-app-creds.html

Depends-on: https://review.opendev.org/677585

Change-Id: I2d71392eb8569ffb8cb15af29eea76e120a158cc
2019-10-30 14:47:05 +09:00
Ivan Kolodyazhny 285c51f7e1 Add custom SSL CA Cert support for api.cinder.get_microversion
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
2019-10-25 16:12:02 +09:00
Akihiro Motoki e3c600cbbf Add relnote on cinderclient minver bump to 4.0.1
A fix for bug 1824017 bumped the minimum version requirement of
python-cinderclient to 4.0.0. The fix was backported to stable/stein,
so the minimum version bump should be covered by a release note.

python-cinderclient requirement is bumped to >=4.0.1
as 4.0.0 is blocked by global-requirements.txt [1].

It was suggested by the release team in the review of
horizon stein update release [2].

[1] 1baf07a773/global-requirements.txt (L256)
[2] https://review.opendev.org/#/c/655447/

Change-Id: I2b43e159da7e58980b2810a104ae2418f237d1c7
Related-Bug: #1824017
2019-05-11 10:46:50 +09:00
Corey Bryant f9b520f377 Set min version of python-cinderclient to 4.0.0
As of Stein, a minimum of python-cinderclient 4.0.0 is required to
create a volume. Cinder schema no longer accepts additional
properties on volume create that are not part of the API spec [1].

[1] https://review.openstack.org/#/c/573093/

Change-Id: I0fc4d5db39080985b471fe2465b7078e37417e4d
Closes-Bug: #1824017
2019-04-09 17:09:48 -04:00
Radomir Dopieralski d7d6c0577c Add a upgrade_check management command
This command checks the configuration for invalid and deprecated
settings, as described in
https://governance.openstack.org/tc/goals/stein/upgrade-checkers.html

There is also a script in tools/find_settings.py that scans all python
files for the potential new settings, which is supposed to make it
easier to update the lists that the checks use.

Change-Id: Ie85cf4be3da1ab446c10883a4580e20ea154b67c
Story: 2003657
Task: 26132
2019-03-01 15:43:13 +01:00
Zuul fcfd9b0fd4 Merge "Add django-debreach to horizon" 2018-08-30 06:29:18 +00:00
Akihiro Motoki de3e484798 Move requests to requirements.txt
requests is used in non-test code in horizon
(openstack_dashboard/exceptions.py).
It should be declared in requirements.txt.

Closes-Bug: #1789040
Change-Id: I325b5344d45f797d256bb213093082927068a88e
2018-08-26 03:49:36 +09:00
Nishant Kumar ccdf8c55e6 Add django-debreach to horizon
BREACH is a category of vulnerabilities and not a specific
instance affecting a specific piece of software. To be vulnerable,
a web application must:

  * Be served from a server that uses HTTP-level compression
  * Reflect user-input in HTTP response bodies
  * Reflect a secret (such as a CSRF token) in HTTP response bodies

More details on breach attack - http://breachattack.com/

Since horizon falls under this category, we can include django-debreach
module within horizon as a requirement which provides mitigation against the breach attacks.

https://github.com/lpomfrey/django-debreach

CSRF token masking is a built-in feature within Django 1.10+,
therefore only content-length modification feature provided by django-debreach
can be enabled.

Depends-On: I32f11e089fc794444ef267b463c7fb2ad8cfa96a

Change-Id: I2b4999ca7b0e1762c5273c4fe96f5ee768f44339
Blueprint: mitigate-breach-attacks
2018-08-25 07:49:32 +05:30
Zuul a5a5e19b22 Merge "Delete profiler object when request completes" 2018-07-31 19:34:49 +00:00
Stuart Grace 2e2ef6a8d0 Delete profiler object when request completes
When a request that is being profiled completes and the response is
received, the middleware expires the profiling cookie. It also needs
to delete the profiling object that holds the base_id UUID so a new
base_id will be created for the next profile. Otherwise the same
base_id is used for subsequent queries and they become merged togther
in the database.

Change-Id: I379cebfa2ed5282c96df0e255a8ba04c65a8523c
Closes-Bug: #1777486
Depends-On: https://review.openstack.org/578362
2018-07-24 12:33:31 +01:00
Akihiro Motoki 49479a6861 Declare django lower bound
After 7e91070789187d9e6b5ac2b57ca755504e058e32 in openstack/requirements
repo, all entries in project requirements.txt must have lower bound
although we don't track lower bound in global-requirements.txt.
This commit re-adds Django lower bound.

Change-Id: I065e1bd904975f10bdcaacef7b0ad1336915492a
2018-06-19 11:55:29 +09:00
Ivan Kolodyazhny b3690124c4 Sync Django version with global requirements
Change-Id: I34e193725da4d860cee223e274301fc04f3b2954
2018-06-05 18:16:42 +03:00
Colleen Murphy 2d69444bad Add support for application credentials
This patch adds support for creating application credentials in
keystone[1]. Application credentials can be created by any user for
themselves. An application credential is created for the currently
selected project. A user may provide their own secret for the application
credential, or may allow keystone to generate a secret for them. After
the application credential is created, the secret is revealed once to
the user. At that point they may download a clouds.yaml or openrc file
that contains the application credential secret and will enable them to
use it to authenticate. The secret is not revealed again.

[1] https://docs.openstack.org/keystone/latest/user/application_credentials.html

bp application-credentials

Depends-On: https://review.openstack.org/557927
Depends-On: https://review.openstack.org/557932
Change-Id: Ida2e836cf81d2b96e0b66afed29a900c312223a4
2018-04-26 09:32:00 +02:00