-
Notifications
You must be signed in to change notification settings - Fork 70
Add command cluster delete
#8
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments
pkg/ctl/cluster/get.go
Outdated
| desc := pulsar.LongDescription{} | ||
| desc.CommandUsedFor = "This command is used for getting the cluster data of the specified cluster." | ||
| desc.CommandPermission = "This command requires super-user permissions." | ||
| desc.CommandPermission = "All users can use." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two problems here:
-
whenever you are changing the logic, please write the change in the description of the pull request. otherwise no one knows why you are making this change.
-
this command requires super user permissions: https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java#L118
Master issue: #2 closes #8 Output: ``` ➜ pulsarctl git:(clusters_delete) ./pulsarctl clusters delete -h USED FOR: This command is used for deleting an existing cluster. REQUIRED PERMISSION: This command requires super-user permissions. EXAMPLES: #deleting the cluster named <cluster-name> pulsarctl clusters delete <cluster-name> OUTPUT: #normal output Cluster <cluster-name> delete successfully. #output of doesn't specified a cluster name only one argument is allowed to be used as a name #output of cluster doesn't exist [✖] code: 404 reason: Cluster does not exist Usage: pulsarctl clusters delete [flags] Aliases: delete, delete Common flags: -s, --admin-service-url string The admin web service url that pulsarctl connects to. (default "http://localhost:8080") -C, --color string toggle colorized logs (true,false,fabulous) (default "true") -h, --help help for this command -v, --verbose int set log level, use 0 to silence, 4 for debugging (default 3) Use 'pulsarctl clusters delete [command] --help' for more information about a command. ```
Master issue: #2
Output: