Exemplo n.º 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,)))
Exemplo n.º 2
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,)))
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 5
0
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
Exemplo n.º 6
0
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
Exemplo n.º 7
0
def start(vm):
    log.info("Starting VM %s", vm)
    return backend.startup_instance(vm)
Exemplo n.º 8
0
def start(vm):
    log.info("Starting VM %s", vm)
    return backend.startup_instance(vm)