Revision bbae3e45 snf-cyclades-app/synnefo/logic/backend.py

b/snf-cyclades-app/synnefo/logic/backend.py
572 572

  
573 573
def reboot_instance(vm, reboot_type):
574 574
    assert reboot_type in ('soft', 'hard')
575
    kwargs = {"instance": vm.backend_vm_id,
576
              "reboot_type": "hard"}
577
    # XXX: Currently shutdown_timeout parameter is not supported from the
578
    # Ganeti RAPI. Until supported, we will fallback for both reboot types
579
    # to the default shutdown timeout of Ganeti (120s). Note that reboot
580
    # type of Ganeti job must be always hard. The 'soft' and 'hard' type
581
    # of OS API is different from the one in Ganeti, and maps to
582
    # 'shutdown_timeout'.
583
    #if reboot_type == "hard":
584
    #    kwargs["shutdown_timeout"] = 0
585
    if settings.TEST:
586
        kwargs["dry_run"] = True
575 587
    with pooled_rapi_client(vm) as client:
576
        return client.RebootInstance(vm.backend_vm_id, reboot_type,
577
                                     dry_run=settings.TEST)
588
        return client.RebootInstance(**kwargs)
578 589

  
579 590

  
580 591
def startup_instance(vm):

Also available in: Unified diff