This guide is work in progress
Transformers are mechanism used in domain mode, to support scenarios where you have host controllers (HC) joined to domain controller (DC) running different version of subsystem (server).
When HC registers itself against DC and it is running different version of some subsystem that is present on DC, DC performs transformation of model (ModelTransformer) and sends it back to HC as configuration it has too run.
Also when operations are performed on DC, for example call ADD for some resource, DC also transforms that operation (OperationTransformer) into target version of HC.
Transformers are primarily used for upgrade migration paths. General idea behind this migration period is that there are numerous HC and one DC deployed. First, DC is upgraded. Afterwards, HC are upgraded in steps as needed without breaking configuration.
When Host controller registers to Domain Controller. HC does not know about conversions, they are done on DC as follows:
- HC -> connect -> DC
- HC <- list of subsystems to sent supported versions for <- DC
- HC -> list of supported versions for requested subsystems -> DC
- transformations happen on DC
- HC <- complete model in supported model versions <- DC
When model in your subsystem has changed in incompatible way.
Rule of thumb would be if current model is applied to previous version of subsystem model would it work? If not, model version must be increased and transformers implemented.
Model transformer, works on top of current model and transforms its model to target version.
Operation transformer works on top of operations instead of model.
There is testing framework in place for testing proper behavior of transformers