diff --git a/software/software/constants.py b/software/software/constants.py index 6a95bdc8..39ddcf49 100644 --- a/software/software/constants.py +++ b/software/software/constants.py @@ -62,6 +62,10 @@ REMOVING = 'removing' UNAVAILABLE = 'unavailable' UNKNOWN = 'n/a' +VALID_DEPLOY_START_STATES = [ + AVAILABLE, + DEPLOYED, +] STATUS_DEVELOPEMENT = 'DEV' STATUS_OBSOLETE = 'OBS' diff --git a/software/software/software_controller.py b/software/software/software_controller.py index c78b2244..33372256 100644 --- a/software/software/software_controller.py +++ b/software/software/software_controller.py @@ -1883,7 +1883,7 @@ class PatchController(PatchService): success = False # Check if release state is valid - elif release["state"] not in [constants.AVAILABLE]: + elif release["state"] not in constants.VALID_DEPLOY_START_STATES: msg = "Software release state is invalid: %s" % release["state"] LOG.error(msg) msg_error += msg