summaryrefslogtreecommitdiffstats
path: root/utils/parser.py
diff options
context:
space:
mode:
authorliyin <liyin11@huawei.com>2017-07-13 11:54:08 +0800
committerAce Lee <liyin11@huawei.com>2017-07-14 09:43:39 +0000
commitbde702f95563cf953c32f9bfd0587083a3fea26d (patch)
tree2bb402a5b730adf28508e12208131c5f3b2cd9ee /utils/parser.py
parentc821b792db011dbbe1c70d256fadbe9c745570ff (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>
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