Ejemplo n.º 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)
Ejemplo n.º 2
0
def add_dvs(args):
    vc = _get_vc()
    dc = operations.get_datacenter(vc, args.dc_name)
    dvs_name = args.dvs_name
    target_hosts_str = args.target_hosts
    nic_index = args.nic_item
    pgs_pair = args.pg_pairs.split(',')
    operations.create_dvs(vc, dc, dvs_name, nic_index, target_hosts_str,
                          pgs_pair)
Ejemplo n.º 3
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)
Ejemplo n.º 4
0
def add_dc(args):
    vc = _get_vc()
    dc_names = args.dc_names.strip().split(',')
    for dc_name in dc_names:
        operations.get_datacenter(vc, dc_name)