return resource; //no need to transform
}
log.debug("transforming subsystem: " + subsystem + ", to model version: " + subsystemVersions.get(subsystemName));
SubsystemTransformer transformer = extensionRegistry.getTransformerRegistry().getSubsystemTransformer(subsystemName, major, minor);
if (transformer != null) {
ResourceDefinition rd = TransformerRegistry.loadSubsystemDefinition(subsystemName, major, minor);
ManagementResourceRegistration targetDefinition = ManagementResourceRegistration.Factory.create(rd);
ModelNode fullSubsystemModel = Resource.Tools.readModel(resource);
ModelNode transformed = transformer.transformModel(null, fullSubsystemModel);
return TransformerRegistry.modelToResource(targetDefinition, transformed);
} else { //for now no default subsystem transformer