--- /dev/null
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
 
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
-'''This file realize the function of how to setup bottlenecks to your environment
-This use setuptools tool to setup'''
+'''This file realize the function of how to setup bottlenecks
+to your environment. This use setuptools tool to setup'''
 
 from setuptools import setup, find_packages
 
 
 setup(
-        name="bottlenecks",
-        version="master",
-        py_modules=['bottlenecks_cli'],
-        packages=find_packages(),
-        include_package_data=True,
-        package_data={
-                    'utils': [
-                                    'utils/infra_setup/heat/*.py',
-                                    'utils/infra_setup/runner/*.py'
-                                ],
-                    'config': [
-                                    '*.yaml'
-                                ],
-                    'testsuites': [
-                                    'posca/testcase_cfg/*',
-                                    'posca/testcase_script/*',
-                                    'posca/testsuite_story/*',
-                                    'posca/testcase_dashboard/*'
-                                ],
-                },
-        url="https://www.opnfv.org",
-        install_requires=["click"],
-        entry_points={
-                    'console_scripts': [
-                                    'bottlenecks=cli.bottlenecks_cli:main'
-                                ],
-                },
+    name="bottlenecks",
+    version="master",
+    py_modules=['bottlenecks_cli'],
+    packages=find_packages(),
+    include_package_data=True,
+    package_data={
+        'utils': [
+            'utils/infra_setup/heat/*.py',
+            'utils/infra_setup/runner/*.py',
+            'utils/*.py'
+        ],
+        'config': [
+            '*.yaml'
+        ],
+        'testsuites': [
+            'posca/testcase_cfg/*',
+            'posca/testcase_script/*',
+            'posca/testsuite_story/*',
+            'posca/testcase_dashboard/*'
+        ],
+    },
+    url="https://www.opnfv.org",
+    install_requires=["click"],
+    entry_points={
+        'console_scripts': [
+            'bottlenecks=cli.bottlenecks_cli:main'
+        ],
+    },
 )
+
 
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
-
 
     elif test_level == "teststory":
         config = conf_parser.Parser.story_read("posca", test_name)
     for testcase in config:
-        print(config[testcase])
+        LOG.info("Begin to run %s testcase in POSCA testsuite", testcase)
         posca_testcase_run(testcase, config[testcase])
-    if con_dic["dashboard"] == "y":
-        cmd = '/home/opnfv/bottlenecks/testsuites/posca/testcase_dashboard/\
-system_bandwidth.py'
-        pargs = [INTERPRETER, cmd]
-        LOG.info("\nBegin to establish dashboard.")
-        sub_result = subprocess.Popen(pargs)
-        sub_result.wait()
+        LOG.info("End of %s testcase in POSCA testsuite", testcase)
 
 
 def main():
 
 if __name__ == '__main__':
     main()
-
 
 import time
 import utils.logger as log
 import utils.infra_setup.runner.yardstick as Runner
+from utils.parser import Parser as conf_parser
 # --------------------------------------------------
 # logging configuration
 # --------------------------------------------------
-LOG = log.Logger(__name__)
+LOG = log.Logger(__name__).getLogger()
 
 test_dict = {
     "action": "runTestCase",
     Task_id = Runner.Send_Data(test_dict, con_dic['runner_config'])
     time.sleep(con_dic['test_config']['test_time'])
     Data_Reply = Runner.Get_Reply(con_dic['runner_config'], Task_id)
-    test_date = Data_Reply[con_dic['runner_config']['testcase']][0]
+    test_date = Data_Reply[con_dic['runner_config']['yardstick_testcase']][0]
     return test_date
 
 
     data_return = {}
     data_max = {}
     data_return["throughput"] = 1
+    if con_dic["runner_config"]["yardstick_test_ip"] is None:
+        con_dic["runner_config"]["yardstick_test_ip"] =\
+            conf_parser.ip_parser("yardstick_test_ip")
     for test_x in data["tx_pkt_sizes"]:
         data_max["throughput"] = 1
         bandwidth_tmp = 1
         pre_role_result = cur_role_result
     print("date_id is %d,id return success\n" % date_id)
     return data_return
-
-
-def main():
-    run(con_dic)
-
-
-if __name__ == '__main__':
-    main()
-
 
 import logging
 import os
 
-from utils.parser import Parser as conf
+from utils.parser import Parser as conf_parser
+conf_parser.config_init()
 
 
 class Logger:
             ch.setLevel(logging.INFO)
         self.logger.addHandler(ch)
 
-        result_path = conf.bottlenecks_config["log_dir"]
+        result_path = conf_parser.bottlenecks_config["log_dir"]
         if not os.path.exists(result_path):
             os.makedirs(result_path)
         result_file = os.path.join(result_path, 'bottlenecks.log')
 
 
 import os
 import yaml
+from pyroute2 import IPDB
 
 
 class Parser():
         # TO-DO add cli parameters to stack_config.
         return test_cfg, stack_cfg
 
+    @staticmethod
+    def ip_parser(ip_type):
+        with IPDB() as ip:
+            GATEWAY_IP = ip.routes['default'].gateway
+        if ip_type is "dashboard":
+            TEST_IP = GATEWAY_IP + ":9200"
+        elif ip_type is "yardstick_test_ip":
+            TEST_IP = GATEWAY_IP + ":8888"
+        return TEST_IP
+
 
 class HeatTemplate_Parser():
     """parser a Heat template and a method to deploy template to a stack"""
 
     def get_template_date(self):
         return self.heat_date
-