import org.onap.vid.model.RequestReferencesContainer
import org.onap.vid.model.serviceInstantiation.BaseResource
import org.onap.vid.mso.RestMsoImplementation
+import org.onap.vid.mso.model.ModelInfo
import org.onap.vid.utils.JACKSON_OBJECT_MAPPER
import org.onap.vid.utils.getEnumFromMapOfStrings
import org.springframework.http.HttpMethod
jobStatus = comulateStatusAndUpdatePropertyIfFinal(jobStatus)
try {
- Logger.debug("job: ${this.javaClass.simpleName} ${sharedData.jobUuid} $actionPhase ${getActionType()} $internalState $jobStatus $childJobs")
+ Logger.debug(EELFLoggerDelegate.debugLogger, "job: ${this.javaClass.simpleName} ${sharedData.jobUuid} $actionPhase ${getActionType()} $internalState $jobStatus $childJobs")
} catch (e:Exception) { /* do nothing. Just failed to log...*/}
if (shallStopJob(jobStatus)) {
}
val (nextActionPhase, nextInternalState) = calcNextInternalState(jobStatus, internalState, actionPhase)
- Logger.debug("next state for job ${sharedData.jobUuid} is $nextInternalState")
+ Logger.debug(EELFLoggerDelegate.debugLogger, "next state for job ${sharedData.jobUuid} is $nextInternalState")
actionPhase = nextActionPhase
internalState = nextInternalState
}
jobStatus = getExternalInProgressStatus()
- Logger.debug("next status for job ${sharedData.jobUuid} is $jobStatus")
+ Logger.debug(EELFLoggerDelegate.debugLogger, "next status for job ${sharedData.jobUuid} is $jobStatus")
// if (internalState.immediate) return call() //shortcut instead of execute another command
return NextCommand(jobStatus, this)
}
handleInProgressStatus(jobStatus)
} catch (e: javax.ws.rs.ProcessingException) {
// Retry when we can't connect MSO during getStatus
- Logger.error(EELFLoggerDelegate.errorLogger, "Cannot get orchestration status for {}, will retry: {}", requestId, e, e)
+ Logger.error("Cannot get orchestration status for {}, will retry: {}", requestId, e, e)
JobStatus.IN_PROGRESS;
} catch (e: InProgressStatusService.BadResponseFromMso) {
inProgressStatusService.handleFailedMsoResponse(sharedData.jobUuid, requestId, e.msoResponse)
JobStatus.IN_PROGRESS
} catch (e: RuntimeException) {
- Logger.error(EELFLoggerDelegate.errorLogger, "Cannot get orchestration status for {}, stopping: {}", requestId, e, e)
+ Logger.error("Cannot get orchestration status for {}, stopping: {}", requestId, e, e)
JobStatus.STOPPED
}
}
return commandParentData.parentData
}
+ protected fun serviceModelInfoFromRequest(): ModelInfo = commandParentData.getModelInfo(CommandParentData.CommandDataKey.SERVICE_MODEL_INFO)
+ protected fun serviceInstanceIdFromRequest(): String = commandParentData.getInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID)
+
protected open fun addMyselfToChildrenData(commandParentData: CommandParentData, request: BaseResource) {
// Nothing by default
}