Commit Graph

24 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
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 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
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
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
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
Shu Yingya b624278524 Fix the compatibility after django 1.11 support
In patch[1], the change didn't completely fix the issue
that can't open NGT creating widget if django didn't upgrade
to the lastest version 1.11.
This patch fixes the issue by rewriting the method "build_attrs".

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

Change-Id: I748c71fd26d3abaf4a059db3c2224589284131c6
2017-08-03 01:07:12 +08:00
Jenkins e73f9ec7c6 Merge "Fix can't open the NGT creating form" 2017-08-01 13:08:40 +00:00
Shu Yingya 309e1662fa Fix can't open the NGT creating form
Horizon team has overloaded a method "build_attrs" in [1]
to use "var-keyword parameter".
Sahara dashboard will face an error when click button to create
node group template. Error message is:
  "TypeError: build_attrs() got an unexpected keyword argument 'name'"

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

Change-Id: I4b4fc2d12465fcda5e0feddcf4aab6b11bd9be10
2017-08-01 19:58:45 +08:00
Jeremy Freudberg ed4cb76aa2 Check for volumev2 and volumev3 too
If we don't check for all three possible Cinder service types, we may
end up with Cinder options hidden even when the service is in fact
available.

Change-Id: Ic844dc7d3b138b0918f9c436f0550fe0a4379bae
Closes-Bug: #1678534
2017-07-18 10:02:27 -04:00
Jeremy Freudberg 1c7c9e9251 Fix neutron-related openstack_dashboard imports
Hot Fix: In [0], floating IP and security group operations within
openstack_dashboard were moved. The imports are now corrected.

[0] https://review.openstack.org/#/c/466645/

Related-Blueprint: bp sahara-remove-nova-network
Change-Id: I2c086613fff302e852a2dda51701c620371a27e4
2017-06-06 10:05:01 -04:00
kavithahr 89b43b3d0e Replaces uuid.uuid4 with uuidutils.generate_uuid()
Change-Id: I745bdf2db5821ee951021c39105be9439e6f8831
2017-03-11 11:03:11 +00:00
Rajiv Kumar 0d15f0ec52 Switch to oslo_log
Change-Id: I1fe00ab7b0405422af76488245a67b3d68e29f06
2017-01-18 16:49:30 +05:30
Jenkins f82d426238 Merge "Skip pulling cinder information if cinder api is unavailable" 2016-09-07 15:42:48 +00:00
Michael Lelyakin 5a7e0c150d Skip pulling cinder information if cinder api is unavailable
Now if user wants create node group template
and cinder is unavailable, dashboard send
error message: "Unable to retrive volumes type
list".
We can skip pulling cinder information if it's
unavailable and show only one option to "storage
location" field: "Ephemeral Drive".

Change-Id: I53907be435f2c4290adb07d0ec0a2c121c9b890a
Closes-bug: 1524432
2016-09-07 17:16:49 +03:00
Mikhail Lelyakin 039f02408f Improve pulling configs for node groups
Now in file sahara_dashboard/content/data_processing/
nodegroup_templates/workflows/create.py in 445 and 448
lines we get general and service parameters with two
api calls to sahara.
It will be more optimize if we will create only one
api call to sahara.

Change-Id: I5305143d0430d4cd25ba98ce3145a0ab545210c7
Partial-bug: 1430112
2016-09-06 17:40:29 +03:00
Michael Lelyakin c822c02ffa Add warning to deprecated plugins
There is block of help text by creating
Node Group Template or Cluster Template.
In this commit I add warning message to this
block, if version of plugin is deprecated now.

blueprint: plugin-management-api
Change-Id: I0b454f4762692ddac644602559a45cb0e7297643
Depend-on: Ia125ad8108cafd4e39dc1c2c53f3c62ff3ce3e78
2016-08-23 11:06:37 +00:00
Thomas Goirand 55d1f00aa5 [Django 1.9] request.REQUEST is gone
This patch replaces request.REQUEST by request.GET, request.POST or by
their merge (merge is needed because in some cases the request
contains valuable information in both GET and POST methods
simultaneously), as the former doesn't exist anymore in Django 1.9.
This fixes numerous unit test issues in Debian Sid: from 21 errors
1 failure, to 3 errors and 3 failures.

Co-Authored-By: Michael Ionkin <mionkin@mirantis.com>
Closes-Bug: #1560270
Change-Id: Ie0784379895350f6dbfc03949b3473d5171df33b
2016-03-24 17:45:34 +03:00
Akihiro Motoki bfc0daa683 Use %s when non-ascii characters can be contained
.format() in python 2.7 cannot handle a unicode string if it contains
non-ASCII characters. This breaks i18n situations.

The behavior of .format() is different between python2 and python3.
We should use .format() only when we are confident that .format()
can handle passed values (like ASCII string or integer) correctly.

This commit does not touch other usages of .format() which work well.

Change-Id: I329b33c1c7776d7f24488572107f7ea35f418398
Closes-Bug: #1551014
2016-03-07 12:19:28 +00:00
Michael Ionkin 76a7008fcb Added Base Image field on Node Group Template form
This field allows to choice an image (including empty image choice)
for node group template
Also added Base Image field in Node Group Template details page

Change-Id: I87420c489664301dac3f6cad3abc06c97b0e8029
Closes-bug: 1528182
2016-03-01 12:59:58 +03:00
Nikita Konovalov 09eafa0f6f Import reorg and cleanup
The imports order should follow the simple rule of
groups. There are usually 3 groups in most cases.
However this repository is a plugin so imports from
the base system (Horizon) should be moved to a
separate group.

So imports should go into the following groups:

1) Imports from Python standard modules
2) Imports from dependencies previded in requirements
3) Imports from Horizon
4) Imports within current project

Change-Id: Ie028a4aa6897a3400872a45b94b073b2819ee4ac
2016-02-26 19:29:39 +03:00
Chad Roberts 625dcfab24 Reorganizing job and cluster guide pages
Removing the separate guide panels and putting
the code for each guide under the cluster and
jobs panels.  Links to the guides still appear
at the top of the job and cluster tables.

Change-Id: I3ccd8370d40bdf9002ae23cbbbfd655a951969a2
Partial-Implements: bp reduce-number-of-panels
2016-02-15 21:52:33 +00:00
Chad Roberts 5aa8b83bc9 Reorganizing cluster panels into tabs
First patch in reorganizing the sahara UI to be more
tab oriented rather than death by a thousand panels.
There are other patches that will complete the work,
 but this patch addresses the cluster-oriented panels
 by moving them under a single panel named Clusters.

Change-Id: Iae4bf4b5127fb29153ec5335070cde7d344e059e
Partial-Implements: bp reduce-number-of-panels
2016-02-15 14:05:35 -05:00