Skip to content

Commit

Permalink
CLI: capitalize all usages
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Jan 27, 2025
1 parent 4f2fb06 commit 9145efa
Show file tree
Hide file tree
Showing 45 changed files with 329 additions and 328 deletions.
2 changes: 1 addition & 1 deletion ais/prxdl.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package ais provides core functionality for the AIStore object storage.
/*
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package ais

Expand Down
2 changes: 1 addition & 1 deletion ais/s3/bucket.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package s3 provides Amazon S3 compatibility layer
/*
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package s3

Expand Down
2 changes: 1 addition & 1 deletion ais/s3/const.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package s3 provides Amazon S3 compatibility layer
/*
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package s3

Expand Down
2 changes: 1 addition & 1 deletion api/apc/access.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package apc: API control messages and constants
/*
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package apc

Expand Down
2 changes: 1 addition & 1 deletion cmd/aisloader/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package main for the `aisloader` executable.
/*
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package main

Expand Down
2 changes: 1 addition & 1 deletion cmd/authn/const.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package authn is authentication server for AIStore.
/*
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package main

Expand Down
2 changes: 1 addition & 1 deletion cmd/authn/tok/token.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package tok provides AuthN token (structure and methods)
// for validation by AIS gateways
/*
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package tok

Expand Down
2 changes: 1 addition & 1 deletion cmd/authn/utils.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package authn is authentication server for AIStore.
/*
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package main

Expand Down
16 changes: 8 additions & 8 deletions cmd/cli/cli/advanced_hdlr.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@ import (
var (
advancedCmd = cli.Command{
Name: commandAdvanced,
Usage: "special commands intended for development and advanced usage",
Usage: "Special commands intended for development and advanced usage",
Subcommands: []cli.Command{
jobStartResilver,
{
Name: cmdPreload,
Usage: "preload object metadata into in-memory cache",
Usage: "Preload object metadata into in-memory cache",
ArgsUsage: bucketArgument,
Action: loadLomCacheHandler,
BashComplete: bucketCompletions(bcmplop{}),
},
{
Name: cmdRmSmap,
Usage: "immediately remove node from cluster map (beware: potential data loss!)",
Usage: "Immediately remove node from cluster map (beware: potential data loss!)",
ArgsUsage: nodeIDArgument,
Action: removeNodeFromSmap,
BashComplete: suggestAllNodes,
},
{
Name: cmdRandNode,
Usage: "print random node ID (by default, ID of a randomly selected target)",
Usage: "Print random node ID (by default, ID of a randomly selected target)",
Action: randNode,
BashComplete: func(c *cli.Context) {
if c.NArg() == 0 {
Expand All @@ -47,27 +47,27 @@ var (
},
{
Name: cmdRandMountpath,
Usage: "print a random mountpath from a given target",
Usage: "Print a random mountpath from a given target",
Action: randMountpath,
BashComplete: suggestTargets,
},
{
Name: cmdRotateLogs,
Usage: "rotate aistore logs",
Usage: "Rotate aistore logs",
ArgsUsage: optionalNodeIDArgument,
Action: rotateLogs,
BashComplete: suggestAllNodes,
},
{
Name: cmdBackendEnable,
Usage: "(re)enable cloud backend (see also: 'ais config cluster backend')",
Usage: "(Re)enable cloud backend (see also: 'ais config cluster backend')",
ArgsUsage: cloudProviderArg,
Action: backendEnableHandler,
BashComplete: suggestCloudProvider,
},
{
Name: cmdBackendDisable,
Usage: "disable cloud backend (see also: 'ais config cluster backend')",
Usage: "Disable cloud backend (see also: 'ais config cluster backend')",
ArgsUsage: cloudProviderArg,
Action: backendDisableHandler,
BashComplete: suggestCloudProvider,
Expand Down
10 changes: 5 additions & 5 deletions cmd/cli/cli/alias_hdlr.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,28 @@ func lastAliasedWord(c *cli.Context) string {
func (a *acli) getAliasCmd() cli.Command {
aliasCmd := cli.Command{
Name: commandAlias,
Usage: "manage top-level aliases",
Usage: "Manage top-level aliases",
Action: showAliasHandler,
Subcommands: []cli.Command{
{
Name: cmdAliasShow,
Usage: "display list of aliases",
Usage: "Display list of aliases",
Action: showAliasHandler,
},
{
Name: cmdAliasRm,
Usage: "remove existing alias",
Usage: "Remove existing alias",
ArgsUsage: aliasCmdArgument,
Action: rmAliasHandler,
},
{
Name: cmdAliasReset,
Usage: "reset aliases to default",
Usage: "Reset aliases to default",
Action: resetAliasHandler,
},
{
Name: cmdAliasSet,
Usage: "add new or update existing alias",
Usage: "Add new or update existing alias",
ArgsUsage: aliasSetCmdArgument,
Action: a.setAliasHandler,
},
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ var (
// `ais help [COMMAND]`
var helpCommand = cli.Command{
Name: "help",
Usage: "show a list of commands; show help for a given command",
Usage: "Show a list of commands; show help for a given command",
ArgsUsage: "[COMMAND]",
Action: helpCmdHandler,
BashComplete: func(c *cli.Context) {
Expand Down
12 changes: 6 additions & 6 deletions cmd/cli/cli/arch_hdlr.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ import (
"golang.org/x/sync/errgroup"
)

const archBucketUsage = "archive selected or matching objects from " + bucketObjectSrcArgument + " as\n" +
const archBucketUsage = "Archive selected or matching objects from " + bucketObjectSrcArgument + " as\n" +
indent1 + archExts + "-formatted object (a.k.a. shard),\n" +
indent1 + "e.g.:\n" +
indent1 + "\t- 'archive bucket ais://src ais://dst/a.tar.lz4 --template \"shard-{001..997}\"'\n" +
indent1 + "\t- 'archive bucket \"ais://src/shard-{001..997}\" ais://dst/a.tar.lz4'\t- same as above (notice double quotes)\n" +
indent1 + "\t- 'archive bucket \"ais://src/shard-{998..999}\" ais://dst/a.tar.lz4 --append-or-put'\t- append (ie., archive) 2 more objects"

const archPutUsage = "archive a file, a directory, or multiple files and/or directories as\n" +
const archPutUsage = "Archive a file, a directory, or multiple files and/or directories as\n" +
indent1 + "\t" + archExts + "-formatted object - aka \"shard\".\n" +
indent1 + "\tBoth APPEND (to an existing shard) and PUT (a new version of the shard) are supported.\n" +
indent1 + "\tExamples:\n" +
Expand All @@ -52,7 +52,7 @@ const archPutUsage = "archive a file, a directory, or multiple files and/or dire
indent1 + "\t- to archive objects from a ais:// or remote bucket, run 'ais archive bucket' (see --help for details)."

// (compare with objGetUsage)
const archGetUsage = "get a shard and extract its content; get an archived file;\n" +
const archGetUsage = "Get a shard and extract its content; get an archived file;\n" +
indent4 + "\twrite the content locally with destination options including: filename, directory, STDOUT ('-'), or '/dev/null' (discard);\n" +
indent4 + "\tassorted options further include:\n" +
indent4 + "\t- '--prefix' to get multiple shards in one shot (empty prefix for the entire bucket);\n" +
Expand All @@ -68,7 +68,7 @@ const archGetUsage = "get a shard and extract its content; get an archived file;
indent4 + "\t- ais://abc/trunk-0123.tar 222.tar --archregx=file45 --archmode=wdskey - return 222.tar with all file45.* files --/--\n" +
indent4 + "\t- ais://abc/trunk-0123.tar 333.tar --archregx=subdir/ --archmode=prefix - 333.tar with all subdir/* files --/--"

const genShardsUsage = "generate random " + archExts + "-formatted objects (\"shards\"), e.g.:\n" +
const genShardsUsage = "Generate random " + archExts + "-formatted objects (\"shards\"), e.g.:\n" +
indent4 + "\t- gen-shards 'ais://bucket1/shard-{001..999}.tar' - write 999 random shards (default sizes) to ais://bucket1\n" +
indent4 + "\t- gen-shards \"gs://bucket2/shard-{01..20..2}.tgz\" - 10 random gzipped tarfiles to Cloud bucket\n" +
indent4 + "\t(notice quotation marks in both cases)"
Expand Down Expand Up @@ -144,7 +144,7 @@ var (
// archive ls
archLsCmd = cli.Command{
Name: cmdList,
Usage: "list archived content (supported formats: " + archFormats + ")",
Usage: "List archived content (supported formats: " + archFormats + ")",
ArgsUsage: optionalShardArgument,
Flags: rmFlags(bucketCmdsFlags[commandList], listArchFlag), // is implied
Action: listArchHandler,
Expand All @@ -163,7 +163,7 @@ var (
// main `ais archive`
archCmd = cli.Command{
Name: commandArch,
Usage: "archive multiple objects from a given bucket; archive local files and directories; list archived content",
Usage: "Archive multiple objects from a given bucket; archive local files and directories; list archived content",
Action: archUsageHandler,
Subcommands: []cli.Command{
archBucketCmd,
Expand Down
44 changes: 22 additions & 22 deletions cmd/cli/cli/auth_hdlr.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,32 @@ var (
// define separately to allow for aliasing (see alias_hdlr.go)
authCmdShow = cli.Command{
Name: cmdAuthShow,
Usage: "show entity in authn",
Usage: "Show entity in authn",
Subcommands: []cli.Command{
{
Name: cmdAuthCluster,
Usage: "show AIS clusters managed by this AuthN instance",
Usage: "Show AIS clusters managed by this AuthN instance",
ArgsUsage: showAuthClusterArgument,
Action: wrapAuthN(showAuthClusterHandler),
},
{
Name: cmdAuthRole,
Usage: "show existing AuthN roles",
Usage: "Show existing AuthN roles",
ArgsUsage: showAuthRoleArgument,
Flags: authFlags[flagsAuthRoleShow],
Action: wrapAuthN(showAuthRoleHandler),
BashComplete: oneRoleCompletions,
},
{
Name: cmdAuthUser,
Usage: "show user list and details",
Usage: "Show user list and details",
Flags: authFlags[flagsAuthUserShow],
ArgsUsage: showAuthUserListArgument,
Action: wrapAuthN(showAuthUserHandler),
},
{
Name: cmdAuthConfig,
Usage: "show AuthN server configuration",
Usage: "Show AuthN server configuration",
Flags: authFlags[flagsAuthConfShow],
Action: wrapAuthN(showAuthConfigHandler),
},
Expand All @@ -91,32 +91,32 @@ var (

authCmd = cli.Command{
Name: commandAuth,
Usage: "add/remove/show users, manage user roles, manage access to AIS clusters",
Usage: "Add/remove/show users, manage user roles, manage access to AIS clusters",
Subcommands: []cli.Command{
// show
authCmdShow,
// add
{
Name: cmdAuthAdd,
Usage: "add AuthN entity: user, role, AIS cluster",
Usage: "Add AuthN entity: user, role, AIS cluster",
Subcommands: []cli.Command{
{
Name: cmdAuthUser,
Usage: "add a new user",
Usage: "Add a new user",
ArgsUsage: addAuthUserArgument,
Flags: authFlags[cmdAuthUser],
Action: wrapAuthN(addAuthUserHandler),
BashComplete: oneRoleCompletions,
},
{
Name: cmdAuthCluster,
Usage: "add AIS cluster (to authenticate access to buckets and to the cluster)",
Usage: "Add AIS cluster (to authenticate access to buckets and to the cluster)",
ArgsUsage: addAuthClusterArgument,
Action: wrapAuthN(addAuthClusterHandler),
},
{
Name: cmdAuthRole,
Usage: "create a new role",
Usage: "Create a new role",
ArgsUsage: addSetAuthRoleArgument,
Flags: authFlags[flagsAuthRoleAddSet],
Action: wrapAuthN(addAuthRoleHandler),
Expand All @@ -127,32 +127,32 @@ var (
// rm
{
Name: cmdAuthRemove,
Usage: "remove an entity from AuthN",
Usage: "Remove an entity from AuthN",
Subcommands: []cli.Command{
{
Name: cmdAuthUser,
Usage: "remove an existing user",
Usage: "Remove an existing user",
ArgsUsage: deleteAuthUserArgument,
Action: wrapAuthN(deleteUserHandler),
BashComplete: oneUserCompletions,
},
{
Name: cmdAuthCluster,
Usage: "remove AIS cluster",
Usage: "Remove AIS cluster",
ArgsUsage: deleteAuthClusterArgument,
Action: wrapAuthN(deleteAuthClusterHandler),
BashComplete: oneClusterCompletions,
},
{
Name: cmdAuthRole,
Usage: "remove an existing role",
Usage: "Remove an existing role",
ArgsUsage: deleteAuthRoleArgument,
Action: wrapAuthN(deleteRoleHandler),
BashComplete: oneRoleCompletions,
},
{
Name: cmdAuthToken,
Usage: "revoke AuthN token",
Usage: "Revoke AuthN token",
Flags: authFlags[flagsAuthRevokeToken],
ArgsUsage: deleteAuthTokenArgument,
Action: wrapAuthN(revokeTokenHandler),
Expand All @@ -162,32 +162,32 @@ var (
// set
{
Name: cmdAuthSet,
Usage: "update AuthN configuration and its entities: users, roles, and AIS clusters",
Usage: "Update AuthN configuration and its entities: users, roles, and AIS clusters",
Subcommands: []cli.Command{
{
Name: cmdAuthConfig,
Usage: "update AuthN server configuration",
Usage: "Update AuthN server configuration",
Action: wrapAuthN(setAuthConfigHandler),
BashComplete: suggestUpdatableAuthNConfig,
},
{
Name: cmdAuthCluster,
Usage: "update AIS cluster configuration (the cluster must be previously added to AuthN)",
Usage: "Update AIS cluster configuration (the cluster must be previously added to AuthN)",
ArgsUsage: addAuthClusterArgument,
Action: wrapAuthN(updateAuthClusterHandler),
BashComplete: oneClusterCompletions,
},
{
Name: cmdAuthUser,
Usage: "update an existing user",
Usage: "Update an existing user",
ArgsUsage: addAuthUserArgument,
Flags: authFlags[cmdAuthUser],
Action: wrapAuthN(updateAuthUserHandler),
BashComplete: oneUserCompletionsWithRoles,
},
{
Name: cmdAuthRole,
Usage: "update an existing role for all users that have it",
Usage: "Update an existing role for all users that have it",
ArgsUsage: addSetAuthRoleArgument,
Flags: authFlags[flagsAuthRoleAddSet],
Action: wrapAuthN(updateAuthRoleHandler),
Expand All @@ -198,14 +198,14 @@ var (
// login, logout
{
Name: cmdAuthLogin,
Usage: "log in with existing user ID and password",
Usage: "Log in with existing user ID and password",
Flags: authFlags[flagsAuthUserLogin],
ArgsUsage: userLoginArgument,
Action: wrapAuthN(loginUserHandler),
},
{
Name: cmdAuthLogout,
Usage: "log out",
Usage: "Log out",
Flags: authFlags[flagsAuthUserLogout],
Action: wrapAuthN(logoutUserHandler),
},
Expand Down
Loading

0 comments on commit 9145efa

Please sign in to comment.