Merge "Use validation framework for running undercloud checkdisk" into stable/train
This commit is contained in:
commit
54c05e360e
@ -30,6 +30,9 @@ from oslo_config import cfg
|
|||||||
from tripleoclient import constants
|
from tripleoclient import constants
|
||||||
from tripleoclient import utils
|
from tripleoclient import utils
|
||||||
|
|
||||||
|
from validations_libs import constants as v_consts
|
||||||
|
from validations_libs.validation_actions import ValidationActions
|
||||||
|
|
||||||
|
|
||||||
class FailedValidation(Exception):
|
class FailedValidation(Exception):
|
||||||
pass
|
pass
|
||||||
@ -90,15 +93,16 @@ def _check_diskspace(upgrade=False):
|
|||||||
else:
|
else:
|
||||||
playbook = 'undercloud-disk-space.yaml'
|
playbook = 'undercloud-disk-space.yaml'
|
||||||
|
|
||||||
python_interpreter = "/usr/bin/python{}".format(sys.version_info[0])
|
with utils.TempDirs() as tmp:
|
||||||
utils.run_ansible_playbook(logger=LOG,
|
# @matbu: todo: removed this when [1] will be merged
|
||||||
workdir=constants.ANSIBLE_VALIDATION_DIR,
|
# [1] https://review.opendev.org/753845
|
||||||
playbook=playbook,
|
v_consts.VALIDATION_ANSIBLE_ARTIFACT_PATH = "{}/artifacts".format(tmp)
|
||||||
inventory='undercloud,',
|
actions = ValidationActions()
|
||||||
retries=False,
|
actions.run_validations(
|
||||||
connection='local',
|
inventory='undercloud',
|
||||||
output_callback='validation_output',
|
log_path=tmp,
|
||||||
python_interpreter=python_interpreter)
|
validations_dir=constants.ANSIBLE_VALIDATION_DIR,
|
||||||
|
validation_name=playbook)
|
||||||
|
|
||||||
|
|
||||||
def _check_memory():
|
def _check_memory():
|
||||||
|
Loading…
Reference in New Issue
Block a user