Package com.suse.coco.module.snpguest
Class SNPGuestWorker
java.lang.Object
com.suse.coco.module.snpguest.SNPGuestWorker
- All Implemented Interfaces:
AttestationWorker
Worker class for verifying the reports with SNPGuest
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final VerificationDirectoryProviderprivate static final intprivate static final org.apache.logging.log4j.Loggerprivate final StringBuilderprivate final com.suse.common.io.ByteSequenceFinderprivate final AbstractSNPGuestWrapper -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SNPGuestWorker(VerificationDirectoryProvider directoryProviderIn, AbstractSNPGuestWrapper abstractSnpGuestWrapperIn, com.suse.common.io.ByteSequenceFinder sequenceFinderIn) Constructor with explicit dependencies, for unit test only. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidappendError(String message) private voidappendError(String message, ProcessOutput processOutput) private voidappendError(String message, Exception ex) private voidappendOutput(String message, ProcessOutput processOutput) private voidappendSuccess(String message) private voidappendSuccess(String message, ProcessOutput output) private static StringgetProcessOutputDetails(ProcessOutput processOutput) booleanprocess(org.apache.ibatis.session.SqlSession session, AttestationResult result) Process the given attestation result.
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
INDENT_SIZE
private static final int INDENT_SIZE- See Also:
-
directoryProvider
-
snpGuest
-
sequenceFinder
private final com.suse.common.io.ByteSequenceFinder sequenceFinder -
outputBuilder
-
-
Constructor Details
-
SNPGuestWorker
public SNPGuestWorker()Default constructor. -
SNPGuestWorker
SNPGuestWorker(VerificationDirectoryProvider directoryProviderIn, AbstractSNPGuestWrapper abstractSnpGuestWrapperIn, com.suse.common.io.ByteSequenceFinder sequenceFinderIn) Constructor with explicit dependencies, for unit test only.- Parameters:
directoryProviderIn- the verification directory providerabstractSnpGuestWrapperIn- the snpguest executorsequenceFinderIn- the byte sequence finder
-
-
Method Details
-
process
Description copied from interface:AttestationWorkerProcess the given attestation result.- Specified by:
processin interfaceAttestationWorker- Parameters:
session- the active mybatis database sessionresult- the attestation result to process.- Returns:
trueif the processing succeeded,falseotherwise.
-
appendError
-
appendError
-
appendError
-
appendSuccess
-
appendSuccess
-
appendOutput
-
getProcessOutputDetails
-