mirror of https://github.com/ceph/ceph-ansible.git
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
parent
e2467272f8
commit
72211d4a24
|
@ -93,25 +93,16 @@ class ActionModule(ActionBase):
|
||||||
if host_vars["osd_group_name"] in host_vars["group_names"]:
|
if host_vars["osd_group_name"] in host_vars["group_names"]:
|
||||||
notario.validate(host_vars, osd_options, defined_keys=True)
|
notario.validate(host_vars, osd_options, defined_keys=True)
|
||||||
notario_store['osd_objectstore'] = host_vars["osd_objectstore"]
|
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":
|
if host_vars.get("devices"):
|
||||||
notario.validate(
|
notario.validate(
|
||||||
host_vars, non_collocated_osd_scenario, defined_keys=True) # noqa E501
|
host_vars, lvm_batch_scenario, defined_keys=True)
|
||||||
|
elif notario_store['osd_objectstore'] == 'filestore':
|
||||||
if host_vars["osd_scenario"] == "lvm":
|
notario.validate(
|
||||||
if host_vars.get("devices"):
|
host_vars, lvm_filestore_scenario, defined_keys=True) # noqa E501
|
||||||
notario.validate(
|
elif notario_store['osd_objectstore'] == 'bluestore':
|
||||||
host_vars, lvm_batch_scenario, defined_keys=True)
|
notario.validate(
|
||||||
elif notario_store['osd_objectstore'] == 'filestore':
|
host_vars, lvm_bluestore_scenario, defined_keys=True) # noqa E501
|
||||||
notario.validate(
|
|
||||||
host_vars, lvm_filestore_scenario, defined_keys=True) # noqa E501
|
|
||||||
elif notario_store['osd_objectstore'] == 'bluestore':
|
|
||||||
notario.validate(
|
|
||||||
host_vars, lvm_bluestore_scenario, defined_keys=True) # noqa E501
|
|
||||||
|
|
||||||
except Invalid as error:
|
except Invalid as error:
|
||||||
display.vvvv("Notario Failure: %s" % str(error))
|
display.vvvv("Notario Failure: %s" % str(error))
|
||||||
|
@ -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)"
|
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):
|
def validate_objectstore(value):
|
||||||
assert value in [
|
assert value in [
|
||||||
"filestore", "bluestore"], "objectstore must be set to 'filestore' or 'bluestore'" # noqa E501
|
"filestore", "bluestore"], "objectstore must be set to 'filestore' or 'bluestore'" # noqa E501
|
||||||
|
@ -289,17 +275,8 @@ rados_options = (
|
||||||
)
|
)
|
||||||
|
|
||||||
osd_options = (
|
osd_options = (
|
||||||
(optional("dmcrypt"), validate_dmcrypt_bool_value),
|
(optional("dmcrypt"), types.boolean),
|
||||||
(optional("osd_auto_discovery"), validate_osd_auto_discovery_bool_value),
|
(optional("osd_auto_discovery"), types.boolean),
|
||||||
("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)),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
lvm_batch_scenario = ("devices", iterables.AllItems(types.string))
|
lvm_batch_scenario = ("devices", iterables.AllItems(types.string))
|
||||||
|
|
Loading…
Reference in New Issue