refstack_client.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:functest 作者: opnfv 项目源码 文件源码
def run_defcore_default(self):
        """Run default defcore sys command."""
        options = ["-v"] if not self.insecure else ["-v", self.insecure]
        cmd = (["refstack-client", "test", "-c", self.confpath] +
               options + ["--test-list", self.defcorelist])
        LOGGER.info("Starting Refstack_defcore test case: '%s'.", cmd)

        with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
                               "environment.log"), 'w+') as f_env:
            f_env.write(
                ("Refstack environment:\n"
                 "  SUT: {}\n  Scenario: {}\n  Node: {}\n  Date: {}\n").format(
                    CONST.__getattribute__('INSTALLER_TYPE'),
                    CONST.__getattribute__('DEPLOY_SCENARIO'),
                    CONST.__getattribute__('NODE_NAME'),
                    time.strftime("%a %b %d %H:%M:%S %Z %Y")))

        with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
                               "refstack.log"), 'w+') as f_stdout:
            subprocess.call(cmd, shell=False, stdout=f_stdout,
                            stderr=subprocess.STDOUT)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号