Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Bugfix: ha test case criteria pass when sla not pass"
[yardstick.git]
/
api
/
resources
/
v1
/
env.py
diff --git
a/api/resources/v1/env.py
b/api/resources/v1/env.py
index
98b8ec7
..
47ea916
100644
(file)
--- 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)
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:
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
except Exception:
LOG.exception('Create dashboard %s failed', i)
raise
@@
-120,7
+120,7
@@
class V1Env(ApiResource):
"basicAuth": True,
"basicAuthUser": "admin",
"basicAuthPassword": "admin",
"basicAuth": True,
"basicAuthUser": "admin",
"basicAuthPassword": "admin",
- "isDefault":
Fals
e,
+ "isDefault":
Tru
e,
}
try:
HttpClient().post(url, data)
}
try:
HttpClient().post(url, data)