From b93494dc108d47272dc301aefb4f98b884286205 Mon Sep 17 00:00:00 2001 From: rexlee8776 Date: Fri, 18 Aug 2017 01:13:44 +0000 Subject: DRAFT: update yardstick generic test cases dashboard current dashboard is obselete and hard to understand add local grafana dashboard automatically import by "yardstick env grafana" update grafana version to latest steady Change-Id: Iffae9170231d3e0867a52a1f6b5e99c4650b7326 Signed-off-by: rexlee8776 --- api/resources/v1/env.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'api/resources/v1') 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) -- cgit 1.2.3-korg