Skip to content

Add command cluster update-peer-clusters - #18

Merged
sijie merged 7 commits into
masterfrom
cluster_updatepeerclusters
Sep 2, 2019
Merged

Add command cluster update-peer-clusters#18
sijie merged 7 commits into
masterfrom
cluster_updatepeerclusters

Conversation

@zymap

@zymap zymap commented Aug 29, 2019

Copy link
Copy Markdown
Member

Master issue: #2

output :

USED FOR:
    This command is used for updating peer clusters.

REQUIRED PERMISSION:
    This command requires super-user permissions.

EXAMPLES:
    #updating the <cluster-name> peer clusters
    pulsarctl clusters update-peer-clusters -p cluster-a,cluster-b <cluster-name>

OUTPUT:
    #normal output
    <cluster-name> peer clusters updated

    #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 update-peer-clusters [flags]

Aliases: update-peer-clusters, upc

Update peer clusters flags:
  -p, --peer-cluster stringArray   Cluster to be registered as a peer-cluster of this cluster

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 update-peer-clusters [command] --help' for more information about a command.

@zymap zymap added this to the 0.0.1 milestone Aug 29, 2019
@zymap
zymap requested review from sijie and wolfstudy August 29, 2019 06:54
@zymap zymap self-assigned this Aug 29, 2019
Comment thread pkg/ctl/cluster/update_peer_clusters.go Outdated
@sijie

sijie commented Sep 2, 2019

Copy link
Copy Markdown
Member

@zymap please rebase this pull request

@zymap
zymap force-pushed the cluster_updatepeerclusters branch from e57a55a to a8eb115 Compare September 2, 2019 04:14
@zymap

zymap commented Sep 2, 2019

Copy link
Copy Markdown
Member Author

@sijie done.

@sijie sijie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

overall looks good. but please improve the output description.

Comment thread pkg/ctl/cluster/update_peer_clusters.go Outdated
out = append(out, successOut)

failOut := pulsar.Output{
Desc: "output of doesn't specified a cluster name",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the description here seems to be a bit weird to me. please talk to Yu or Jennifer to help you improve the output message here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure. @jennifer88huang @Anonymitaet Could you help me to improve the description?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  1. The cluster name is not specified in the output.
    or
  2. The output does not specify a cluster name.
    Option 1 is preferred.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ok, thank you.

@zymap

zymap commented Sep 2, 2019

Copy link
Copy Markdown
Member Author

@sijie @jennifer88huang PTAL.

OUTPUT:
    #output example
    <cluster-name> peer clusters updated

    #the cluster name is not specified or the cluster name is specified more than one
    [✖]  only one argument is allowed to be used as a name

    #the specified cluster does not exist in the broker
    [✖]  code: 404 reason: Cluster does not exist

@sijie
sijie merged commit afbc0ea into master Sep 2, 2019
@sijie
sijie deleted the cluster_updatepeerclusters branch September 2, 2019 18:38
@sijie sijie mentioned this pull request Sep 4, 2019
29 tasks
tisonkun pushed a commit to tisonkun/pulsar-client-go that referenced this pull request Aug 15, 2023
Master issue: streamnative/pulsarctl#2 

output : 

```
USED FOR:
    This command is used for updating peer clusters.

REQUIRED PERMISSION:
    This command requires super-user permissions.

EXAMPLES:
    #updating the <cluster-name> peer clusters
    pulsarctl clusters update-peer-clusters -p cluster-a,cluster-b <cluster-name>

OUTPUT:
    #normal output
    <cluster-name> peer clusters updated

    #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 update-peer-clusters [flags]

Aliases: update-peer-clusters, upc

Update peer clusters flags:
  -p, --peer-cluster stringArray   Cluster to be registered as a peer-cluster of this cluster

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 update-peer-clusters [command] --help' for more information about a command.
```
tisonkun pushed a commit to apache/pulsar-client-go that referenced this pull request Aug 16, 2023
Master issue: streamnative/pulsarctl#2 

output : 

```
USED FOR:
    This command is used for updating peer clusters.

REQUIRED PERMISSION:
    This command requires super-user permissions.

EXAMPLES:
    #updating the <cluster-name> peer clusters
    pulsarctl clusters update-peer-clusters -p cluster-a,cluster-b <cluster-name>

OUTPUT:
    #normal output
    <cluster-name> peer clusters updated

    #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 update-peer-clusters [flags]

Aliases: update-peer-clusters, upc

Update peer clusters flags:
  -p, --peer-cluster stringArray   Cluster to be registered as a peer-cluster of this cluster

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 update-peer-clusters [command] --help' for more information about a command.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants