plugin: validate.py do not check osd_scenario

osd_scenario now defaults to lvm and should not be changed. So we don't
need to test it.

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/3851/head
Sébastien Han 2018-10-11 18:01:10 +02:00 committed by Dimitri Savineau
parent e2467272f8
commit 72211d4a24
1 changed files with 10 additions and 33 deletions

View File

@ -93,16 +93,7 @@ class ActionModule(ActionBase):
if host_vars["osd_group_name"] in host_vars["group_names"]:
notario.validate(host_vars, osd_options, defined_keys=True)
notario_store['osd_objectstore'] = host_vars["osd_objectstore"]
if host_vars["osd_scenario"] == "collocated":
if not host_vars.get("osd_auto_discovery", False):
notario.validate(
host_vars, collocated_osd_scenario, defined_keys=True) # noqa E501
if host_vars["osd_scenario"] == "non-collocated":
notario.validate(
host_vars, non_collocated_osd_scenario, defined_keys=True) # noqa E501
if host_vars["osd_scenario"] == "lvm":
if host_vars.get("devices"):
notario.validate(
host_vars, lvm_batch_scenario, defined_keys=True)
@ -212,11 +203,6 @@ def validate_osd_auto_discovery_bool_value(value):
False], "osd_auto_discovery can be set to true/True or false/False (default)"
def validate_osd_scenarios(value):
assert value in ["collocated", "non-collocated",
"lvm"], "osd_scenario must be set to 'collocated', 'non-collocated' or 'lvm'" # noqa E501
def validate_objectstore(value):
assert value in [
"filestore", "bluestore"], "objectstore must be set to 'filestore' or 'bluestore'" # noqa E501
@ -289,17 +275,8 @@ rados_options = (
)
osd_options = (
(optional("dmcrypt"), validate_dmcrypt_bool_value),
(optional("osd_auto_discovery"), validate_osd_auto_discovery_bool_value),
("osd_scenario", validate_osd_scenarios),
)
collocated_osd_scenario = ("devices", iterables.AllItems(types.string))
non_collocated_osd_scenario = (
(optional("bluestore_wal_devices"), iterables.AllItems(types.string)),
(optional("dedicated_devices"), iterables.AllItems(types.string)),
("devices", iterables.AllItems(types.string)),
(optional("dmcrypt"), types.boolean),
(optional("osd_auto_discovery"), types.boolean),
)
lvm_batch_scenario = ("devices", iterables.AllItems(types.string))