Closed aperepel closed 6 years ago
Ok, so I took a stab at implementing this, but quickly came to a conclusion we would need some refactoring to have more reusable actions and decouple the action and output printer more. E.g. I ended up copying a lot of action code to implement a logical sequence like:
@aperepel I want to clarify a couple of things to make sure I understand the functionality...
So user runs a command like:
quick-import -i http://foo.com/flow.json
Behind the scenes this:
Does that seem correct? Just want to make sure I get the right idea while trying to think about how to support this.
Yes, here are the assumptions:
QuickImport-<millistimestamp>
(so it can be sorted easily). Description like Auto-import on (full date) from (source URL).Got a version of this working in master, quite fun to play with :)
For now I introduced a new group called "demo" where we can put other macro commands, but if we don't like that we can either rename that group, or move the command to top-level under no group.
demo quick-import -i https://gist.githubusercontent.com/aperepel/3653bd359740519efe373a65d0d94db4/raw/af8af15d1ac375be8bedbe9e2f66adef471bb678/test_flow.json
Capturing some ideas here to have a place to discuss them. Here's what I envision.
As a user, I want to copy a public URL of the flow json (e.g. Gist) and have it up and running in my NiFi instance with next to no additional steps
Assumptions:
QuickImport
bucket, and the flow object will have the QuickImport-QuickImport
bucket is just a convention, but we may consider giving it some special protected meaning in the NiFi registry in the future.