8000 argument completion for gateway subcommands by mu853 · Pull Request #28 · hichtakk/nsxctl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

argument completion for gateway subcommands #28

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

Merged
merged 1 commit into from
Jul 24, 2022

Conversation

mu853
Copy link
Contributor
@mu853 mu853 commented Jul 23, 2022

This is experimental and a suggestion for auto-completion of arguments.
I hope you give it a try.

To complete arg with api results, such as Tier-0 Gateway name, we need to login to the site (NSX-T/ALB) before the completion process.
So I moved the login process to the first subcommand (show, top, etc.) so that the ValidArgsFunction of these subcommands can get the api results to complete.
Also, this eliminates the need for subcommand login/logout in PreRun/PostRun.

@hichtakk hichtakk merged commit 298bfe9 into hichtakk:main Jul 24, 2022
@hichtakk
Copy link
Owner

fantastic!

@hichtakk hichtakk mentioned this pull request Jul 25, 2022
hichtakk added a commit that referenced this pull request Jul 25, 2022
@mu853 mu853 mentioned this pull request Jul 25, 2022
@mu853 mu853 deleted the feature-show-route-completion branch July 28, 2022 21:55
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
0