bbende / nifi

Mirror of Apache NiFi
Apache License 2.0
1 stars 1 forks source link

Create a 'convert from template' command #46

Open aperepel opened 6 years ago

aperepel commented 6 years ago

Wanted to put this idea up. Going from a legacy xml template to a versioned json is a very tedious process (I tried this with a couple examples from the Apache wiki).

It would be a better place to put this functionality in the toolkit. If we need to upload template, instantiate it, start version control, export, then at least it will be a good candidate for another macro command.

bbende commented 6 years ago

I'm not planning to do anything with templates for the initial version, but it is a good idea and something we can add. Currently there are no commands related to templates so to even get to the macro command you need to implement the Jersey client methods for upload and instantiate template, and then the corresponding commands.

Technically I think the back-end code already exists to take a TemplateDTO to a ProcessGroup, and then a ProcessGroup to a VersionedProcessGroup, but its all part of NiFi framework and not really resuable by the CLI. So I think your approach is probably the only option.