Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/logic/backend.py   synnefo(Download)
        # failed server
        serial = vm.serial
        if job_status == rapi.JOB_STATUS_SUCCESS:
        elif job_status in [rapi.JOB_STATUS_ERROR, rapi.JOB_STATUS_CANCELED]:
            log.debug("Job %s failed. Rejecting related serial %s", job_id,
    elif job_status == rapi.JOB_STATUS_SUCCESS:
    state_for_success = VirtualMachine.OPER_STATE_FROM_OPCODE.get(opcode)
    if status == rapi.JOB_STATUS_SUCCESS:
        if state_for_success is not None:
            new_operstate = state_for_success
        # when no instance exists at the Ganeti backend.
        # See ticket #799 for all the details.
        if (status == rapi.JOB_STATUS_SUCCESS or
           (status == rapi.JOB_STATUS_ERROR and not vm_exists_in_backend(vm))):
            # server has been deleted, so delete the server's attachments
            new_operstate = state_for_success
            vm.backendtime = etime
            status = rapi.JOB_STATUS_SUCCESS
    if status in rapi.JOB_STATUS_FINALIZED: