Update to_version field to return all kube versions

In this commit, the to_version field was updated to return
all kube versions and allow the user to install older versions.

Test Case:
PASS - Using Horizon, check all k8s are available under
drop-down menu.
PASS - Using Horizon, create and apply kube orchestration
with --to-version selecting a version available and verify
that the kube was upgraded to the correct version.


Closes-bug: 2043514

Change-Id: I72d5edd33188935e706649c8561b0d6eb7b9b6c6
Signed-off-by: Christopher Souza <Christopher.DeOliveiraSouza@windriver.com>
This commit is contained in:
Christopher Souza 2023-11-14 19:00:47 -03:00 committed by Christopher de Oliveira Souza
parent e4c24875c0
commit e113545cbc
1 changed files with 3 additions and 1 deletions

View File

@ -262,9 +262,11 @@ class CreateCloudStrategyForm(forms.SelfHandlingForm):
if k.state == "active":
version = [(k.version, '--')]
kube_versions[:0] = version
if k.state != "unavailable":
version = [(k.version, k.version + " - " + k.state)]
kube_versions.extend(version)
else:
version = [(k.version, k.version)]
kube_versions.extend(version)
self.fields['to_version'].choices = kube_versions
release_list = []