예제 #1
0
def add_cluster(args):
    vc = _get_vc()
    dc = operations.get_datacenter(vc, args.dc_name)
    cluster_names = args.cluster_names.strip().split(',')
    services = args.service_names
    for cluster_name in cluster_names:
        operations.create_cluster(dc, cluster_name.strip(), services)
예제 #2
0
def add_host(args):
    vc = _get_vc()
    dc = operations.get_datacenter(vc, args.dc_name)
    cluster = operations.create_cluster(dc, args.cluster_name)
    operations.add_hosts_to_cluster(vc, cluster, args.host_user, args.host_pwd,
                                    args.host_names)