public interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
Modifier and Type | Method and Description |
---|---|
void |
executeForFailure(org.jboss.dmr.ModelNode operation,
InputStream... inputStreams)
Execute an operation in the model controller, expecting failure.
|
org.jboss.dmr.ModelNode |
executeForResult(org.jboss.dmr.ModelNode operation,
InputStream... inputStreams) |
org.jboss.dmr.ModelNode |
executeOperation(org.jboss.dmr.ModelNode operation,
InputStream... inputStreams)
Execute an operation in the model controller
|
org.jboss.dmr.ModelNode |
executeOperation(org.jboss.dmr.ModelNode operation,
ModelController.OperationTransactionControl txControl) |
org.jboss.dmr.ModelNode |
executeOperation(ModelVersion modelVersion,
OperationTransformer.TransformedOperation op)
Execute an operation in the controller containg the passed in version of the subsystem.
|
Throwable |
getBootError()
Get any errors thrown on boot
|
org.jboss.msc.service.ServiceContainer |
getContainer()
Gets the service container
|
T |
getLegacyServices(ModelVersion modelVersion)
Gets the legacy controller services for the controller containing the passed in model version
|
String |
getPersistedSubsystemXml()
Reads the persisted subsystem xml
|
ImmutableManagementResourceRegistration |
getRootRegistration() |
boolean |
isSuccessfulBoot()
Get whether the controller booted successfully
|
org.jboss.dmr.ModelNode |
readTransformedModel(ModelVersion modelVersion)
Transforms the model to the legacy subsystem model version
|
org.jboss.dmr.ModelNode |
readWholeModel()
Reads the whole model from the model controller without aliases or runtime attributes/resources
|
org.jboss.dmr.ModelNode |
readWholeModel(boolean includeAliases)
Reads the whole model from the model controller without runtime attributes/resources
|
org.jboss.dmr.ModelNode |
readWholeModel(boolean includeAliases,
boolean includeRuntime)
Reads the whole model from the model controller
|
void |
shutdown() |
OperationTransformer.TransformedOperation |
transformOperation(ModelVersion modelVersion,
org.jboss.dmr.ModelNode operation)
Transforms an operation in the main controller to the format expected by the model controller containing
the legacy subsystem
|
OperationTransformer.TransformedOperation |
transformOperation(ModelVersion modelVersion,
org.jboss.dmr.ModelNode operation,
TransformerOperationAttachment attachment)
Transforms an operation in the main controller to the format expected by the model controller containing
the legacy subsystem
|
void |
validateOperation(org.jboss.dmr.ModelNode operation)
Validates the operation against the description providers in the model controller
|
void |
validateOperations(List<org.jboss.dmr.ModelNode> operations)
Validates the operations against the description providers in the model controller
|
boolean isSuccessfulBoot()
Throwable getBootError()
T getLegacyServices(ModelVersion modelVersion)
modelVersion
- the model version of the legacy model controllerIllegalStateException
- if this is not the test's main model controllerIllegalStateException
- if there is no legacy controller containing the versionOperationTransformer.TransformedOperation transformOperation(ModelVersion modelVersion, org.jboss.dmr.ModelNode operation) throws OperationFailedException
modelVersion
- the subsystem model version of the legacy subsystem model controlleroperation
- the operation to transformIllegalStateException
- if this is not the test's main model controllerOperationFailedException
OperationTransformer.TransformedOperation transformOperation(ModelVersion modelVersion, org.jboss.dmr.ModelNode operation, TransformerOperationAttachment attachment) throws OperationFailedException
modelVersion
- the subsystem model version of the legacy subsystem model controlleroperation
- the operation to transformattachment
- attachments propagated from the operation context to the created transformer context.
This may be null
. In a non-test scenario, this will be added by operation handlers
triggering the transformation, but for tests this needs to be hard-coded. Tests will need to
ensure themselves that the relevant attachments get set.IllegalStateException
- if this is not the test's main model controllerOperationFailedException
org.jboss.dmr.ModelNode readTransformedModel(ModelVersion modelVersion)
modelVersion
- the target legacy subsystem model versionIllegalStateException
- if this is not the test's main model controllerorg.jboss.dmr.ModelNode executeOperation(ModelVersion modelVersion, OperationTransformer.TransformedOperation op)
modelVersion
- the subsystem model version of the legacy subsystem model controllerop
- the operation for the main controllerIllegalStateException
- if this is not the test's main model controllerIllegalStateException
- if there is no legacy controller containing the version of the subsystemorg.jboss.dmr.ModelNode readWholeModel()
org.jboss.dmr.ModelNode readWholeModel(boolean includeAliases)
includeAliases
- whether to include aliasesorg.jboss.dmr.ModelNode readWholeModel(boolean includeAliases, boolean includeRuntime)
includeAliases
- whether to include aliasesincludeRuntime
- whether to include runtime attributes/resourcesorg.jboss.msc.service.ServiceContainer getContainer()
org.jboss.dmr.ModelNode executeOperation(org.jboss.dmr.ModelNode operation, InputStream... inputStreams)
operation
- the operation to executeinputStreams
- Input Streams for the operationorg.jboss.dmr.ModelNode executeOperation(org.jboss.dmr.ModelNode operation, ModelController.OperationTransactionControl txControl)
org.jboss.dmr.ModelNode executeForResult(org.jboss.dmr.ModelNode operation, InputStream... inputStreams) throws OperationFailedException
OperationFailedException
void executeForFailure(org.jboss.dmr.ModelNode operation, InputStream... inputStreams)
operation
- the operation to executeString getPersistedSubsystemXml()
void validateOperations(List<org.jboss.dmr.ModelNode> operations)
operations
- the operations to validatevoid validateOperation(org.jboss.dmr.ModelNode operation)
operation
- the operation to validatevoid shutdown()
ImmutableManagementResourceRegistration getRootRegistration()
Copyright © 2023 JBoss by Red Hat. All rights reserved.