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
评论列表
文章目录