Browse Source

Merge pull request #5760 from gyuho/peer-urls

*: change ctlv3 flag peerURLs to 'peer-urls'
Gyu-Ho Lee 9 years ago
parent
commit
9664df1b5e
3 changed files with 8 additions and 8 deletions
  1. 2 2
      e2e/ctl_v3_member_test.go
  2. 4 4
      etcdctl/README.md
  3. 2 2
      etcdctl/ctlv3/command/member_command.go

+ 2 - 2
e2e/ctl_v3_member_test.go

@@ -106,7 +106,7 @@ func ctlV3MemberRemove(cx ctlCtx, memberID, clusterID string) error {
 
 
 func memberAddTest(cx ctlCtx) {
 func memberAddTest(cx ctlCtx) {
 	peerURL := fmt.Sprintf("http://localhost:%d", etcdProcessBasePort+11)
 	peerURL := fmt.Sprintf("http://localhost:%d", etcdProcessBasePort+11)
-	cmdArgs := append(cx.PrefixArgs(), "member", "add", "newmember", fmt.Sprintf("--peerURLs=%s", peerURL))
+	cmdArgs := append(cx.PrefixArgs(), "member", "add", "newmember", fmt.Sprintf("--peer-urls=%s", peerURL))
 	if err := spawnWithExpect(cmdArgs, " added to cluster "); err != nil {
 	if err := spawnWithExpect(cmdArgs, " added to cluster "); err != nil {
 		cx.t.Fatal(err)
 		cx.t.Fatal(err)
 	}
 	}
@@ -140,7 +140,7 @@ func memberUpdateTest(cx ctlCtx) {
 	}
 	}
 
 
 	peerURL := fmt.Sprintf("http://localhost:%d", etcdProcessBasePort+11)
 	peerURL := fmt.Sprintf("http://localhost:%d", etcdProcessBasePort+11)
-	cmdArgs := append(cx.PrefixArgs(), "member", "update", fmt.Sprintf("%x", mr.Members[0].ID), fmt.Sprintf("--peerURLs=%s", peerURL))
+	cmdArgs := append(cx.PrefixArgs(), "member", "update", fmt.Sprintf("%x", mr.Members[0].ID), fmt.Sprintf("--peer-urls=%s", peerURL))
 	if err = spawnWithExpect(cmdArgs, " updated in cluster "); err != nil {
 	if err = spawnWithExpect(cmdArgs, " updated in cluster "); err != nil {
 		cx.t.Fatal(err)
 		cx.t.Fatal(err)
 	}
 	}

+ 4 - 4
etcdctl/README.md

@@ -351,7 +351,7 @@ MEMBER ADD introduces a new member into the etcd cluster as a new peer.
 
 
 #### Options
 #### Options
 
 
-- peerURLs -- comma separated list of URLs to associate with the new member.
+- peer-urls -- comma separated list of URLs to associate with the new member.
 
 
 #### Return value
 #### Return value
 
 
@@ -362,7 +362,7 @@ MEMBER ADD introduces a new member into the etcd cluster as a new peer.
 #### Example
 #### Example
 
 
 ```bash
 ```bash
-./etcdctl member add newMember --peerURLs=https://127.0.0.1:12345
+./etcdctl member add newMember --peer-urls=https://127.0.0.1:12345
 Member 2be1eb8f84b7f63e added to cluster ef37ad9dc622a7c4
 Member 2be1eb8f84b7f63e added to cluster ef37ad9dc622a7c4
 ```
 ```
 
 
@@ -373,7 +373,7 @@ MEMBER UPDATE sets the peer URLs for an existing member in the etcd cluster.
 
 
 #### Options
 #### Options
 
 
-- peerURLs -- comma separated list of URLs to associate with the updated member.
+- peer-urls -- comma separated list of URLs to associate with the updated member.
 
 
 #### Return value
 #### Return value
 
 
@@ -384,7 +384,7 @@ MEMBER UPDATE sets the peer URLs for an existing member in the etcd cluster.
 #### Example
 #### Example
 
 
 ```bash
 ```bash
-./etcdctl member update 2be1eb8f84b7f63e --peerURLs=https://127.0.0.1:11112
+./etcdctl member update 2be1eb8f84b7f63e --peer-urls=https://127.0.0.1:11112
 Member 2be1eb8f84b7f63e updated in cluster ef37ad9dc622a7c4
 Member 2be1eb8f84b7f63e updated in cluster ef37ad9dc622a7c4
 ```
 ```
 
 

+ 2 - 2
etcdctl/ctlv3/command/member_command.go

@@ -48,7 +48,7 @@ func NewMemberAddCommand() *cobra.Command {
 		Run: memberAddCommandFunc,
 		Run: memberAddCommandFunc,
 	}
 	}
 
 
-	cc.Flags().StringVar(&memberPeerURLs, "peerURLs", "", "comma separated peer URLs for the new member.")
+	cc.Flags().StringVar(&memberPeerURLs, "peer-urls", "", "comma separated peer URLs for the new member.")
 
 
 	return cc
 	return cc
 }
 }
@@ -74,7 +74,7 @@ func NewMemberUpdateCommand() *cobra.Command {
 		Run: memberUpdateCommandFunc,
 		Run: memberUpdateCommandFunc,
 	}
 	}
 
 
-	cc.Flags().StringVar(&memberPeerURLs, "peerURLs", "", "comma separated peer URLs for the updated member.")
+	cc.Flags().StringVar(&memberPeerURLs, "peer-urls", "", "comma separated peer URLs for the updated member.")
 
 
 	return cc
 	return cc
 }
 }