Commit Graph

385 Commits

Author SHA1 Message Date
Corey Bryant ec1d07f7e6 Django 4.x: Address RemovedInDjango40Warning
force_text() is deprecated in favor of force_str()
and urlquote() is deprecated in favor of
urllib.parse.quote() in Django 4.0. For more please
refer [1].

[1] https: //docs.djangoproject.com/en/4.0/releases/4.0/

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

Change-Id: Ibc97402b735c3ddbdd7a2174e14353dad34cbc22
2022-12-01 16:04:53 +05:30
Zuul 0c57fd76c4 Merge "Address RemovedInDjango40Warning" 2022-08-11 14:01:31 +00:00
Takashi Kajinami a5007ee3bd Replace deprecated ugettext_lazy and ungettext_lazy
The ugettext_lazy method and the ungettext_lazy method are both
deprecated since Django 3.0[1].

These were already replaced in Horizon repo by [2].

[1] https://docs.djangoproject.com/en/3.0/releases/3.0/#id3
[2] cd7c1b5110fe1f64cd9dfbeb1072b37912d0efee

Change-Id: I90224714987c8583a8d407f661494479db4214af
2022-07-11 14:04:13 +09:00
manchandavishal e91ab23210 Address RemovedInDjango40Warning
In Django 3.1, django.conf.urls.url() is deprecated
in favor of django.urls.re_path(). For more info see [1]
These were already replaced in Horizon repo by [2].

[1] https://docs.djangoproject.com/en/4.0/releases/3.1/#id2
[2] https://review.opendev.org/c/openstack/horizon/+/827093

Change-Id: I3671c2bb499664997e18cd200d6293cb146895e3
2022-04-29 18:15:12 +05:30
Pierre Riteau 693624c9af Pass configured endpoint type to sahara client
Change-Id: I8136409020a7251ae1015129236b0e3d2d20a51b
Story: 2009735
Task: 44157
2021-12-09 12:40:38 +01:00
OpenStack Proposal Bot 084b61a636 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Iba394881cb0415923fdd31aa7b20efb9e69e52a0
2021-03-06 08:06:31 +00:00
Hervé Beraud d1fa66b049 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I1ebbcf68cb475cdd35f8c0ecd106cd0b22738530
2020-06-02 20:57:11 +02:00
OpenStack Proposal Bot b3f0a63068 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I2cd1ef3088becf303dcbbba86dfe349e85282273
2020-05-07 09:24:28 +00:00
Zuul 4037b8be44 Merge "Test fixes: unittest.mock, better l-c job, pytest dep" 2020-04-16 23:01:13 +00:00
Luigi Toscano 18921beb2e Test fixes: unittest.mock, better l-c job, pytest dep
Now only python 3 is supported, which means unittest.mock
can be used instead of the external mock module.
This change can be done thanks to the Horizon
change I2de669d8e89b8daeb7ee5405ffab35af6307c40b

Switch to openstack-lower-constraints-jobs-horizon
which pulls in the last horizon. The lower-constraint
version of horizon should be bumped when a new
version (post-18.2.0) is released.

Finally, add pytest to the set of test requirements
to prevent an missing import error (even through
the sahara scenario tests still need to be ported
to pytest).

Change-Id: I2c61e9d88b2d05c9f0b68066d7bb15b43cdf083f
2020-04-15 17:59:11 +02:00
OpenStack Proposal Bot ce605ed4cc Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I9f1c6c474ec02e8145430719524adce235584244
2020-04-04 07:46:33 +00:00
Andreas Jaeger 24e6863ba7 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, it's not needed
there for co-installing.

Change-Id: I3d250ba82cc14f163f4295381b9b9c232486ac9f
2020-03-31 17:38:17 +02:00
Akihiro Motoki 2525137219 Remove six usage
This repo does not support Python 2 anymore, so we don't need
six for compatibility between Python2 and 3, convert six usage to Python
3 code.

Change-Id: Ib1659e903aded26994cc5cd56881a21e102964fe
Needed-By: https://review.opendev.org/701743
2020-01-15 09:08:17 +09:00
OpenStack Proposal Bot fb3782e9e0 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I29e67b8899bceecf691f378c30a63163262fc416
2019-11-15 08:01:41 +00:00
manchandavishal 3584317a46 Use Horizon project template for django jobs
Horizon defined a project template 'horizon-non-primary-django-jobs'
for django jobs. This patch use that template to run django jobs
here and fix the failed test cases for django2.2 support by replacing
None with an empty string and add renderer argument.
For information please refer [1], [2], [3].

[1] https://review.opendev.org/#/c/681969/
[2] https://github.com/django/django/commit/6fe9c45b725
[3] https://docs.djangoproject.com/en/2.1/releases/2.1/#features-removed-in-2-1
Change-Id: I9a62bb0a56b16cd6caa6cc9bf7db9b85c99ed580
2019-10-18 17:48:25 +00:00
Zuul 0973696140 Merge "Fix filter() usage for Py 3" 2019-08-30 14:17:23 +00:00
Andy Botting e1ae0f7143 Fix filter() usage for Py 3
The use of filter() within the codebase expected the output to be
an interator, but the filter function in Python 3 now returns a
lazy loading generator and resulted in stack traces.

This commit replaces the use of filter() (+ lambdas) with more
readable list comprehension to be compatible with Python 2 and 3.

Change-Id: I56af1dc1f6648ec334f901cb59893240b0125031
2019-08-13 15:35:14 +10:00
OpenStack Proposal Bot 30196d1369 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I9ebac99af348caf9bdc9cad4694002363d3bdd99
2019-07-27 06:41:13 +00:00
OpenStack Proposal Bot 98ca3dfea5 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ia5d2598535e2b1e9277c4511291c28bf73188b92
2019-07-18 09:55:06 +00:00
Jeremy Freudberg 1b2eab6d45 Bring now-deleted Horizon utils in-tree
Horizon commit 26eebd4abbbabc1475bae61c51d1cfcf14dba770 deleted some
needed functions.

Change-Id: Ia8787a65c110731f1dab9339f382b2680240cab3
Story: 2006179
Task: 35703
2019-07-10 09:56:23 -04:00
OpenStack Proposal Bot 21a61b509a Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ice0f4e55874ea61f63e8eb5b16be25b4b0f301fd
2019-05-06 08:59:27 +00:00
Zuul fd0bef08b5 Merge "Sync APIv2 changes into dashboard" 2019-03-19 13:32:43 +00:00
Jeremy Freudberg 29c0205bac Sync APIv2 changes into dashboard
- job_id->job_template_id in v2 jobs
- project_id->tenant_id
- Boot from volume enhancements

Story: 2003092
Task: 29741

Change-Id: Ie8e604d73c77a4e7672f87b95ecbe3c1de945293
2019-03-07 00:38:20 -05:00
Luigi Toscano bd66017874 Native Zuul v3 dashboard-integration test
- create a native Zuul v3 job, and move it to experimental
  until it works;
- install libav-utils on dpkg systems and enable the capture
  of the video;
- adapt to the changes in OverviewPage:
  * go_to_system_flavorspage -> go_to_admin_compute_flavorspage
  * go_to_compute_imagespage -> go_to_project_compute_imagespage

The job is failing right now, but apart the increased running time,
at least the tests are now executed.

Story: 2001686
Task: 8662

Change-Id: I311203779bd3e6c6660cfe1b84e89c7dc0825c98
2019-02-21 00:47:34 +01:00
Telles Nobrega f8649ba63a Increasing max number fields
Increasing the max number fields to allow CDH node group templates creation

Story: 2004866
Task: 29110

Change-Id: I007f6cb5528e658fa8a0211a833500385a4aa07a
2019-02-06 10:06:31 -03:00
OpenStack Proposal Bot 1a026b63b7 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Iba49ae303e378e7be25dc6bfa0bf91d30a0faf6f
2018-09-14 07:38:59 +00:00
Chuck Short d2fc81c0c5 Remove dead code
Now that mox has been removed we can remove the create_stubs
helper function as well.

Change-Id: I1c7c8e234013c28e3bbd20ba18e8bfab313a8533
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-08-26 21:22:47 -04:00
Akihiro Motoki 72a6a7a94b Switch test runner to django default runner
nose is not actively maintained now and Django default test runner
seems to have enough features.

* Horizon test setting no longer depends on nose and related stuffs.
  This commit cleans up nose related dependencies.
  The change was made in horizon Rocky-3,
  so horizon 14.0.0.0b3 is required at least.
* Integraion tests is marked via django.test.tag mechanism which is
  introduced in Django 1.10.
* Rename filename of test files to names starting with 'test_'
  so that the django test runner can find tests expectedly.
* run_tests.sh is no longer called from tox.ini, so it can be dropped.
  Note that the similar run_tests.sh in horizon was dropped long ago.

Change-Id: I1e5471078cc95031e8819f01100319a9ee2a3a73
2018-08-21 23:16:36 +09:00
OpenStack Proposal Bot 5309f5c709 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: If9fdeaccb5f1da8e7fbf104aaf669658199abe42
2018-08-09 06:40:42 +00:00
Jeremy Freudberg 4585a9d004 One missed hadoop_version->plugin_version
Change-Id: I7696d4bda30c72d3930fe01790903ab814246771
2018-07-31 11:30:19 -04:00
Telles Nobrega 0dc65e9588 Boot from volume
Adding the boot from volume check on node group templates creation.

Change-Id: I7bcfca72615758a5534901cdf6a0960ae9bd9a6a
Story: #2001820
Task: #12560
2018-07-26 09:33:20 -03:00
Zuul bc2d21d1d0 Merge "Support of S3 data sources in dashboard" 2018-07-26 08:28:41 +00:00
Jeremy Freudberg 95aca19615 APIv2 in dashboard
Everything except decomission of a specific node.

Change-Id: Iaa02b91d75b51b812c7e5eaf8612a1d75e17748e
2018-07-17 15:26:54 -03:00
Jeremy Freudberg 43c1c36c0d Support of S3 data sources in dashboard
Change-Id: Iad4c0739f774b4f87ec6f24211c3f39eec7a7582
2018-07-10 12:25:18 -04:00
Jeremy Freudberg b742987174 Change approach to saharaclient authentication
We'll commit to the idea of constructing a session based on token auth
here in the sahara-dashboard code itself. And in preparation for some
upcoming python-saharaclient changes, move certificate settings into
that session object.

Change-Id: I5f76af0e14822513849af2e75445af837af85285
Story: 1747838
2018-07-09 12:47:16 -04:00
Luigi Toscano 56b69d6477 Goodbye mox - no more needed
The porting to mock of sahara-dashboard is complete.
This fulfills the community goal
"Remove Use of mox/mox3 for Testing" set for Rocky:
https://governance.openstack.org/tc/goals/rocky/mox_removal.html

Raise the requirement to the Rocky M2 release of Horizon,
which drops the usage of mox by default (it should be
explicitly enabled). Without a forced import from Horizon
the mox dependencies can be dropped here.
Bump also a dependency needed by this new version of Horizon.

Change-Id: Iaf272af9919f8a69562c0a469130bbf8628936cf
2018-07-04 19:38:21 +02:00
Luigi Toscano 5fc84cd7d2 Remove mox from DataProcessingJobTemplateTests
This change is part of "Remove Use of mox/mox3 for Testing"
community goal set for Rocky:
https://governance.openstack.org/tc/goals/rocky/mox_removal.html

Change-Id: I12347f3fa30a67c0e16a8b0f019663786ce686fa
2018-07-04 17:49:39 +02:00
Charles Short 77bc890432 Remove mox3 from DataProcessingClusterTemplateTests
Apart of the mox3 community goal for rocky.

Change-Id: If0010e61e4f3c25c9800a8adc73ea1563366a34c
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-07-04 14:47:41 +02:00
Jeremy Freudberg 63a8350804 Fix _cls_registry type
Horizon commit e50a69d69f338d0ec66baa659a7d82e328e62a67 saw
_cls_registry become a list instead of a set. We need to reflect this
change, or else see:
  'set' object has no attribute 'append'

Change-Id: I302b6120145909fc4d342579818b05584a0820a3
2018-06-14 09:53:55 -04:00
Ivan Kolodyazhny 23dbfa570c Explicitly use django_nose.NoseTestSuiteRunner
Horizon is going to switch to Django Test Runner [1].
To not break Sahara Dashboard we need to use Nose Test Runner
until we'll be ready to remove Nose from sahara-dashboard.

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

Change-Id: Ic248f7cc716ea0cfe8a6398438efa0a39228db85
2018-06-05 13:31:11 +00:00
Charles Short a262a42a94 Drop mox usage in SaharaApiTest
Apart of the mox3 community goal for Rocky.

Change-Id: I8f464e10f800eddfe0183fb3c2c152e37f001097
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-05-13 09:27:34 -04:00
Zuul 34481589ea Merge "Drop mox3 from DataProcessingJobBinaryTests" 2018-05-10 17:41:20 +00:00
Zuul 0510d91011 Merge "Drop mox3 from DataProcessingNodeGroupTests" 2018-05-07 13:56:09 +00:00
Zuul 9114c2d7ec Merge "Remove mox from DataProcessingClusterGuideTests" 2018-05-04 17:21:52 +00:00
Charles Short 2de3365d86 Drop mox3 from DataProcessingNodeGroupTests
Apart of the mox3 community goal for Rocky.

Change-Id: I92895f919f26885752391b0ce37d98a146fa901d
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-05-04 10:28:58 -04:00
Charles Short 3227c74c3a Remove mox from DataProcessingClusterGuideTests
Apart of the mox3 community goal for Rocky.

Change-Id: Ib060e7be477868131b0dc6dcd12fbadc35d15d7c
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-05-04 10:17:21 -04:00
Zuul f9c21c3d2a Merge "Remove mox from DataProcessingClusterTests" 2018-05-03 18:17:00 +00:00
Zuul 999d9fb709 Merge "Mox removal for DataProcessingDataSourceTests" 2018-05-03 12:42:41 +00:00
Zuul 656e265b27 Merge "Remove mox3 from DataProcessingImageRegistryTests" 2018-05-03 11:37:52 +00:00
Charles Short 40567677ca Mox removal for DataProcessingDataSourceTests
Apart of the mox3 community goal for Rocky.

Change-Id: Ida0570b57eaa73dbefe8ebd49809e102843758e7
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-04-30 19:20:43 +00:00