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)
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)