conf_utils.py 文件源码

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

项目:functest 作者: opnfv 项目源码 文件源码
def generate_test_accounts_file(tenant_id):
    """
    Add needed tenant and user params into test_accounts.yaml
    """

    logger.debug("Add needed params into test_accounts.yaml...")
    accounts_list = [
        {
            'tenant_name':
                CONST.__getattribute__('tempest_identity_tenant_name'),
            'tenant_id': str(tenant_id),
            'username': CONST.__getattribute__('tempest_identity_user_name'),
            'password':
                CONST.__getattribute__('tempest_identity_user_password')
        }
    ]

    with open(TEST_ACCOUNTS_FILE, "w") as f:
        yaml.dump(accounts_list, f, default_flow_style=False)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号