public_ip_start=PUBLIC_IP_START, public_ip_end=PUBLIC_IP_END, public_netmask=PUBLIC_NETMASK, public_nic=PUBLIC_NIC, public_promisc=PUBLIC_PROMISC, storage_ip_start=STORAGE_IP_START, storage_ip_end=STORAGE_IP_END, storage_netmask=STORAGE_NETMASK, storage_nic=STORAGE_NIC, storage_promisc=STORAGE_PROMISC) print 'set networking config to cluster %s status: %s, resp: %s' % ( cluster_id, status, resp) # set partiton of each host in cluster status, resp = client.set_partition(cluster_id, home_percentage=HOME_PERCENTAGE, tmp_partition_percentage=TMP_PERCENTAGE, var_partition_percentage=VAR_PERCENTAGE) print 'set partition config to cluster %s status: %s, resp: %s' % ( cluster_id, status, resp) # set each host config in cluster. for host_id in host_ids: if ROLES_LIST: roles = ROLES_LIST.pop(0) else: roles = [] status, resp = client.update_host_config(host_id, hostname='%s%s' % (HOST_NAME_PREFIX, host_id), roles=roles) print 'set roles to host %s status: %s, resp: %s' % (host_id, status, resp)
public_gateway=PUBLIC_IP_GATEWAY, public_promisc=PUBLIC_PROMISC, storage_ip_start=STORAGE_IP_START, storage_ip_end=STORAGE_IP_END, storage_netmask=STORAGE_NETMASK, storage_nic=STORAGE_NIC, storage_gateway=STORAGE_IP_GATEWAY, storage_promisc=STORAGE_PROMISC) print 'set networking config to cluster %s status: %s, resp: %s' % ( cluster_id, status, resp) # set partiton of each host in cluster status, resp = client.set_partition( cluster_id, home_percentage=HOME_PERCENTAGE, tmp_percentage=TMP_PERCENTAGE, var_percentage=VAR_PERCENTAGE) print 'set partition config to cluster %s status: %s, resp: %s' % ( cluster_id, status, resp) # set each host config in cluster. ROLES_LIST = [PRESET_VALUES['ROLES_LIST'].split()] for host_id in host_ids: if ROLES_LIST: roles = ROLES_LIST.pop(0) else: roles = [] status, resp = client.update_host_config( host_id, hostname='%s%s' % (HOST_NAME_PREFIX, host_id),