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
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
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
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
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
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
Partially-Implements: bp portable-node-group-and-cluster-templates
This change adds Import Template button to Node Group Templates Tab.
Change-Id: I68c2fa2a856fa8e14aa9512b11f0ea326c25f2a5
Partially-Implements: bp portable-node-group-and-cluster-templates
Depends-On: I33c3b6daa5b9e2be218a84efdb6113a4ce9a86df
This change adds functions to saharaclient to enable export of ngt
to JSON.
Change-Id: Ic5d9dffd0a3ae21a28ecbcfdd88f5cd1194551bb
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
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
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
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
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
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
Success urls in views were incorrect.
There is no necessity to determine a
path for concrete tab after successfully
sumbiting form. It's cause of some bugs,
because url link in browser is changed after
submiting form and isn't changed after
change tab.
For example:
If user registers an image, clicks to cluster
tab and refresh page, horizon shows image registry
tab.
Change-Id: I5f35890d8e01de7a574d13cf80de79cb102f3dff
Closes-bug: 1572281
Classes and templates were removed in this commit are unused
since change "Reorganizing cluster panels into tabs" with ID
Iae4bf4b5127fb29153ec5335070cde7d344e059e was merged.
Change-Id: Ia8f8d89770cc7c2b8ed0025a2636ba47e80d9aeb
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
Pagination abilities were implemented in Sahara API.
This changes support work with new abilities on UI.
Change-Id: I655779e0c92cf4187ff2566aa109f26abbbccb9d
bp: pagination
Depends-on: Idf96a82b0f49bd288eb3fd9bfa82f92074ea4e7c
new tab approach produces new API call, which were unmocked.
also added missing stuff in order to repair unit tests.
Change-Id: Ie9eba4773df6be9ac9663fdba0d07fa44afe6912
Closes-bug: 1578195
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
None as a default value will cause problems with updates
when volumes are unselected.
Change-Id: I293300baea752aaf42c086f7b38327f43343e0f4
Closes-bug: 1555496
Rewriting acl updates and shares updates calls to allow
this methods not to update other important fields like
node processes and so on.
Change-Id: I629779bba8d780f518040180f594209d7933ddf1
Closes-bug: 1552166
.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
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
There are action buttons in the right top corner of details views.
Some of them haven't worked (namely, the buttons that inherit from
horizon.tables.actions.BatchAction class, e.g. the Delete button).
This patch fixes this problem by adding the appropriate urls in the
context.
Affected views: Clusters, Cluster Templates, Node Group Templates,
Jobs, Job Templates, Job Binaries and Data Sources.
Change-Id: I8c63c7ed19ebcfe746da87e9d8facb593b89a241
Closes-bug: 1544549
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
* change redirect urls for Job details view and Node Group Template
details view
* remove extra 's' in template name for Job Template
* code refactoring: change class name 'JobDetailsView' to
'JobTemplateDetailsView'
Closes-bug: 1547862
Change-Id: Ia89d4b3285abe27a2ccef5292a42d23427e2246e
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
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