summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-04-14 16:33:00 +0000
committerGerrit Code Review <review@openstack.org>2017-04-14 16:33:00 +0000
commit1a86e4fbb458db3b2ebf2889b7ee3f655cba1231 (patch)
treedb833e8334cb1a1c2dd7ebf9da6b7b094db8c9ef
parent3cb186e6ad12838b97764cc0c3d54df92f691a2f (diff)
parent598f8ebb8d56288cc1e72f85ebe18c2fd7af29db (diff)
downloadosprofiler-1.9.0.tar.gz
Merge "Fix error message for invalid trace"1.9.0
-rw-r--r--osprofiler/cmd/commands.py9
-rw-r--r--osprofiler/tests/unit/cmd/test_shell.py8
2 files changed, 4 insertions, 13 deletions
diff --git a/osprofiler/cmd/commands.py b/osprofiler/cmd/commands.py
index ff2a179..6181a64 100644
--- a/osprofiler/cmd/commands.py
+++ b/osprofiler/cmd/commands.py
@@ -62,13 +62,8 @@ class TraceCommands(BaseCommand):
trace = engine.get_report(args.trace)
if not trace or not trace.get("children"):
- msg = ("Trace with UUID %s not found. "
- "There are 3 possible reasons: \n"
- " 1) You are using not admin credentials\n"
- " 2) You specified wrong trace id\n"
- " 3) You specified wrong HMAC Key in original calling\n"
- " 4) Ceilometer didn't enable profiler notification topic"
- % args.trace)
+ msg = ("Trace with UUID %s not found. Please check the HMAC key "
+ "used in the command." % args.trace)
raise exc.CommandError(msg)
# NOTE(ayelistratov): Ceilometer translates datetime objects to
diff --git a/osprofiler/tests/unit/cmd/test_shell.py b/osprofiler/tests/unit/cmd/test_shell.py
index d4ffaaf..1121c24 100644
--- a/osprofiler/tests/unit/cmd/test_shell.py
+++ b/osprofiler/tests/unit/cmd/test_shell.py
@@ -165,12 +165,8 @@ class ShellTestCase(test.TestCase):
def test_trace_show_trace_id_not_found(self, notifications, mock_get):
mock_get.return_value = notifications
- msg = ("Trace with UUID %s not found. There are 3 possible reasons: \n"
- " 1) You are using not admin credentials\n"
- " 2) You specified wrong trace id\n"
- " 3) You specified wrong HMAC Key in original calling\n"
- " 4) Ceilometer didn't enable profiler notification topic"
- % self.TRACE_ID)
+ msg = ("Trace with UUID %s not found. Please check the HMAC key "
+ "used in the command." % self.TRACE_ID)
self._test_with_command_error(self._trace_show_cmd(), msg)