Commit Graph

227 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
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
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
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
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
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
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
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
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
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
Charles Short 62544744de Remove mox3 from DataProcessingImageRegistryTests
Apart of the mox3 community goal for Rocky.

Change-Id: If3956d0e16f3fc32a862d836142d2d7a71c946b5
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-04-30 19:20:27 +00:00
Charles Short d99c744c21 Remove mox from DataProcessingClusterTests
Apart of the mox3 community goal for Rocky.

Change-Id: I45fb50f511cc566306cd3e9badd3f2aa64595580
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-04-30 19:20:08 +00:00
Charles Short 6b38fa5de7 Drop mox3 from DataProcessingPluginsTests
Apart of the mox3 community goal for Rocky.

Change-Id: Icf53e7f582e5e386c81dac540723d97712fa3c28
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-04-30 19:19:56 +00:00
Charles Short dca41749ab Drop mox3 from DataProcessingJobBinaryTests
Change-Id: Ib1b26bbbcc48711617d0ff874457c47dd6323228
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-04-30 19:18:39 +00:00
Charles Short 787cc08789 Mox removal for DataProcessingJobTests
Apart of the mox3 community goal for Rocky.

Change-Id: I90bde341d5a1c1ede967a76633385d336f2c563f
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-04-26 22:19:21 -04:00
Luigi Toscano da5df29dfe Port away from django.core.urlresolves to django.urls
The old location was deprecated in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3
and totally removed from Django 2.0.

Change-Id: Iacbf13df35befebcc0a86784b380c2ac694516e8
2018-03-11 16:05:35 +01:00
Ian Y. Choi b0a8cb908f [trivial] fix typo
- Openstack -> OpenStack
  (found during translation in Hard StringFreeze period)

Change-Id: I983c424554659b07d5ea82937454901eb6fa86a2
2018-02-12 08:36:29 +00:00
Zuul d12cd7b2f7 Merge "Support of S3 binaries in dashboard" 2018-01-25 04:35:33 +00:00
Zuul 000deeff22 Merge "TrivialFix: remove redundant import alias" 2018-01-24 05:33:44 +00:00
Dao Cong Tien 1fd14f161a TrivialFix: remove redundant import alias
Change-Id: Ib027d5e467e05a683b2da2097a2c05d676115b67
2018-01-24 09:15:51 +07:00
Zuul e10d47861d Merge "Update url links in doc file of sahara-dashboard" 2018-01-22 12:10:39 +00:00
shangxiaobj cd94eb0e98 Update url links in doc file of sahara-dashboard
Replace the old url links in sahara-dashboard with the lastest ones
according to the OpenStack website.

Change-Id: I75857ad41098a2a0ed283f1ac912de1ac020de01
2018-01-22 08:56:58 +00:00
Zuul 1d2d6af440 Merge "Setting streaming options as not required" 2018-01-18 01:36:25 +00:00
Jeremy Freudberg c08f0d2662 Support of S3 binaries in dashboard
bp sahara-support-s3

Change-Id: Ica6b5edc036fb92e8035600df51c1e074dde8093
2018-01-16 21:08:25 -05:00
Zuul 9697b5b93a Merge "Rename the 'SAHARA_AUTO_IP_ALLOCATION_ENABLED' config parameter" 2018-01-16 17:52:04 +00:00
qiaomin fcdc776981 Rename the 'SAHARA_AUTO_IP_ALLOCATION_ENABLED' config parameter
The 'SAHARA_AUTO_IP_ALLOCATION_ENABLED' config parameter in Sahara
is confusing. If you wish to disable floating IP options during node
group template creation, set it 'True', but this name sounds like it
has to do with automatically associating a floating IP. So this patch
renames it to a meaningful variable name.

Change-Id: If8f71ea21cb71bbffe996f7db88b7683ad91ecac
2018-01-16 13:39:18 +00:00
Telles Nobrega 5ebb10ac3e Setting streaming options as not required
streaming_mapper and steraming_reducer as not marked as not required,
this causes UI to crash when trying to launch job that are not Streaming
MapReduce jobs.

Change-Id: I79a9663a0059edd14b8a79399cfd9f72c253199e
2018-01-15 14:30:38 -03:00
Luigi Toscano fddcad0b6f Fix attrs list of LabeledInput.render() method
The item (and the buttom to create a new job binary) didn't work anymore
in Django 1.11, due to a change in the parameter list of the render()
method: it was previously based on the position, now the arguments are
explicitly passed using their names.

Thanks to https://github.com/springload/wagtaildraftail/issues/51
for the explanation.

Closes-Bug: #1743384
Change-Id: I241021c593ad50591f0155dfb364afbc662a4794
2018-01-15 15:10:18 +01:00
qiaomin 382c172976 Use 'trimmed' for blocktrans in multi-line strings
blocktrans trimmed option removes newlines from contents of blocktrans
and replaces any whitespace at the beginning and end of a line into
a single space. This makes translator life easier.

Closes-Bug: #1741761
Change-Id: I7e8d5337553fff595e66ea406f6528bb6b36ff94
2018-01-07 23:22:42 +08:00
Zuul 4be68b6d44 Merge "Add import of cluster templates to GUI." 2018-01-04 14:13:05 +00:00
Iwona Kotlarska ca05aed68c Add import of cluster templates to GUI.
Partially-Implements: bp portable-node-group-and-cluster-templates

This change adds button "Import Template"
to cluster templates tab in dashboard.

Change-Id: If83aaf34f84e82052c3a82ab36cb61648ff3125f
2017-12-29 10:09:13 -03:00