generate_fake_data.py 文件源码

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

项目:craton 作者: openstack 项目源码 文件源码
def make_hosts(region, cell):
    # no of hosts need to match ip_address available
    no_of_hosts = 2
    cab1 = region + "." + cell + "." + "C-1"
    cab2 = region + "." + cell + "." + "C-2"

    hosts = []
    for host in range(no_of_hosts):
        hostname = "host%s.%s.example1.com" % (host, cab1)
        hosts.append(hostname)

    for host in range(no_of_hosts):
        hostname = "host%s.%s.example2.com" % (host, cab2)
        hosts.append(hostname)

    return hosts
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号