From e113545cbcd830055e2be38888f26026fba4d5c4 Mon Sep 17 00:00:00 2001 From: Christopher Souza Date: Tue, 14 Nov 2023 19:00:47 -0300 Subject: [PATCH] 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 --- .../dashboards/dc_admin/dc_orchestration/forms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_orchestration/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_orchestration/forms.py index a1a103a1..f1ca5cd0 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_orchestration/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_orchestration/forms.py @@ -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 = []