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)
        if job_status == rapi.JOB_STATUS_SUCCESS:
            quotas.accept_resource_serial(vm)
        elif job_status in [rapi.JOB_STATUS_ERROR, rapi.JOB_STATUS_CANCELED]:
            log.debug("Job %s failed. Rejecting related serial %s", job_id,
                      serial)
 
    # Special case: if OP_INSTANCE_CREATE fails --> ERROR
    if opcode == 'OP_INSTANCE_CREATE' and status in (rapi.JOB_STATUS_CANCELED,
                                                     rapi.JOB_STATUS_ERROR):
        new_operstate = "ERROR"
        back_network.operstate = state_for_success
 
    if (status in (rapi.JOB_STATUS_CANCELED, rapi.JOB_STATUS_ERROR)
       and opcode == 'OP_NETWORK_ADD'):
        back_network.operstate = 'ERROR'