Merge "Small improvements for rally verify import
"
This commit is contained in:
commit
654c63e328
@ -49,7 +49,7 @@ _rally()
|
|||||||
OPTS["verify_compare"]="--uuid-1 --uuid-2 --csv --html --json --output-file --threshold"
|
OPTS["verify_compare"]="--uuid-1 --uuid-2 --csv --html --json --output-file --threshold"
|
||||||
OPTS["verify_detailed"]="--uuid --sort-by"
|
OPTS["verify_detailed"]="--uuid --sort-by"
|
||||||
OPTS["verify_genconfig"]="--deployment --tempest-config --override"
|
OPTS["verify_genconfig"]="--deployment --tempest-config --override"
|
||||||
OPTS["verify_import"]="--deployment --set-name --file --no-use"
|
OPTS["verify_import"]="--deployment --set --file --no-use"
|
||||||
OPTS["verify_install"]="--deployment --source"
|
OPTS["verify_install"]="--deployment --source"
|
||||||
OPTS["verify_list"]=""
|
OPTS["verify_list"]=""
|
||||||
OPTS["verify_reinstall"]="--deployment --tempest-config --source"
|
OPTS["verify_reinstall"]="--deployment --tempest-config --source"
|
||||||
|
@ -336,7 +336,7 @@ class Verification(object):
|
|||||||
return verifier
|
return verifier
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def import_results(cls, deployment, set_name, log_file=None):
|
def import_results(cls, deployment, set_name="", log_file=None):
|
||||||
"""Import Tempest tests results into the Rally database.
|
"""Import Tempest tests results into the Rally database.
|
||||||
|
|
||||||
:param deployment: UUID or name of a deployment
|
:param deployment: UUID or name of a deployment
|
||||||
|
@ -91,7 +91,7 @@ class VerifyCommands(object):
|
|||||||
|
|
||||||
@cliutils.args("--deployment", dest="deployment", type=str,
|
@cliutils.args("--deployment", dest="deployment", type=str,
|
||||||
required=False, help="UUID or name of a deployment.")
|
required=False, help="UUID or name of a deployment.")
|
||||||
@cliutils.args("--set-name", dest="set_name", type=str, required=False,
|
@cliutils.args("--set", dest="set_name", type=str, required=False,
|
||||||
help="Name of tempest test set. Available sets: %s" % ", ".
|
help="Name of tempest test set. Available sets: %s" % ", ".
|
||||||
join(list(consts.TempestTestsSets) +
|
join(list(consts.TempestTestsSets) +
|
||||||
list(consts.TempestTestsAPI)))
|
list(consts.TempestTestsAPI)))
|
||||||
@ -103,7 +103,8 @@ class VerifyCommands(object):
|
|||||||
required=False,
|
required=False,
|
||||||
help="Don't set new task as default for future operations")
|
help="Don't set new task as default for future operations")
|
||||||
@cliutils.alias("import")
|
@cliutils.alias("import")
|
||||||
def import_results(self, deployment=None, set_name=None, log_file=None,
|
@envutils.with_default_deployment(cli_arg_name="deployment")
|
||||||
|
def import_results(self, deployment=None, set_name="", log_file=None,
|
||||||
do_use=True):
|
do_use=True):
|
||||||
"""Import Tempest tests results into the Rally database.
|
"""Import Tempest tests results into the Rally database.
|
||||||
|
|
||||||
|
@ -398,4 +398,4 @@ class Tempest(object):
|
|||||||
self.verification.start_verifying(set_name)
|
self.verification.start_verifying(set_name)
|
||||||
self._save_results(log_file)
|
self._save_results(log_file)
|
||||||
else:
|
else:
|
||||||
LOG.error("No import file specified.")
|
LOG.error("No log file to import results was specified.")
|
||||||
|
@ -99,7 +99,7 @@ class VerifyCommandsTestCase(test.TestCase):
|
|||||||
deployment_id = "fake_uuid"
|
deployment_id = "fake_uuid"
|
||||||
mock_verification_import_results.return_value = (None, None)
|
mock_verification_import_results.return_value = (None, None)
|
||||||
self.verify.import_results(deployment=deployment_id, do_use=False)
|
self.verify.import_results(deployment=deployment_id, do_use=False)
|
||||||
default_set_name = None
|
default_set_name = ""
|
||||||
default_log_file = None
|
default_log_file = None
|
||||||
|
|
||||||
mock_verification_import_results.assert_called_once_with(
|
mock_verification_import_results.assert_called_once_with(
|
||||||
|
Loading…
Reference in New Issue
Block a user