From: Andrew Schoen Date: Thu, 3 May 2018 21:27:44 +0000 (-0500) Subject: validate: adds a CEPH_RELEASES constant X-Git-Tag: v3.2.0beta1~100 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=890e265fd34321dbda3b368b657bcde05c748b61;p=ceph-ansible.git validate: adds a CEPH_RELEASES constant Signed-off-by: Andrew Schoen --- diff --git a/plugins/actions/validate.py b/plugins/actions/validate.py index f1b71b285..7efa5f576 100644 --- a/plugins/actions/validate.py +++ b/plugins/actions/validate.py @@ -20,6 +20,9 @@ from notario.decorators import optional from notario.store import store as notario_store +CEPH_RELEASES = ['jewel', 'kraken', 'luminous', 'mimic'] + + class ActionModule(ActionBase): def run(self, tmp=None, task_vars=None): @@ -149,7 +152,7 @@ def validate_lvm_volumes(value): def validate_ceph_stable_release(value): - assert value in ['jewel', 'kraken', 'luminous', 'mimic'], "ceph_stable_release must be set to 'jewel', 'kraken', 'lumious' or 'mimic'" + assert value in CEPH_RELEASES, "ceph_stable_release must be set to one of the following: %s" % ", ".join(CEPH_RELEASES) def validate_rados_options(value):