Revision bbae3e45 snf-cyclades-app/synnefo/api/servers.py

b/snf-cyclades-app/synnefo/api/servers.py
733 733
    #                       buildInProgress (409),
734 734
    #                       overLimit (413)
735 735

  
736
    reboot_type = args.get("type")
737
    if reboot_type is None:
738
        raise faults.BadRequest("Missing 'type' attribute.")
739
    elif reboot_type not in ["SOFT", "HARD"]:
736
    reboot_type = args.get("type", "SOFT")
737
    if reboot_type not in ["SOFT", "HARD"]:
740 738
        raise faults.BadRequest("Invalid 'type' attribute.")
741 739
    vm = servers.reboot(vm, reboot_type=reboot_type)
742 740
    return HttpResponse(status=202)

Also available in: Unified diff