Example #1
0
def install_single_server(request):
    print 'begin install single server'
    id = request.data['id']
    server.objects.filter(id=id).update(install_bs=True)
    serverComponents = common.getServerComponents(id)
    conf = []
    single_conf = common.generate_conf(serverComponents)
    conf.append(single_conf)
    common.install_components(conf)
Example #2
0
def install_cluster_server(request):
    print 'begin install cluster server'
    cluster_name = request.data['cluster_name']
    server.objects.filter(cluster_name=cluster_name).update(install_bs=True)
    conf = []
    cluster_server = server.objects.filter(cluster_name=cluster_name)
    if cluster_server!=[] and len(cluster_server)>0:
        for item in cluster_server:
            serverComponents = common.getServerComponents(item.id)
            single_conf = common.generate_conf(serverComponents)
            conf.append(single_conf)
    common.install_components(conf)
Example #3
0
def get_single_server_finish(request):
    id = request.data['id']
    serverComponents = common.getServerComponents(id)
    returnData = common.get_single_server_finish(serverComponents)
    return Response(returnData)
Example #4
0
def get_single_server_components(request):
    id = request.data['id']
    serverDTO = common.getServerComponents(id)
    return Response(serverDTO)