Enhance software version check for backup delete

As a result of commit
https://review.opendev.org/c/starlingx/distcloud/+/879369
software version was passed in as a float as opposed to
string format. This commit ensures the provided sofware
version is always in string format.

Test Plan:
  - Create a subcloud backup using dcmanager subcloud-backup create
    command. Verify that the subcloud backup can be deleted
    successfully using dcmanager subcloud-backup delete command.

Closes-Bug: 2017947
Signed-off-by: Tee Ngo <tee.ngo@windriver.com>
Change-Id: I9657bdc61dd53abf77905331da70ae6ec8c0d810
This commit is contained in:
Tee Ngo 2023-04-27 20:13:13 -04:00
parent bb0740dbec
commit cee44fc2fb

View File

@ -25,7 +25,7 @@
- name: Fail if the specified software version is invalid
fail:
msg: "Specified software_version is invalid. Supported version: {{ supported_release_versions_for_backup|join(', ') }}"
when: software_version not in supported_release_versions_for_backup
when: software_version|string not in supported_release_versions_for_backup
- name: Fail if storage location is not specified for backup removal on system controller
fail: