summaryrefslogtreecommitdiffstats
path: root/utils/parser.py
diff options
context:
space:
mode:
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