Fix version output and help messages after rebranding #33
25 changed files with 70 additions and 70 deletions
|
@ -108,7 +108,7 @@ var (
|
||||||
|
|
||||||
forceNewEpoch = &cobra.Command{
|
forceNewEpoch = &cobra.Command{
|
||||||
Use: "force-new-epoch",
|
Use: "force-new-epoch",
|
||||||
Short: "Create new NeoFS epoch event in the side chain",
|
Short: "Create new FrostFS epoch event in the side chain",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
_ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag))
|
_ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag))
|
||||||
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
||||||
|
@ -130,7 +130,7 @@ var (
|
||||||
setConfig = &cobra.Command{
|
setConfig = &cobra.Command{
|
||||||
Use: "set-config key1=val1 [key2=val2 ...]",
|
Use: "set-config key1=val1 [key2=val2 ...]",
|
||||||
DisableFlagsInUseLine: true,
|
DisableFlagsInUseLine: true,
|
||||||
Short: "Add/update global config value in the NeoFS network",
|
Short: "Add/update global config value in the FrostFS network",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
_ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag))
|
_ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag))
|
||||||
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
||||||
|
@ -164,7 +164,7 @@ var (
|
||||||
|
|
||||||
dumpNetworkConfigCmd = &cobra.Command{
|
dumpNetworkConfigCmd = &cobra.Command{
|
||||||
Use: "dump-config",
|
Use: "dump-config",
|
||||||
Short: "Dump NeoFS network config",
|
Short: "Dump FrostFS network config",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
||||||
},
|
},
|
||||||
|
@ -182,7 +182,7 @@ var (
|
||||||
|
|
||||||
updateContractsCmd = &cobra.Command{
|
updateContractsCmd = &cobra.Command{
|
||||||
Use: "update-contracts",
|
Use: "update-contracts",
|
||||||
Short: "Update NeoFS contracts",
|
Short: "Update FrostFS contracts",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
_ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag))
|
_ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag))
|
||||||
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
||||||
|
@ -192,7 +192,7 @@ var (
|
||||||
|
|
||||||
dumpContainersCmd = &cobra.Command{
|
dumpContainersCmd = &cobra.Command{
|
||||||
Use: "dump-containers",
|
Use: "dump-containers",
|
||||||
Short: "Dump NeoFS containers to file",
|
Short: "Dump FrostFS containers to file",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
||||||
},
|
},
|
||||||
|
@ -201,7 +201,7 @@ var (
|
||||||
|
|
||||||
restoreContainersCmd = &cobra.Command{
|
restoreContainersCmd = &cobra.Command{
|
||||||
Use: "restore-containers",
|
Use: "restore-containers",
|
||||||
Short: "Restore NeoFS containers from file",
|
Short: "Restore FrostFS containers from file",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
_ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag))
|
_ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag))
|
||||||
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
||||||
|
@ -211,7 +211,7 @@ var (
|
||||||
|
|
||||||
listContainersCmd = &cobra.Command{
|
listContainersCmd = &cobra.Command{
|
||||||
Use: "list-containers",
|
Use: "list-containers",
|
||||||
Short: "List NeoFS containers",
|
Short: "List FrostFS containers",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
||||||
},
|
},
|
||||||
|
@ -236,8 +236,8 @@ func init() {
|
||||||
RootCmd.AddCommand(initCmd)
|
RootCmd.AddCommand(initCmd)
|
||||||
initCmd.Flags().String(alphabetWalletsFlag, "", "Path to alphabet wallets dir")
|
initCmd.Flags().String(alphabetWalletsFlag, "", "Path to alphabet wallets dir")
|
||||||
initCmd.Flags().StringP(endpointFlag, "r", "", "N3 RPC node endpoint")
|
initCmd.Flags().StringP(endpointFlag, "r", "", "N3 RPC node endpoint")
|
||||||
initCmd.Flags().String(contractsInitFlag, "", "Path to archive with compiled NeoFS contracts (default fetched from latest github release)")
|
initCmd.Flags().String(contractsInitFlag, "", "Path to archive with compiled FrostFS contracts (default fetched from latest github release)")
|
||||||
initCmd.Flags().Uint(epochDurationCLIFlag, 240, "Amount of side chain blocks in one NeoFS epoch")
|
initCmd.Flags().Uint(epochDurationCLIFlag, 240, "Amount of side chain blocks in one FrostFS epoch")
|
||||||
initCmd.Flags().Uint(maxObjectSizeCLIFlag, 67108864, "Max single object size in bytes")
|
initCmd.Flags().Uint(maxObjectSizeCLIFlag, 67108864, "Max single object size in bytes")
|
||||||
initCmd.Flags().Bool(homomorphicHashDisabledCLIFlag, false, "Disable object homomorphic hashing")
|
initCmd.Flags().Bool(homomorphicHashDisabledCLIFlag, false, "Disable object homomorphic hashing")
|
||||||
// Defaults are taken from neo-preodolenie.
|
// Defaults are taken from neo-preodolenie.
|
||||||
|
@ -289,7 +289,7 @@ func init() {
|
||||||
RootCmd.AddCommand(updateContractsCmd)
|
RootCmd.AddCommand(updateContractsCmd)
|
||||||
updateContractsCmd.Flags().String(alphabetWalletsFlag, "", "Path to alphabet wallets dir")
|
updateContractsCmd.Flags().String(alphabetWalletsFlag, "", "Path to alphabet wallets dir")
|
||||||
updateContractsCmd.Flags().StringP(endpointFlag, "r", "", "N3 RPC node endpoint")
|
updateContractsCmd.Flags().StringP(endpointFlag, "r", "", "N3 RPC node endpoint")
|
||||||
updateContractsCmd.Flags().String(contractsInitFlag, "", "Path to archive with compiled NeoFS contracts (default fetched from latest github release)")
|
updateContractsCmd.Flags().String(contractsInitFlag, "", "Path to archive with compiled FrostFS contracts (default fetched from latest github release)")
|
||||||
|
|
||||||
RootCmd.AddCommand(dumpContainersCmd)
|
RootCmd.AddCommand(dumpContainersCmd)
|
||||||
dumpContainersCmd.Flags().StringP(endpointFlag, "r", "", "N3 RPC node endpoint")
|
dumpContainersCmd.Flags().StringP(endpointFlag, "r", "", "N3 RPC node endpoint")
|
||||||
|
|
|
@ -39,7 +39,7 @@ func viperBindFlags(cmd *cobra.Command, flags ...string) {
|
||||||
// subnet command section.
|
// subnet command section.
|
||||||
var cmdSubnet = &cobra.Command{
|
var cmdSubnet = &cobra.Command{
|
||||||
Use: "subnet",
|
Use: "subnet",
|
||||||
Short: "NeoFS subnet management",
|
Short: "FrostFS subnet management",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
viperBindFlags(cmd,
|
viperBindFlags(cmd,
|
||||||
endpointFlag,
|
endpointFlag,
|
||||||
|
@ -112,7 +112,7 @@ func readSubnetKey(key *keys.PrivateKey) error {
|
||||||
// create subnet command.
|
// create subnet command.
|
||||||
var cmdSubnetCreate = &cobra.Command{
|
var cmdSubnetCreate = &cobra.Command{
|
||||||
Use: "create",
|
Use: "create",
|
||||||
Short: "Create NeoFS subnet",
|
Short: "Create FrostFS subnet",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
viperBindFlags(cmd,
|
viperBindFlags(cmd,
|
||||||
flagSubnetWallet,
|
flagSubnetWallet,
|
||||||
|
@ -177,7 +177,7 @@ var errZeroSubnet = errors.New("zero subnet")
|
||||||
// remove subnet command.
|
// remove subnet command.
|
||||||
var cmdSubnetRemove = &cobra.Command{
|
var cmdSubnetRemove = &cobra.Command{
|
||||||
Use: "remove",
|
Use: "remove",
|
||||||
Short: "Remove NeoFS subnet",
|
Short: "Remove FrostFS subnet",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
viperBindFlags(cmd,
|
viperBindFlags(cmd,
|
||||||
flagSubnetWallet,
|
flagSubnetWallet,
|
||||||
|
@ -226,7 +226,7 @@ const (
|
||||||
// get subnet command.
|
// get subnet command.
|
||||||
var cmdSubnetGet = &cobra.Command{
|
var cmdSubnetGet = &cobra.Command{
|
||||||
Use: "get",
|
Use: "get",
|
||||||
Short: "Read information about the NeoFS subnet",
|
Short: "Read information about the FrostFS subnet",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
viperBindFlags(cmd,
|
viperBindFlags(cmd,
|
||||||
flagSubnetGetID,
|
flagSubnetGetID,
|
||||||
|
@ -290,7 +290,7 @@ const (
|
||||||
// command to manage subnet admins.
|
// command to manage subnet admins.
|
||||||
var cmdSubnetAdmin = &cobra.Command{
|
var cmdSubnetAdmin = &cobra.Command{
|
||||||
Use: "admin",
|
Use: "admin",
|
||||||
Short: "Manage administrators of the NeoFS subnet",
|
Short: "Manage administrators of the FrostFS subnet",
|
||||||
PreRun: func(cmd *cobra.Command, args []string) {
|
PreRun: func(cmd *cobra.Command, args []string) {
|
||||||
viperBindFlags(cmd,
|
viperBindFlags(cmd,
|
||||||
flagSubnetWallet,
|
flagSubnetWallet,
|
||||||
|
@ -397,7 +397,7 @@ func manageSubnetAdmins(cmd *cobra.Command, rm bool) error {
|
||||||
// command to add subnet admin.
|
// command to add subnet admin.
|
||||||
var cmdSubnetAdminAdd = &cobra.Command{
|
var cmdSubnetAdminAdd = &cobra.Command{
|
||||||
Use: "add",
|
Use: "add",
|
||||||
Short: "Add admin to the NeoFS subnet",
|
Short: "Add admin to the FrostFS subnet",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
viperBindFlags(cmd,
|
viperBindFlags(cmd,
|
||||||
flagSubnetAdminAddGroup,
|
flagSubnetAdminAddGroup,
|
||||||
|
@ -412,7 +412,7 @@ var cmdSubnetAdminAdd = &cobra.Command{
|
||||||
// command to remove subnet admin.
|
// command to remove subnet admin.
|
||||||
var cmdSubnetAdminRemove = &cobra.Command{
|
var cmdSubnetAdminRemove = &cobra.Command{
|
||||||
Use: "remove",
|
Use: "remove",
|
||||||
Short: "Remove admin of the NeoFS subnet",
|
Short: "Remove admin of the FrostFS subnet",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
viperBindFlags(cmd,
|
viperBindFlags(cmd,
|
||||||
flagSubnetAdminClient,
|
flagSubnetAdminClient,
|
||||||
|
@ -433,7 +433,7 @@ const (
|
||||||
// command to manage subnet clients.
|
// command to manage subnet clients.
|
||||||
var cmdSubnetClient = &cobra.Command{
|
var cmdSubnetClient = &cobra.Command{
|
||||||
Use: "client",
|
Use: "client",
|
||||||
Short: "Manage clients of the NeoFS subnet",
|
Short: "Manage clients of the FrostFS subnet",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
viperBindFlags(cmd,
|
viperBindFlags(cmd,
|
||||||
flagSubnetWallet,
|
flagSubnetWallet,
|
||||||
|
@ -516,7 +516,7 @@ func manageSubnetClients(cmd *cobra.Command, rm bool) error {
|
||||||
// command to add subnet client.
|
// command to add subnet client.
|
||||||
var cmdSubnetClientAdd = &cobra.Command{
|
var cmdSubnetClientAdd = &cobra.Command{
|
||||||
Use: "add",
|
Use: "add",
|
||||||
Short: "Add client to the NeoFS subnet",
|
Short: "Add client to the FrostFS subnet",
|
||||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||||
return manageSubnetClients(cmd, false)
|
return manageSubnetClients(cmd, false)
|
||||||
},
|
},
|
||||||
|
@ -525,7 +525,7 @@ var cmdSubnetClientAdd = &cobra.Command{
|
||||||
// command to remove subnet client.
|
// command to remove subnet client.
|
||||||
var cmdSubnetClientRemove = &cobra.Command{
|
var cmdSubnetClientRemove = &cobra.Command{
|
||||||
Use: "remove",
|
Use: "remove",
|
||||||
Short: "Remove client of the NeoFS subnet",
|
Short: "Remove client of the FrostFS subnet",
|
||||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||||
return manageSubnetClients(cmd, true)
|
return manageSubnetClients(cmd, true)
|
||||||
},
|
},
|
||||||
|
@ -598,7 +598,7 @@ func manageSubnetNodes(cmd *cobra.Command, rm bool) error {
|
||||||
// command to manage subnet nodes.
|
// command to manage subnet nodes.
|
||||||
var cmdSubnetNode = &cobra.Command{
|
var cmdSubnetNode = &cobra.Command{
|
||||||
Use: "node",
|
Use: "node",
|
||||||
Short: "Manage nodes of the NeoFS subnet",
|
Short: "Manage nodes of the FrostFS subnet",
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
viperBindFlags(cmd,
|
viperBindFlags(cmd,
|
||||||
flagSubnetWallet,
|
flagSubnetWallet,
|
||||||
|
@ -611,7 +611,7 @@ var cmdSubnetNode = &cobra.Command{
|
||||||
// command to add subnet node.
|
// command to add subnet node.
|
||||||
var cmdSubnetNodeAdd = &cobra.Command{
|
var cmdSubnetNodeAdd = &cobra.Command{
|
||||||
Use: "add",
|
Use: "add",
|
||||||
Short: "Add node to the NeoFS subnet",
|
Short: "Add node to the FrostFS subnet",
|
||||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||||
return manageSubnetNodes(cmd, false)
|
return manageSubnetNodes(cmd, false)
|
||||||
},
|
},
|
||||||
|
@ -620,7 +620,7 @@ var cmdSubnetNodeAdd = &cobra.Command{
|
||||||
// command to remove subnet node.
|
// command to remove subnet node.
|
||||||
var cmdSubnetNodeRemove = &cobra.Command{
|
var cmdSubnetNodeRemove = &cobra.Command{
|
||||||
Use: "remove",
|
Use: "remove",
|
||||||
Short: "Remove node from the NeoFS subnet",
|
Short: "Remove node from the FrostFS subnet",
|
||||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||||
return manageSubnetNodes(cmd, true)
|
return manageSubnetNodes(cmd, true)
|
||||||
},
|
},
|
||||||
|
@ -693,7 +693,7 @@ func init() {
|
||||||
_ = cmdSubnetClient.MarkFlagRequired(flagSubnetClientSubnet)
|
_ = cmdSubnetClient.MarkFlagRequired(flagSubnetClientSubnet)
|
||||||
clientFlags.String(flagSubnetClientGroup, "", "ID of the client group to work with")
|
clientFlags.String(flagSubnetClientGroup, "", "ID of the client group to work with")
|
||||||
_ = cmdSubnetClient.MarkFlagRequired(flagSubnetClientGroup)
|
_ = cmdSubnetClient.MarkFlagRequired(flagSubnetClientGroup)
|
||||||
clientFlags.String(flagSubnetClientID, "", "Client's user ID in NeoFS system in text format")
|
clientFlags.String(flagSubnetClientID, "", "Client's user ID in FrostFS system in text format")
|
||||||
_ = cmdSubnetClient.MarkFlagRequired(flagSubnetClientID)
|
_ = cmdSubnetClient.MarkFlagRequired(flagSubnetClientID)
|
||||||
clientFlags.StringP(flagSubnetWallet, "w", "", "Path to file with wallet")
|
clientFlags.StringP(flagSubnetWallet, "w", "", "Path to file with wallet")
|
||||||
_ = cmdSubnetClient.MarkFlagRequired(flagSubnetWallet)
|
_ = cmdSubnetClient.MarkFlagRequired(flagSubnetWallet)
|
||||||
|
|
|
@ -16,9 +16,9 @@ import (
|
||||||
var (
|
var (
|
||||||
rootCmd = &cobra.Command{
|
rootCmd = &cobra.Command{
|
||||||
Use: "frostfs-adm",
|
Use: "frostfs-adm",
|
||||||
Short: "NeoFS Administrative Tool",
|
Short: "FrostFS Administrative Tool",
|
||||||
Long: `NeoFS Administrative Tool provides functions to setup and
|
Long: `FrostFS Administrative Tool provides functions to setup and
|
||||||
manage NeoFS network deployment.`,
|
manage FrostFS network deployment.`,
|
||||||
RunE: entryPoint,
|
RunE: entryPoint,
|
||||||
SilenceUsage: true,
|
SilenceUsage: true,
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ func Execute() error {
|
||||||
func entryPoint(cmd *cobra.Command, args []string) error {
|
func entryPoint(cmd *cobra.Command, args []string) error {
|
||||||
printVersion, _ := cmd.Flags().GetBool("version")
|
printVersion, _ := cmd.Flags().GetBool("version")
|
||||||
if printVersion {
|
if printVersion {
|
||||||
cmd.Print(misc.BuildInfo("NeoFS Adm"))
|
cmd.Print(misc.BuildInfo("FrostFS Adm"))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ node:
|
||||||
relay: {{ .Relay }} # start Storage node in relay mode without bootstrapping into the Network map
|
relay: {{ .Relay }} # start Storage node in relay mode without bootstrapping into the Network map
|
||||||
subnet:
|
subnet:
|
||||||
exit_zero: false # toggle entrance to zero subnet (overrides corresponding attribute and occurrence in entries)
|
exit_zero: false # toggle entrance to zero subnet (overrides corresponding attribute and occurrence in entries)
|
||||||
entries: [] # list of IDs of subnets to enter in a text format of NeoFS API protocol (overrides corresponding attributes)
|
entries: [] # list of IDs of subnets to enter in a text format of FrostFS API protocol (overrides corresponding attributes)
|
||||||
|
|
||||||
grpc:
|
grpc:
|
||||||
num: 1 # total number of listener endpoints
|
num: 1 # total number of listener endpoints
|
||||||
|
|
|
@ -21,8 +21,8 @@ const (
|
||||||
|
|
||||||
var accountingBalanceCmd = &cobra.Command{
|
var accountingBalanceCmd = &cobra.Command{
|
||||||
Use: "balance",
|
Use: "balance",
|
||||||
Short: "Get internal balance of NeoFS account",
|
Short: "Get internal balance of FrostFS account",
|
||||||
Long: `Get internal balance of NeoFS account`,
|
Long: `Get internal balance of FrostFS account`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
var idUser user.ID
|
var idUser user.ID
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ var (
|
||||||
var createContainerCmd = &cobra.Command{
|
var createContainerCmd = &cobra.Command{
|
||||||
Use: "create",
|
Use: "create",
|
||||||
Short: "Create new container",
|
Short: "Create new container",
|
||||||
Long: `Create new container and register it in the NeoFS.
|
Long: `Create new container and register it in the FrostFS.
|
||||||
It will be stored in sidechain when inner ring will accepts it.`,
|
It will be stored in sidechain when inner ring will accepts it.`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
placementPolicy, err := parseContainerPolicy(cmd, containerPolicy)
|
placementPolicy, err := parseContainerPolicy(cmd, containerPolicy)
|
||||||
|
|
|
@ -19,8 +19,8 @@ const (
|
||||||
|
|
||||||
var healthCheckCmd = &cobra.Command{
|
var healthCheckCmd = &cobra.Command{
|
||||||
Use: "healthcheck",
|
Use: "healthcheck",
|
||||||
Short: "Health check of the NeoFS node",
|
Short: "Health check of the FrostFS node",
|
||||||
Long: "Health check of the NeoFS node. Checks storage node by default, use --ir flag to work with Inner Ring.",
|
Long: "Health check of the FrostFS node. Checks storage node by default, use --ir flag to work with Inner Ring.",
|
||||||
Run: healthCheck,
|
Run: healthCheck,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ const (
|
||||||
|
|
||||||
var setNetmapStatusCmd = &cobra.Command{
|
var setNetmapStatusCmd = &cobra.Command{
|
||||||
Use: "set-status",
|
Use: "set-status",
|
||||||
Short: "Set status of the storage node in NeoFS network map",
|
Short: "Set status of the storage node in FrostFS network map",
|
||||||
Long: "Set status of the storage node in NeoFS network map",
|
Long: "Set status of the storage node in FrostFS network map",
|
||||||
Run: setNetmapStatus,
|
Run: setNetmapStatus,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ import (
|
||||||
|
|
||||||
var netInfoCmd = &cobra.Command{
|
var netInfoCmd = &cobra.Command{
|
||||||
Use: "netinfo",
|
Use: "netinfo",
|
||||||
Short: "Get information about NeoFS network",
|
Short: "Get information about FrostFS network",
|
||||||
Long: "Get information about NeoFS network",
|
Long: "Get information about FrostFS network",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
p := key.GetOrGenerate(cmd)
|
p := key.GetOrGenerate(cmd)
|
||||||
cli := internalclient.GetSDKClientByFlag(cmd, p, commonflags.RPC)
|
cli := internalclient.GetSDKClientByFlag(cmd, p, commonflags.RPC)
|
||||||
|
|
|
@ -15,8 +15,8 @@ import (
|
||||||
var objectDelCmd = &cobra.Command{
|
var objectDelCmd = &cobra.Command{
|
||||||
Use: "delete",
|
Use: "delete",
|
||||||
Aliases: []string{"del"},
|
Aliases: []string{"del"},
|
||||||
Short: "Delete object from NeoFS",
|
Short: "Delete object from FrostFS",
|
||||||
Long: "Delete object from NeoFS",
|
Long: "Delete object from FrostFS",
|
||||||
Run: deleteObject,
|
Run: deleteObject,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ import (
|
||||||
|
|
||||||
var objectGetCmd = &cobra.Command{
|
var objectGetCmd = &cobra.Command{
|
||||||
Use: "get",
|
Use: "get",
|
||||||
Short: "Get object from NeoFS",
|
Short: "Get object from FrostFS",
|
||||||
Long: "Get object from NeoFS",
|
Long: "Get object from FrostFS",
|
||||||
Run: getObject,
|
Run: getObject,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ func getObject(cmd *cobra.Command, _ []string) {
|
||||||
|
|
||||||
if binary {
|
if binary {
|
||||||
objToStore := res.Header()
|
objToStore := res.Header()
|
||||||
//TODO(@acid-ant): #1932 Use streams to marshal/unmarshal payload
|
// TODO(@acid-ant): #1932 Use streams to marshal/unmarshal payload
|
||||||
objToStore.SetPayload(payloadBuffer.Bytes())
|
objToStore.SetPayload(payloadBuffer.Bytes())
|
||||||
objBytes, err := objToStore.Marshal()
|
objBytes, err := objToStore.Marshal()
|
||||||
common.ExitOnErr(cmd, "", err)
|
common.ExitOnErr(cmd, "", err)
|
||||||
|
|
|
@ -31,8 +31,8 @@ var putExpiredOn uint64
|
||||||
|
|
||||||
var objectPutCmd = &cobra.Command{
|
var objectPutCmd = &cobra.Command{
|
||||||
Use: "put",
|
Use: "put",
|
||||||
Short: "Put object to NeoFS",
|
Short: "Put object to FrostFS",
|
||||||
Long: "Put object to NeoFS",
|
Long: "Put object to FrostFS",
|
||||||
Run: putObject,
|
Run: putObject,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ func putObject(cmd *cobra.Command, _ []string) {
|
||||||
buf, err := os.ReadFile(filename)
|
buf, err := os.ReadFile(filename)
|
||||||
common.ExitOnErr(cmd, "unable to read given file: %w", err)
|
common.ExitOnErr(cmd, "unable to read given file: %w", err)
|
||||||
objTemp := object.New()
|
objTemp := object.New()
|
||||||
//TODO(@acid-ant): #1932 Use streams to marshal/unmarshal payload
|
// TODO(@acid-ant): #1932 Use streams to marshal/unmarshal payload
|
||||||
common.ExitOnErr(cmd, "can't unmarshal object from given file: %w", objTemp.Unmarshal(buf))
|
common.ExitOnErr(cmd, "can't unmarshal object from given file: %w", objTemp.Unmarshal(buf))
|
||||||
payloadReader = bytes.NewReader(objTemp.Payload())
|
payloadReader = bytes.NewReader(objTemp.Payload())
|
||||||
cnr, _ = objTemp.ContainerID()
|
cnr, _ = objTemp.ContainerID()
|
||||||
|
|
|
@ -36,10 +36,10 @@ var (
|
||||||
// rootCmd represents the base command when called without any subcommands.
|
// rootCmd represents the base command when called without any subcommands.
|
||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "frostfs-cli",
|
Use: "frostfs-cli",
|
||||||
Short: "Command Line Tool to work with NeoFS",
|
Short: "Command Line Tool to work with FrostFS",
|
||||||
Long: `NeoFS CLI provides all basic interactions with NeoFS and it's services.
|
Long: `FrostFS CLI provides all basic interactions with FrostFS and it's services.
|
||||||
|
|
||||||
It contains commands for interaction with NeoFS nodes using different versions
|
It contains commands for interaction with FrostFS nodes using different versions
|
||||||
of frostfs-api and some useful utilities for compiling ACL rules from JSON
|
of frostfs-api and some useful utilities for compiling ACL rules from JSON
|
||||||
notation, managing container access through protocol gates, querying network map
|
notation, managing container access through protocol gates, querying network map
|
||||||
and much more!`,
|
and much more!`,
|
||||||
|
@ -70,7 +70,7 @@ func init() {
|
||||||
|
|
||||||
// Cobra also supports local flags, which will only run
|
// Cobra also supports local flags, which will only run
|
||||||
// when this action is called directly.
|
// when this action is called directly.
|
||||||
rootCmd.Flags().Bool("version", false, "Application version and NeoFS API compatibility")
|
rootCmd.Flags().Bool("version", false, "Application version and FrostFS API compatibility")
|
||||||
|
|
||||||
rootCmd.AddCommand(acl.Cmd)
|
rootCmd.AddCommand(acl.Cmd)
|
||||||
rootCmd.AddCommand(bearerCli.Cmd)
|
rootCmd.AddCommand(bearerCli.Cmd)
|
||||||
|
@ -89,7 +89,7 @@ func init() {
|
||||||
func entryPoint(cmd *cobra.Command, _ []string) {
|
func entryPoint(cmd *cobra.Command, _ []string) {
|
||||||
printVersion, _ := cmd.Flags().GetBool("version")
|
printVersion, _ := cmd.Flags().GetBool("version")
|
||||||
if printVersion {
|
if printVersion {
|
||||||
cmd.Print(misc.BuildInfo("NeoFS CLI"))
|
cmd.Print(misc.BuildInfo("FrostFS CLI"))
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
|
|
||||||
var sgDelCmd = &cobra.Command{
|
var sgDelCmd = &cobra.Command{
|
||||||
Use: "delete",
|
Use: "delete",
|
||||||
Short: "Delete storage group from NeoFS",
|
Short: "Delete storage group from FrostFS",
|
||||||
Long: "Delete storage group from NeoFS",
|
Long: "Delete storage group from FrostFS",
|
||||||
Run: delSG,
|
Run: delSG,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@ var sgID string
|
||||||
|
|
||||||
var sgGetCmd = &cobra.Command{
|
var sgGetCmd = &cobra.Command{
|
||||||
Use: "get",
|
Use: "get",
|
||||||
Short: "Get storage group from NeoFS",
|
Short: "Get storage group from FrostFS",
|
||||||
Long: "Get storage group from NeoFS",
|
Long: "Get storage group from FrostFS",
|
||||||
Run: getSG,
|
Run: getSG,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
|
|
||||||
var sgListCmd = &cobra.Command{
|
var sgListCmd = &cobra.Command{
|
||||||
Use: "list",
|
Use: "list",
|
||||||
Short: "List storage groups in NeoFS container",
|
Short: "List storage groups in FrostFS container",
|
||||||
Long: "List storage groups in NeoFS container",
|
Long: "List storage groups in FrostFS container",
|
||||||
Run: listSG,
|
Run: listSG,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@ var sgMembers []string
|
||||||
|
|
||||||
var sgPutCmd = &cobra.Command{
|
var sgPutCmd = &cobra.Command{
|
||||||
Use: "put",
|
Use: "put",
|
||||||
Short: "Put storage group to NeoFS",
|
Short: "Put storage group to FrostFS",
|
||||||
Long: "Put storage group to NeoFS",
|
Long: "Put storage group to FrostFS",
|
||||||
Run: putSG,
|
Run: putSG,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import "github.com/spf13/cobra"
|
||||||
|
|
||||||
var convertCmd = &cobra.Command{
|
var convertCmd = &cobra.Command{
|
||||||
Use: "convert",
|
Use: "convert",
|
||||||
Short: "Convert representation of NeoFS structures",
|
Short: "Convert representation of FrostFS structures",
|
||||||
}
|
}
|
||||||
|
|
||||||
func initConvertCmd() {
|
func initConvertCmd() {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
// locode section.
|
// locode section.
|
||||||
var locodeCmd = &cobra.Command{
|
var locodeCmd = &cobra.Command{
|
||||||
Use: "locode",
|
Use: "locode",
|
||||||
Short: "Working with NeoFS UN/LOCODE database",
|
Short: "Working with FrostFS UN/LOCODE database",
|
||||||
}
|
}
|
||||||
|
|
||||||
func initLocodeCmd() {
|
func initLocodeCmd() {
|
||||||
|
|
|
@ -34,7 +34,7 @@ var (
|
||||||
|
|
||||||
locodeGenerateCmd = &cobra.Command{
|
locodeGenerateCmd = &cobra.Command{
|
||||||
Use: "generate",
|
Use: "generate",
|
||||||
Short: "Generate UN/LOCODE database for NeoFS",
|
Short: "Generate UN/LOCODE database for FrostFS",
|
||||||
Run: func(cmd *cobra.Command, _ []string) {
|
Run: func(cmd *cobra.Command, _ []string) {
|
||||||
locodeDB := csvlocode.New(
|
locodeDB := csvlocode.New(
|
||||||
csvlocode.Prm{
|
csvlocode.Prm{
|
||||||
|
|
|
@ -18,7 +18,7 @@ var (
|
||||||
|
|
||||||
locodeInfoCmd = &cobra.Command{
|
locodeInfoCmd = &cobra.Command{
|
||||||
Use: "info",
|
Use: "info",
|
||||||
Short: "Print information about UN/LOCODE from NeoFS database",
|
Short: "Print information about UN/LOCODE from FrostFS database",
|
||||||
Run: func(cmd *cobra.Command, _ []string) {
|
Run: func(cmd *cobra.Command, _ []string) {
|
||||||
targetDB := locodebolt.New(locodebolt.Prm{
|
targetDB := locodebolt.New(locodebolt.Prm{
|
||||||
Path: locodeInfoDBPath,
|
Path: locodeInfoDBPath,
|
||||||
|
@ -48,7 +48,7 @@ var (
|
||||||
func initUtilLocodeInfoCmd() {
|
func initUtilLocodeInfoCmd() {
|
||||||
flags := locodeInfoCmd.Flags()
|
flags := locodeInfoCmd.Flags()
|
||||||
|
|
||||||
flags.StringVar(&locodeInfoDBPath, locodeInfoDBFlag, "", "Path to NeoFS UN/LOCODE database")
|
flags.StringVar(&locodeInfoDBPath, locodeInfoDBFlag, "", "Path to FrostFS UN/LOCODE database")
|
||||||
_ = locodeInfoCmd.MarkFlagRequired(locodeInfoDBFlag)
|
_ = locodeInfoCmd.MarkFlagRequired(locodeInfoDBFlag)
|
||||||
|
|
||||||
flags.StringVar(&locodeInfoCode, locodeInfoCodeFlag, "", "UN/LOCODE")
|
flags.StringVar(&locodeInfoCode, locodeInfoCodeFlag, "", "UN/LOCODE")
|
||||||
|
|
|
@ -11,7 +11,7 @@ const (
|
||||||
|
|
||||||
var signCmd = &cobra.Command{
|
var signCmd = &cobra.Command{
|
||||||
Use: "sign",
|
Use: "sign",
|
||||||
Short: "Sign NeoFS structure",
|
Short: "Sign FrostFS structure",
|
||||||
}
|
}
|
||||||
|
|
||||||
func initSignCmd() {
|
func initSignCmd() {
|
||||||
|
|
|
@ -39,7 +39,7 @@ func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if *versionFlag {
|
if *versionFlag {
|
||||||
fmt.Print(misc.BuildInfo("NeoFS Inner Ring node"))
|
fmt.Print(misc.BuildInfo("FrostFS Inner Ring node"))
|
||||||
|
|
||||||
os.Exit(SuccessReturnCode)
|
os.Exit(SuccessReturnCode)
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
|
|
||||||
var command = &cobra.Command{
|
var command = &cobra.Command{
|
||||||
Use: "frostfs-lens",
|
Use: "frostfs-lens",
|
||||||
Short: "NeoFS Storage Engine Lens",
|
Short: "FrostFS Storage Engine Lens",
|
||||||
Long: `NeoFS Storage Engine Lens provides tools to browse the contents of the NeoFS storage engine.`,
|
Long: `FrostFS Storage Engine Lens provides tools to browse the contents of the FrostFS storage engine.`,
|
||||||
RunE: entryPoint,
|
RunE: entryPoint,
|
||||||
SilenceUsage: true,
|
SilenceUsage: true,
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ var command = &cobra.Command{
|
||||||
func entryPoint(cmd *cobra.Command, _ []string) error {
|
func entryPoint(cmd *cobra.Command, _ []string) error {
|
||||||
printVersion, _ := cmd.Flags().GetBool("version")
|
printVersion, _ := cmd.Flags().GetBool("version")
|
||||||
if printVersion {
|
if printVersion {
|
||||||
cmd.Print(misc.BuildInfo("NeoFS Lens"))
|
cmd.Print(misc.BuildInfo("FrostFS Lens"))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if *versionFlag {
|
if *versionFlag {
|
||||||
fmt.Print(misc.BuildInfo("NeoFS Storage node"))
|
fmt.Print(misc.BuildInfo("FrostFS Storage node"))
|
||||||
|
|
||||||
os.Exit(SuccessReturnCode)
|
os.Exit(SuccessReturnCode)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue