aboutsummaryrefslogtreecommitdiffstats
path: root/api/resources
diff options
context:
space:
mode:
Diffstat (limited to 'api/resources')
-rw-r--r--api/resources/v1/env.py2
-rw-r--r--api/resources/v2/testcases.py8
2 files changed, 8 insertions, 2 deletions
diff --git a/api/resources/v1/env.py b/api/resources/v1/env.py
index f3c01152b..7c831fd74 100644
--- a/api/resources/v1/env.py
+++ b/api/resources/v1/env.py
@@ -117,7 +117,7 @@ class V1Env(ApiResource):
"isDefault": True,
}
try:
- HttpClient().post(url, data)
+ HttpClient().post(url, data, timeout=10)
except Exception:
LOG.exception('Create datasources failed')
raise
diff --git a/api/resources/v2/testcases.py b/api/resources/v2/testcases.py
index 316ef2664..0edbf6285 100644
--- a/api/resources/v2/testcases.py
+++ b/api/resources/v2/testcases.py
@@ -60,7 +60,13 @@ class V2Testcase(ApiResource):
options = {k: {'description': '', 'type': v.__class__.__name__}
for k, v in jinja2schema.infer(data).items()}
-
+ # [('segmentation_id', < scalar >), ('image', < string >), ('provider', < scalar >),
+ # ('physical_network', < string >), ('packetsize', < number >)]
+ for k, v in options.items():
+ if k == 'segmentation_id':
+ options[k]['type'] = 'Number'
+ if k == 'provider':
+ options[k]['type'] = 'String'
return result_handler(consts.API_SUCCESS, {'testcase': data, 'args': options})
def delete(self, case_name):