Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIFI-13950 - NiFi CLI - add commands to list branch, bucket, flows, versions through NiFi API #9473

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

pvillard31
Copy link
Contributor

@pvillard31 pvillard31 commented Oct 30, 2024

Summary

NIFI-13950 - NiFi CLI - add commands to list branch, bucket, flows, versions through NiFi for Registry Clients

Currently, the CLI only provides access to branches / buckets / flows and versions via the use of cli.sh registry ... which only works when using the NiFi Registry.

Now that Registry Client is an extension point and that we have additional implementations, we should provide CLI commands to provide read-only access through a given registry client for listing branches / buckets / flows and versions. This will help users when they want to import a given flow with cli.sh nifi pg-import .... In particular when it relates to versions because, when using a GitHub Registry Client, the version is a commit ID and it might not always be easy to retrieve / provide.

./bin/cli.sh nifi list-branches -p nifi-cli.properties -rcid dd0aa635-0192-1000-2ee5-eb1ccc20d5c3

#   Name
-   ----
1   dev
2   main
./bin/cli.sh nifi list-buckets -p nifi-cli.properties -rcid dd0aa635-0192-1000-2ee5-eb1ccc20d5c3 -fb main

#   Name      Id        Description
-   -------   -------   -----------
1   bucket1   bucket1
./bin/cli.sh nifi list-flows -p nifi-cli.properties -rcid dd0aa635-0192-1000-2ee5-eb1ccc20d5c3 -fb main -b bucket1

#   Name   Id     Description
-   ----   ----   -----------
1   test   test
./bin/cli.sh nifi list-flow-versions -p nifi-cli.properties -rcid dd0aa635-0192-1000-2ee5-eb1ccc20d5c3 -fb main -b bucket1 -f test

#   Version ID                                 Date                           Author       Message
-   ----------------------------------------   ----------------------------   ----------   -------------------------
1   3a15c8efa2b39adcfddb14611d1b5f14de122db0   Tue, Sept 10 2024 22:29 CEST   pvillard31   test
2   f9a09d02c5f20198a1d33567bcc53364e58d1eb9   Tue, Sept 10 2024 22:56 CEST   pvillard31   added processor
3   6ae0a1f83b32db1f788ef5020cc40d4413a61aaf   Thu, Sept 12 2024 14:21 CEST   pvillard31   Saving Flow Snapshot test
4   5f70b6f374a8013270e3ae3ab36f25d9576dacfc   Mon, Sept 16 2024 16:15 CEST   pvillard31   Saving Flow Snapshot test
5   7b3c17203e1563bb1759f7c540ac85247b4e7f17   Tue, Sept 17 2024 13:17 CEST   pvillard31   Saving Flow Snapshot test
6   7cfed33af8e6670cdf86424f632ed9bee4d9415f   Tue, Sept 17 2024 14:48 CEST   pvillard31   Saving Flow Snapshot test
7   a4b25e6c23ee6de53fdd54d6d2dae09af2292ff6   Fri, Sept 27 2024 11:25 CEST   pvillard31   Saving Flow Snapshot test
8   871acd74da8e997d4025ba8209e36ba170917f7e   Thu, Oct 03 2024 15:42 CEST    pvillard31   Saving Flow Snapshot test

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 21

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@pvillard31
Copy link
Contributor Author

Rebased after the merge of #9522

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these additional flow version commands @pvillard31, the latest version looks good. +1 merging

@exceptionfactory exceptionfactory merged commit 3508560 into apache:main Nov 19, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants