Repository: nats-io/nsc
Pull request #77 (2019-04-30 16:07:37)

Added flag to edit leaf node connections
Fixed Operator describer to display standard JWT claims, including issuer.


Patch:
diff --git a/cmd/describer.go b/cmd/describer.go
index 375c317..4953f35 100644
--- a/cmd/describer.go
+++ b/cmd/describer.go
@@ -62,6 +62,14 @@ func (a *AccountDescriber) Describe() string {
 		table.AddRow("Max Connections", "Unlimited")
 	}
 
+	if lim.LeafNodeConn == 0 {
+		table.AddRow("Max Leaf Node Connections", "Not Allowed")
+	} else if lim.LeafNodeConn > 0 {
+		table.AddRow("Max Leaf Node Connections", fmt.Sprintf("%d", lim.LeafNodeConn))
+	} else {
+		table.AddRow("Max Leaf Node Connections", "Unlimited")
+	}
+
 	if lim.Data > -1 {
 		table.AddRow("Max Data", fmt.Sprintf("%s (%d bytes)", humanize.Bytes(uint64(lim.Data)), lim.Data))
 	} else {
@@ -246,6 +254,9 @@ func AddStandardClaimInfo(table *tablewriter.Table, claims jwt.Claims) {
 			issuer = uc.IssuerAccount
 		}
 	}
+	if _, ok := claims.(*jwt.OperatorClaims); ok {
+		label = "Operator ID"
+	}
 
 	cd := claims.Claims()
 	if cd.Name != "" {
@@ -436,10 +447,7 @@ func (o *OperatorDescriber) Describe() string {
 	table := tablewriter.CreateTable()
 	table.UTF8Box()
 	table.AddTitle("Operator Details")
-	table.AddRow("Name", o.Name)
-	table.AddRow("Operator ID", ShortCodes(o.Subject))
-	table.AddRow("Issued", RenderDate(o.IssuedAt))
-	table.AddRow("Expires", RenderDate(o.Expires))
+	AddStandardClaimInfo(table, &o.OperatorClaims)
 
 	if len(o.Identities) > 0 {
 		table.AddSeparator()
diff --git a/cmd/edit.go b/cmd/edit.go
index f042981..c7c0469 100644
--- a/cmd/edit.go
+++ b/cmd/edit.go
@@ -20,7 +20,7 @@ import "github.com/spf13/cobra"
 // addCmd represents the add command
 var editCmd = &cobra.Command{
 	Use:   "edit",
-	Short: "Edit assets such as accounts, imports, users, clusters, servers",
+	Short: "Edit assets such as accounts, imports, and users",
 }
 
 func init() {
diff --git a/cmd/editaccount.go b/cmd/editaccount.go
index 4d45494..70ca85e 100644
--- a/cmd/editaccount.go
+++ b/cmd/editaccount.go
@@ -64,6 +64,7 @@ func createEditAccount() *cobra.Command {
 	cmd.Flags().StringSliceVarP(&params.tags, "tag", "", nil, "add tags for user - comma separated list or option can be specified multiple times")
 	cmd.Flags().StringSliceVarP(&params.rmTags, "rm-tag", "", nil, "remove tag - comma separated list or option can be specified multiple times")
 	cmd.Flags().Int64VarP(&params.conns.NumberValue, "conns", "", -1, "set maximum active connections for the account (-1 is unlimited)")
+	cmd.Flags().Int64VarP(&params.leafConns.NumberValue, "leaf-conns", "", 0, "set maximum active leaf node connections for the account (-1 is unlimited)")
 	cmd.Flags().StringVarP(&params.data.Value, "data", "", "-1", "set maximum data in bytes for the account (-1 is unlimited)")
 	cmd.Flags().Int64VarP(&params.exports.NumberValue, "exports", "", -1, "set maximum number of exports for the account (-1 is unlimited)")
 	cmd.Flags().Int64VarP(&params.imports.NumberValue, "imports", "", -1, "set maximum number of imports for the account (-1 is unlimited)")
@@ -90,6 +91,7 @@ type EditAccountParams struct {
 	claim         *jwt.AccountClaims
 	token         string
 	conns         NumberParams
+	leafConns	  NumberParams
 	exports       NumberParams
 	exportsWc     bool
 	imports       NumberParams
@@ -106,7 +108,7 @@ func (p *EditAccountParams) SetDefaults(ctx ActionCtx) error {
 	}
 	p.SignerParams.SetDefaults(nkeys.PrefixByteOperator, true, ctx)
 
-	if !InteractiveFlag && ctx.NothingToDo("start", "expiry", "tag", "rm-tag", "conns", "exports", "imports", "subscriptions", "payload", "data", "wildcard-exports", "sk", "rm-sk") {
+	if !InteractiveFlag && ctx.NothingToDo("start", "expiry", "tag", "rm-tag", "conns", "leaf-conns", "exports", "imports", "subscriptions", "payload", "data", "wildcard-exports", "sk", "rm-sk") {
 		ctx.CurrentCmd().SilenceUsage = false
 		return fmt.Errorf("specify an edit option")
 	}
@@ -137,6 +139,10 @@ func (p *EditAccountParams) Load(ctx ActionCtx) error {
 		p.conns.NumberValue = p.claim.Limits.Conn
 	}
 
+	if !ctx.CurrentCmd().Flags().Changed("leaf-conns") {
+		p.leafConns.NumberValue = p.claim.Limits.LeafNodeConn
+	}
+
 	if !ctx.CurrentCmd().Flags().Changed("data") {
 		p.data.Value = fmt.Sprintf("%d", p.claim.Limits.Data)
 	}
@@ -170,6 +176,10 @@ func (p *EditAccountParams) PostInteractive(ctx ActionCtx) error {
 		return err
 	}
 
+	if err = p.leafConns.Edit("max leaf node connections (-1 unlimited)"); err != nil {
+		return err
+	}
+
 	if err = p.data.Edit("max data (-1 unlimited)"); err != nil {
 		return err
 	}
@@ -227,6 +237,7 @@ func (p *EditAccountParams) Run(ctx ActionCtx) error {
 	}
 
 	p.claim.Limits.Conn = p.conns.NumberValue
+	p.claim.Limits.LeafNodeConn = p.leafConns.NumberValue
 	p.claim.Limits.Data, err = p.data.NumberValue()
 	if err != nil {
 		return fmt.Errorf("error parsing %s: %s", "data", p.data.Value)
diff --git a/cmd/init.go b/cmd/init.go
index a77cb6b..a535474 100644
--- a/cmd/init.go
+++ b/cmd/init.go
@@ -123,6 +123,12 @@ init --interactive
 	_ = cmd.Flags().MarkHidden("create-account")
 	_ = cmd.Flags().MarkHidden("create-operator")
 	_ = cmd.Flags().MarkHidden("create-user")
+	_ = cmd.Flags().MarkHidden("create-cluster")
+	_ = cmd.Flags().MarkHidden("create-server")
+	_ = cmd.Flags().MarkHidden("server-key")
+	_ = cmd.Flags().MarkHidden("cluster-key")
+	_ = cmd.Flags().MarkHidden("cluster-name")
+	_ = cmd.Flags().MarkHidden("server-name")
 
 	return cmd
 }
diff --git a/docs/index.md b/docs/index.md
index ecab872..9f7da7c 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -23,11 +23,11 @@ to your users and services.
 * [nsc add](nsc_add.md)	 - Add assets such as accounts, imports, users
 * [nsc delete](nsc_delete.md)	 - Delete imports and exports
 * [nsc describe](nsc_describe.md)	 - Describe assets such as operators, accounts, users, and jwt files
-* [nsc edit](nsc_edit.md)	 - Edit assets such as accounts, imports, users, clusters, servers
+* [nsc edit](nsc_edit.md)	 - Edit assets such as accounts, imports, and users
 * [nsc env](nsc_env.md)	 - Prints and manage the nsc environment
 * [nsc generate](nsc_generate.md)	 - Generate activation tokens or configs
 * [nsc init](nsc_init.md)	 - Init a configuration directory
 * [nsc list](nsc_list.md)	 - List assets such as accounts, imports, users
 * [nsc update](nsc_update.md)	 - Update this tool to latest version
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc.md b/docs/nsc.md
index ecab872..9f7da7c 100644
--- a/docs/nsc.md
+++ b/docs/nsc.md
@@ -23,11 +23,11 @@ to your users and services.
 * [nsc add](nsc_add.md)	 - Add assets such as accounts, imports, users
 * [nsc delete](nsc_delete.md)	 - Delete imports and exports
 * [nsc describe](nsc_describe.md)	 - Describe assets such as operators, accounts, users, and jwt files
-* [nsc edit](nsc_edit.md)	 - Edit assets such as accounts, imports, users, clusters, servers
+* [nsc edit](nsc_edit.md)	 - Edit assets such as accounts, imports, and users
 * [nsc env](nsc_env.md)	 - Prints and manage the nsc environment
 * [nsc generate](nsc_generate.md)	 - Generate activation tokens or configs
 * [nsc init](nsc_init.md)	 - Init a configuration directory
 * [nsc list](nsc_list.md)	 - List assets such as accounts, imports, users
 * [nsc update](nsc_update.md)	 - Update this tool to latest version
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_add.md b/docs/nsc_add.md
index 4ecde92..ab6c13d 100644
--- a/docs/nsc_add.md
+++ b/docs/nsc_add.md
@@ -29,4 +29,4 @@ Add assets such as accounts, imports, users
 * [nsc add operator](nsc_add_operator.md)	 - Add an operator
 * [nsc add user](nsc_add_user.md)	 - Add an user to the account
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_add_account.md b/docs/nsc_add_account.md
index bd47b9b..ee224b2 100644
--- a/docs/nsc_add_account.md
+++ b/docs/nsc_add_account.md
@@ -32,4 +32,4 @@ nsc add account [flags]
 
 * [nsc add](nsc_add.md)	 - Add assets such as accounts, imports, users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_add_export.md b/docs/nsc_add_export.md
index ec559f6..981aafd 100644
--- a/docs/nsc_add_export.md
+++ b/docs/nsc_add_export.md
@@ -42,4 +42,4 @@ nsc add export --name myexport --subject a.b --service
 
 * [nsc add](nsc_add.md)	 - Add assets such as accounts, imports, users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_add_import.md b/docs/nsc_add_import.md
index 1d89fa9..ae1de80 100644
--- a/docs/nsc_add_import.md
+++ b/docs/nsc_add_import.md
@@ -44,4 +44,4 @@ nsc add import --src-account <account_pubkey> --remote-subject <remote-sub> --lo
 
 * [nsc add](nsc_add.md)	 - Add assets such as accounts, imports, users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_add_operator.md b/docs/nsc_add_operator.md
index 1a9ee83..2c0ca34 100644
--- a/docs/nsc_add_operator.md
+++ b/docs/nsc_add_operator.md
@@ -32,4 +32,4 @@ nsc add operator [flags]
 
 * [nsc add](nsc_add.md)	 - Add assets such as accounts, imports, users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_add_user.md b/docs/nsc_add_user.md
index 100e890..971d90a 100644
--- a/docs/nsc_add_user.md
+++ b/docs/nsc_add_user.md
@@ -50,4 +50,4 @@ nsc add user --name u --tag test,service_a
 
 * [nsc add](nsc_add.md)	 - Add assets such as accounts, imports, users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_delete.md b/docs/nsc_delete.md
index 76b6955..a6e8d8e 100644
--- a/docs/nsc_delete.md
+++ b/docs/nsc_delete.md
@@ -26,4 +26,4 @@ Delete imports and exports
 * [nsc delete export](nsc_delete_export.md)	 - Delete an export
 * [nsc delete import](nsc_delete_import.md)	 - Delete an import
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_delete_export.md b/docs/nsc_delete_export.md
index 9b79f00..aa01d26 100644
--- a/docs/nsc_delete_export.md
+++ b/docs/nsc_delete_export.md
@@ -30,4 +30,4 @@ nsc delete export [flags]
 
 * [nsc delete](nsc_delete.md)	 - Delete imports and exports
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_delete_import.md b/docs/nsc_delete_import.md
index 251f15e..83291f8 100644
--- a/docs/nsc_delete_import.md
+++ b/docs/nsc_delete_import.md
@@ -38,4 +38,4 @@ nsc delete import -s "bar.>"
 
 * [nsc delete](nsc_delete.md)	 - Delete imports and exports
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_describe.md b/docs/nsc_describe.md
index 442b090..0a37102 100644
--- a/docs/nsc_describe.md
+++ b/docs/nsc_describe.md
@@ -28,4 +28,4 @@ Describe assets such as operators, accounts, users, and jwt files
 * [nsc describe operator](nsc_describe_operator.md)	 - Describes the operator
 * [nsc describe user](nsc_describe_user.md)	 - Describes an user
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_describe_account.md b/docs/nsc_describe_account.md
index f5d588a..ec0d56e 100644
--- a/docs/nsc_describe_account.md
+++ b/docs/nsc_describe_account.md
@@ -30,4 +30,4 @@ nsc describe account [flags]
 
 * [nsc describe](nsc_describe.md)	 - Describe assets such as operators, accounts, users, and jwt files
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_describe_jwt.md b/docs/nsc_describe_jwt.md
index 9adcccd..7e0e449 100644
--- a/docs/nsc_describe_jwt.md
+++ b/docs/nsc_describe_jwt.md
@@ -36,4 +36,4 @@ nsc describe -f pathorurl
 
 * [nsc describe](nsc_describe.md)	 - Describe assets such as operators, accounts, users, and jwt files
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_describe_operator.md b/docs/nsc_describe_operator.md
index 82525d4..9221651 100644
--- a/docs/nsc_describe_operator.md
+++ b/docs/nsc_describe_operator.md
@@ -30,4 +30,4 @@ nsc describe operator [flags]
 
 * [nsc describe](nsc_describe.md)	 - Describe assets such as operators, accounts, users, and jwt files
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_describe_user.md b/docs/nsc_describe_user.md
index 7fa3ab2..94f5ed8 100644
--- a/docs/nsc_describe_user.md
+++ b/docs/nsc_describe_user.md
@@ -31,4 +31,4 @@ nsc describe user [flags]
 
 * [nsc describe](nsc_describe.md)	 - Describe assets such as operators, accounts, users, and jwt files
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_edit.md b/docs/nsc_edit.md
index c8a4bed..9cad6a8 100644
--- a/docs/nsc_edit.md
+++ b/docs/nsc_edit.md
@@ -1,10 +1,10 @@
 ## nsc edit
 
-Edit assets such as accounts, imports, users, clusters, servers
+Edit assets such as accounts, imports, and users
 
 ### Synopsis
 
-Edit assets such as accounts, imports, users, clusters, servers
+Edit assets such as accounts, imports, and users
 
 ### Options
 
@@ -27,4 +27,4 @@ Edit assets such as accounts, imports, users, clusters, servers
 * [nsc edit operator](nsc_edit_operator.md)	 - Edit an operator
 * [nsc edit user](nsc_edit_user.md)	 - Edit an user
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_edit_account.md b/docs/nsc_edit_account.md
index 56d694e..808e4c9 100644
--- a/docs/nsc_edit_account.md
+++ b/docs/nsc_edit_account.md
@@ -40,6 +40,6 @@ nsc edit account [flags]
 
 ### SEE ALSO
 
-* [nsc edit](nsc_edit.md)	 - Edit assets such as accounts, imports, users, clusters, servers
+* [nsc edit](nsc_edit.md)	 - Edit assets such as accounts, imports, and users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_edit_operator.md b/docs/nsc_edit_operator.md
index 90076ad..c345018 100644
--- a/docs/nsc_edit_operator.md
+++ b/docs/nsc_edit_operator.md
@@ -32,6 +32,6 @@ nsc edit operator [flags]
 
 ### SEE ALSO
 
-* [nsc edit](nsc_edit.md)	 - Edit assets such as accounts, imports, users, clusters, servers
+* [nsc edit](nsc_edit.md)	 - Edit assets such as accounts, imports, and users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_edit_user.md b/docs/nsc_edit_user.md
index ab03d93..3c210ea 100644
--- a/docs/nsc_edit_user.md
+++ b/docs/nsc_edit_user.md
@@ -42,6 +42,6 @@ nsc edit user [flags]
 
 ### SEE ALSO
 
-* [nsc edit](nsc_edit.md)	 - Edit assets such as accounts, imports, users, clusters, servers
+* [nsc edit](nsc_edit.md)	 - Edit assets such as accounts, imports, and users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_env.md b/docs/nsc_env.md
index 8b7aa17..c0c58a4 100644
--- a/docs/nsc_env.md
+++ b/docs/nsc_env.md
@@ -38,4 +38,4 @@ env
 
 * [nsc](nsc.md)	 - NSC enables you to create and manage NATS accounts and user configurations
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_generate.md b/docs/nsc_generate.md
index fb1177f..c559ffc 100644
--- a/docs/nsc_generate.md
+++ b/docs/nsc_generate.md
@@ -26,4 +26,4 @@ Generate activation tokens or configs
 * [nsc generate activation](nsc_generate_activation.md)	 - Generate an export activation jwt token
 * [nsc generate creds](nsc_generate_creds.md)	 - Generate a credentials file for an user
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_generate_activation.md b/docs/nsc_generate_activation.md
index 17ca0c4..b76d16f 100644
--- a/docs/nsc_generate_activation.md
+++ b/docs/nsc_generate_activation.md
@@ -35,4 +35,4 @@ nsc generate activation [flags]
 
 * [nsc generate](nsc_generate.md)	 - Generate activation tokens or configs
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_generate_creds.md b/docs/nsc_generate_creds.md
index 0463904..741946a 100644
--- a/docs/nsc_generate_creds.md
+++ b/docs/nsc_generate_creds.md
@@ -37,4 +37,4 @@ nsc generate creds --account a --user u
 
 * [nsc generate](nsc_generate.md)	 - Generate activation tokens or configs
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_init.md b/docs/nsc_init.md
index eba95a5..09137d5 100644
--- a/docs/nsc_init.md
+++ b/docs/nsc_init.md
@@ -23,16 +23,10 @@ init --interactive
 ```
       --account-key string     account keypath (default generated)
       --account-name string    name for the account (default '<name>_account')
-      --cluster-key string     cluster keypath (default generated)
-      --cluster-name string    name for the cluster (default '<name>_cluster')
-      --create-cluster         create a cluster
-      --create-server          create a server
   -h, --help                   help for init
   -n, --name string            name for the configuration environment (default "test")
       --operator-key string    operator keypath (default generated)
       --operator-name string   operator name (default '<name>_operator')
-      --server-key string      server keypath (default generated)
-      --server-name string     name for the server (default "localhost")
       --user-key string        user keypath (default generated)
       --user-name string       name for the user (default '<name>_user')
 ```
@@ -49,4 +43,4 @@ init --interactive
 
 * [nsc](nsc.md)	 - NSC enables you to create and manage NATS accounts and user configurations
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_list.md b/docs/nsc_list.md
index b1c98d0..0d6b590 100644
--- a/docs/nsc_list.md
+++ b/docs/nsc_list.md
@@ -27,4 +27,4 @@ List assets such as accounts, imports, users
 * [nsc list operators](nsc_list_operators.md)	 - List operators
 * [nsc list users](nsc_list_users.md)	 - List users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_list_accounts.md b/docs/nsc_list_accounts.md
index 0ce7b24..2bea8eb 100644
--- a/docs/nsc_list_accounts.md
+++ b/docs/nsc_list_accounts.md
@@ -29,4 +29,4 @@ nsc list accounts [flags]
 
 * [nsc list](nsc_list.md)	 - List assets such as accounts, imports, users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_list_operators.md b/docs/nsc_list_operators.md
index aa8eea6..ca744ce 100644
--- a/docs/nsc_list_operators.md
+++ b/docs/nsc_list_operators.md
@@ -28,4 +28,4 @@ nsc list operators [flags]
 
 * [nsc list](nsc_list.md)	 - List assets such as accounts, imports, users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_list_users.md b/docs/nsc_list_users.md
index e57fd54..951ef9d 100644
--- a/docs/nsc_list_users.md
+++ b/docs/nsc_list_users.md
@@ -30,4 +30,4 @@ nsc list users [flags]
 
 * [nsc list](nsc_list.md)	 - List assets such as accounts, imports, users
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019
diff --git a/docs/nsc_update.md b/docs/nsc_update.md
index 832ffcf..eebb7fb 100644
--- a/docs/nsc_update.md
+++ b/docs/nsc_update.md
@@ -35,4 +35,4 @@ nsc update --release-notes
 
 * [nsc](nsc.md)	 - NSC enables you to create and manage NATS accounts and user configurations
 
-###### Auto generated by spf13/cobra on 29-Apr-2019
+###### Auto generated by spf13/cobra on 30-Apr-2019


Test patch:
diff --git a/cmd/editaccount_test.go b/cmd/editaccount_test.go
index 53c964e..9a09a0f 100644
--- a/cmd/editaccount_test.go
+++ b/cmd/editaccount_test.go
@@ -113,13 +113,14 @@ func Test_EditAccountLimits(t *testing.T) {
 
 	ts.AddAccount(t, "A")
 	_, _, err := ExecuteCmd(createEditAccount(), "--conns", "5", "--data", "10M", "--exports", "15",
-		"--imports", "20", "--payload", "1K", "--subscriptions", "30")
+		"--imports", "20", "--payload", "1K", "--subscriptions", "30", "--leaf-conns", "31")
 	require.NoError(t, err)
 
 	ac, err := ts.Store.ReadAccountClaim("A")
 	require.NoError(t, err)
 	require.NotNil(t, ac)
 	require.Equal(t, int64(5), ac.Limits.Conn)
+	require.Equal(t, int64(31), ac.Limits.LeafNodeConn)
 	require.Equal(t, int64(1000*1000*10), ac.Limits.Data)
 	require.Equal(t, int64(15), ac.Limits.Exports)
 	require.Equal(t, int64(20), ac.Limits.Imports)
@@ -127,7 +128,7 @@ func Test_EditAccountLimits(t *testing.T) {
 	require.Equal(t, int64(30), ac.Limits.Subs)
 }
 
-func Test_EditACcountSigningKeys(t *testing.T) {
+func Test_EditAccountSigningKeys(t *testing.T) {
 	ts := NewTestStore(t, "edit account")
 	defer ts.Done(t)