summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-10-20 15:01:32 +0000
committerGerrit Code Review <review@openstack.org>2016-10-20 15:01:32 +0000
commit240b7467ed882bb306f877536399280246810efd (patch)
tree2460fed14fd64d4532d1373e6c32422bc9ed0c70
parent60448e666b131b8904e715425da92445d23d21cf (diff)
parentca4395caa8000339e31e55d5551c245cfea9f48c (diff)
downloadosprofiler-240b7467ed882bb306f877536399280246810efd.tar.gz
Merge "Use an env variable for connection string default"
-rw-r--r--osprofiler/cmd/commands.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/osprofiler/cmd/commands.py b/osprofiler/cmd/commands.py
index 2b6258f..99be83e 100644
--- a/osprofiler/cmd/commands.py
+++ b/osprofiler/cmd/commands.py
@@ -30,8 +30,11 @@ class TraceCommands(BaseCommand):
@cliutils.arg("trace", help="File with trace or trace id")
@cliutils.arg("--connection-string", dest="conn_str",
- default="ceilometer://",
- help="storage driver's connection string")
+ default=(cliutils.env("OSPROFILER_CONNECTION_STRING") or
+ "ceilometer://"),
+ help="Storage driver's connection string. Defaults to "
+ "env[OSPROFILER_CONNECTION_STRING] if set, else "
+ "ceilometer://")
@cliutils.arg("--json", dest="use_json", action="store_true",
help="show trace in JSON")
@cliutils.arg("--html", dest="use_html", action="store_true",