List<ModelNode> operations = builder.parseXmlResource("subsystem-jgroups-transform-reject.xml");
ModelTestUtils.checkFailedTransformedBootOperations(services, version, operations, createFailedOperationTransformationConfig(version));
}
private static FailedOperationTransformationConfig createFailedOperationTransformationConfig(ModelVersion version) {
FailedOperationTransformationConfig config = new FailedOperationTransformationConfig();
PathAddress subsystemAddress = PathAddress.pathAddress(JGroupsSubsystemResourceDefinition.PATH);
if (JGroupsModel.VERSION_3_0_0.requiresTransformation(version)) {
config.addFailedAttribute(subsystemAddress, new NewAttributesConfig(JGroupsSubsystemResourceDefinition.DEFAULT_CHANNEL));
config.addFailedAttribute(subsystemAddress.append(ChannelResourceDefinition.WILDCARD_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
}
if (JGroupsModel.VERSION_2_0_0.requiresTransformation(version)) {
PathAddress stackAddress = subsystemAddress.append(StackResourceDefinition.WILDCARD_PATH);
PathAddress relayAddress = stackAddress.append(RelayResourceDefinition.PATH);
config.addFailedAttribute(relayAddress, FailedOperationTransformationConfig.REJECTED_RESOURCE);
config.addFailedAttribute(relayAddress.append(RemoteSiteResourceDefinition.WILDCARD_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
}
return config;
}