Skip to content

Conversation

@zymap
Copy link
Member

@zymap zymap commented Sep 3, 2019

Master issue: #2

The pull requests add all tenant commands.

@sijie sijie mentioned this pull request Sep 4, 2019
29 tasks
@zymap zymap changed the title [WIP] Add tenants related commands Add tenants related commands Sep 4, 2019
@zymap zymap added this to the 0.0.1 milestone Sep 4, 2019
@zymap zymap requested review from sijie and wolfstudy September 4, 2019 10:16
@sijie sijie added area/pulsar/tenants type/task Indicates a chore or a small item of work labels Sep 4, 2019
assert.False(t, strings.Contains(out.String(), "delete-tenant-test"))
}

func TestDeleteTenantArgsError(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

please add test case to cover deleting a non-existent tenant

return vc.NameError
}

if data.AllowedClusters == nil && data.AdminRoles == nil {
Copy link
Member

Choose a reason for hiding this comment

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

Is this really needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

umm, I think if you don't want to change anything so why you want to execute update tenant.

Copy link
Member

Choose a reason for hiding this comment

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

a user can remove all the allowed clusters and admin roles by specifying empty list of allowed clusters and roles, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

update      Updates the configuration for a tenant
      Usage: update [options] tenant-name
        Options:
          --admin-roles, -r
             Comma separated list of auth principal allowed to administrate the
             tenant. If empty the current set of roles won't be modified
          --allowed-clusters, -c
             Comma separated allowed clusters. If omitted, the current set of
             clusters will be preserved

I used java admin to test but there is no changes with an empty list.

func deleteTenantCmd(vc *cmdutils.VerbCmd) {
var desc pulsar.LongDescription

desc.CommandUsedFor = "This command is used for deleting a tenant and all namespaces and topics under it will be deleted."
Copy link
Member

Choose a reason for hiding this comment

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

two questions here:

  1. does pulsar allow deleting a non-empty tenant?
  2. do we have a test case to cover the case?

@sijie
Copy link
Member

sijie commented Sep 7, 2019

@zymap it seems that my comment regarding deleting a non-empty tenant is not addressed. PTAL and make sure you have responded to all my comments.

@sijie sijie merged commit 798b86d into master Sep 9, 2019
@sijie sijie deleted the tenant_create branch September 9, 2019 06:44
tisonkun pushed a commit to tisonkun/pulsar-client-go that referenced this pull request Aug 15, 2023
Master issue: streamnative/pulsarctl#2 

The pull requests add all tenant commands.
tisonkun pushed a commit to apache/pulsar-client-go that referenced this pull request Aug 16, 2023
Master issue: streamnative/pulsarctl#2 

The pull requests add all tenant commands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/pulsar/tenants type/task Indicates a chore or a small item of work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants