Closed aperepel closed 6 years ago
I think it makes sense to just print the ids for the create operations.
On the registry side the returned entities have a concept of self link, would it make sense to return that? An example would be:
nifi-reg create-bucket ... buckets/{bucketId}
nifi-reg create-flow ... buckets/{bucketId}/flows/{flowId}
nifi-reg import-flow-version ... buckets/{bucketId}/flows/{flowId}/versions/{versionNumber}
Or does it make more sense to just stick with a single value?
nifi-reg create-bucket ... {bucketId}
nifi-reg create-flow ... {flowId}
nifi-reg import-flow-version ... {versionNumber}
I would stick to a single value, less parsing work for responses consumer.
On Sun, Feb 4, 2018, 1:50 PM Bryan Bende notifications@github.com wrote:
I think it makes sense to just print the ids for the create operations.
On the registry side the returned entities have a concept of self link, would it make sense to return that? An example would be:
nifi-reg create-bucket ... buckets/{bucketId}
nifi-reg create-flow ... buckets/{bucketId}/flows/{flowId}
nifi-reg import-flow-version ... buckets/{bucketId}/flows/{flowId}/versions/{versionNumber}
Or does it make more sense to just stick with a single value?
nifi-reg create-bucket ... {bucketId}
nifi-reg create-flow ... {flowId}
nifi-reg import-flow-version ... {versionNumber}
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bbende/nifi/issues/20#issuecomment-362929834, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHSR-MItCNNSwwuQiMl1vVTbL7RX0fGks5tRfvlgaJpZM4R4TgN .
Sounds good, the commit I pushed has the single value approach, closing this.
The use case is automation/scripting. We don't need
Successfully created XYZ with ID: blah
in the output.Consider either printing a single line with the ID or printing a json structure with any required additional info. Just printing an ID makes sense for the create operation (a la RESTful service), and also makes it easier to copy/paste in the interactive shell vs selecting it within verbose output.
Could add some
--json
arg to convert every output into machine-parseable ones. Yes, very much like SVN did at the time :)