summaryrefslogtreecommitdiffstats
path: root/api/resources/v1/env.py
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-08-28 09:19:28 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-28 09:19:28 +0000
commit6b762e9edb2f7913348d99c1c240fe94b9f7cbf9 (patch)
treeb49946e5973f98fc72612eed680bdab557be5765 /api/resources/v1/env.py
parent952ccb549c08b620a35f20ae809e0cea88ae4d99 (diff)
parentb93494dc108d47272dc301aefb4f98b884286205 (diff)
Merge "DRAFT: update yardstick generic test cases dashboard"
Diffstat (limited to 'api/resources/v1/env.py')
-rw-r--r--api/resources/v1/env.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/api/resources/v1/env.py b/api/resources/v1/env.py
index 98b8ec7e4..47ea91643 100644
--- a/api/resources/v1/env.py
+++ b/api/resources/v1/env.py
@@ -88,13 +88,13 @@ class V1Env(ApiResource):
def _create_dashboard(self, ip):
url = 'http://admin:admin@{}:{}/api/dashboards/db'.format(ip, consts.GRAFANA_PORT)
- path = os.path.join(consts.REPOS_DIR, 'dashboard', '*dashboard.json')
+ path = os.path.join(consts.REPOS_DIR, 'dashboard', 'opnfv_yardstick_tc*.json')
for i in sorted(glob.iglob(path)):
with open(i) as f:
data = jsonutils.load(f)
try:
- HttpClient().post(url, data)
+ HttpClient().post(url, {"dashboard": data})
except Exception:
LOG.exception('Create dashboard %s failed', i)
raise
@@ -120,7 +120,7 @@ class V1Env(ApiResource):
"basicAuth": True,
"basicAuthUser": "admin",
"basicAuthPassword": "admin",
- "isDefault": False,
+ "isDefault": True,
}
try:
HttpClient().post(url, data)