summaryrefslogtreecommitdiffstats
path: root/utils/parser.py
diff options
context:
space:
mode:
authorliyin <liyin11@huawei.com>2017-07-13 11:54:08 +0800
committerYu Yang (Gabriel) <Gabriel.yuyang@huawei.com>2017-07-18 01:33:06 +0000
commit1fd4046eacef68412f65ac888646c14999fa8236 (patch)
tree603541c646b304c653f50e1f412520754d9bab62 /utils/parser.py
parent45d371c2a2d89231db9ffa892ce19da8f8b3cfa4 (diff)
Add frame support of elk one docker support
JIRA: BOTTLENECK-171 Add support of Bottlenecks docker frame refact, After this patch we will provide the ability of several installer. Add Yardstick_TAG to adjust yardstick docker version Change-Id: Ib431f8acf4a76b59f9d5e8783bcc7d2e5be208ae Signed-off-by: liyin <liyin11@huawei.com> (cherry picked from commit bde702f95563cf953c32f9bfd0587083a3fea26d)
Diffstat (limited to 'utils/parser.py')
-rw-r--r--utils/parser.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/parser.py b/utils/parser.py
index ad141acb..65072c06 100644
--- a/utils/parser.py
+++ b/utils/parser.py
@@ -17,6 +17,7 @@ import yaml
import json
import time
from pyroute2 import IPDB
+import utils.infra_setup.runner.docker_env as docker_env
class Parser():
@@ -41,6 +42,8 @@ class Parser():
cls.bottlenecks_config["fetch_os"] = common_config["fetch_os_file"]
cls.bottlenecks_config["log_dir"] = common_config['log_dir']
cls.bottlenecks_config["rc_dir"] = common_config['rc_dir']
+ cls.bottlenecks_config["yardstick_rc_dir"] = \
+ common_config['yardstick_rc_dir']
cls.config_dir_check(cls.bottlenecks_config["log_dir"])
@classmethod
@@ -93,6 +96,15 @@ class Parser():
return test_cfg, stack_cfg
@staticmethod
+ def convert_docker_env(config, ip_type):
+ if ip_type is "dashboard":
+ config["contexts"]["dashboard_ip"] = \
+ docker_env.ELK_info["ip"] + ":9200"
+ elif ip_type is "yardstick":
+ config["contexts"]["yardstick_ip"] = \
+ docker_env.yardstick_info["ip"] + ":8888"
+
+ @staticmethod
def ip_parser(ip_type):
with IPDB() as ip:
GATEWAY_IP = ip.routes['default'].gateway