예제 #1
0
def vm_start(request, vm_id):
    logging.info("VM %s start by %s", vm_id, request.user_uniq)
    vm = VirtualMachine.objects.get(pk=vm_id)
    servers.start_action(vm, 'START')
    servers_backend.startup_instance(vm)
    account = vm.userid
    return HttpResponseRedirect(reverse('helpdesk-details', args=(account,)))
예제 #2
0
파일: views.py 프로젝트: cstavr/synnefo
def vm_start(request, vm_id):
    logging.info("VM %s start by %s", vm_id, request.user_uniq)
    vm = VirtualMachine.objects.get(pk=vm_id)
    servers.start_action(vm, 'START')
    servers_backend.startup_instance(vm)
    account = vm.userid
    return HttpResponseRedirect(reverse('helpdesk-details', args=(account,)))
예제 #3
0
def start(request, vm, args):
    # Normal Response Code: 202
    # Error Response Codes: serviceUnavailable (503),
    #                       itemNotFound (404)

    log.info("Start VM %s", vm)
    if args:
        raise faults.BadRequest('Malformed Request.')
    backend.startup_instance(vm)
    return HttpResponse(status=202)
예제 #4
0
def start(request, vm, args):
    # Normal Response Code: 202
    # Error Response Codes: serviceUnavailable (503),
    #                       itemNotFound (404)

    log.info("Start VM %s", vm)
    if args:
        raise faults.BadRequest('Malformed Request.')
    backend.startup_instance(vm)
    return HttpResponse(status=202)
예제 #5
0
파일: servers.py 프로젝트: vgerak/synnefo
def start(server_id, credentials, atomic_context=None):
    with commands.ServerCommand("START", server_id, credentials,
                                atomic_context) as vm:
        log.info("Starting VM %s", vm)
        job_id = backend.startup_instance(vm)
        vm.record_job(job_id)
        return vm
예제 #6
0
파일: servers.py 프로젝트: grnet/synnefo
def start(server_id, credentials, atomic_context=None):
    with commands.ServerCommand(
            "START", server_id, credentials, atomic_context) as vm:
        log.info("Starting VM %s", vm)
        job_id = backend.startup_instance(vm)
        vm.record_job(job_id)
        return vm
예제 #7
0
def start(vm):
    log.info("Starting VM %s", vm)
    return backend.startup_instance(vm)
예제 #8
0
def start(vm):
    log.info("Starting VM %s", vm)
    return backend.startup_instance(vm)