Skip to content

Commit

Permalink
add assigned_cluster to tenant command hints in fdbcli
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jfu committed Sep 29, 2022
1 parent e26be7a commit a29b853
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion documentation/sphinx/source/command-line-interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ The ``tenant`` command is used to view and manage the tenants in a cluster. The
create
^^^^^^

``tenant create <NAME> [tenant_group=<TENANT_GROUP>]``
``tenant create <NAME> [tenant_group=<TENANT_GROUP>] [assigned_cluster=<CLUSTER_NAME>]``

Creates a new tenant in the cluster.

Expand Down
4 changes: 3 additions & 1 deletion fdbcli/TenantCommands.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,9 @@ std::vector<const char*> tenantHintGenerator(std::vector<StringRef> const& token
if (tokens.size() == 1) {
return { "<create|delete|list|get|configure|rename>", "[ARGS]" };
} else if (tokencmp(tokens[1], "create") && tokens.size() < 4) {
static std::vector<const char*> opts = { "<NAME> [tenant_group=<TENANT_GROUP>]" };
static std::vector<const char*> opts = {
"<NAME> [tenant_group=<TENANT_GROUP>] [assigned_cluster=<CLUSTER_NAME>]"
};
return std::vector<const char*>(opts.begin() + tokens.size() - 2, opts.end());
} else if (tokencmp(tokens[1], "delete") && tokens.size() < 3) {
static std::vector<const char*> opts = { "<NAME>" };
Expand Down

0 comments on commit a29b853

Please sign in to comment.