[#13] Add 'info' command for the FrostFS backend #17

Merged
alexvanin merged 2 commits from KurlesHS/rclone:feat/frostfs_info_cmd into tcl/master 2025-02-24 14:35:30 +00:00
Member

The about command only provides certain numeric values related to file system quotas. To enable retrieving information about the container and, optionally, the object, I implemented the FrostFS backend command info.
The output format follows the one used in the frostfs-cli utility with the 'container get' and 'object head' parameters.
To facilitate retrieving the object and container identifiers in automation scripts, I added an optional 'format' option to customize the output.

Usage examples:

$ rclone backend info frostfs:container/path/to/dir
$ rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt
$ rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt -o "format={cid}:{oid}"

close #13

The `about` command only provides certain numeric values related to file system quotas. To enable retrieving information about the container and, optionally, the object, I implemented the FrostFS backend command `info`. The output format follows the one used in the frostfs-cli utility with the 'container get' and 'object head' parameters. To facilitate retrieving the object and container identifiers in automation scripts, I added an optional 'format' option to customize the output. Usage examples: ``` bash $ rclone backend info frostfs:container/path/to/dir $ rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt $ rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt -o "format={cid}:{oid}" ``` close #13
KurlesHS added 2 commits 2025-02-18 07:43:16 +00:00
Signed-off-by: Aleksey Kravchenko <al.kravchenko@yadro.com>
[#13] Add docs about info FrostFS backend cmd
Some checks failed
/ DCO (pull_request) Successful in 52s
/ Builds (pull_request) Successful in 1m14s
/ Lint (pull_request) Failing after 2m9s
/ Test (pull_request) Successful in 3m4s
bd909f9fdd
Signed-off-by: Aleksey Kravchenko <al.kravchenko@yadro.com>
KurlesHS self-assigned this 2025-02-18 07:43:25 +00:00
requested reviews from storage-services-committers, storage-services-developers 2025-02-18 07:43:56 +00:00
dkirillov approved these changes 2025-02-20 09:11:29 +00:00
Dismissed
dkirillov left a comment
Member

LGTM

LGTM
@ -157,1 +160,4 @@
var commandHelp = []fs.CommandHelp{
{
Name: "info",
Member

Why do we use info instead of about?

Why do we use `info` instead of `about`?
Author
Member

I named the command for displaying information about backend objects info instead of about to avoid confusion with the built-in about command in rclone. But if it's not OK, I can rename it to about. cc @alexvanin

I named the command for displaying information about backend objects `info` instead of `about` to avoid confusion with the built-in `about` command in rclone. But if it's not OK, I can rename it to `about`. cc @alexvanin
Member

I've thought we can implement some methods to show info when built-in about command is used. This is wrong?

I've thought we can implement some methods to show info when built-in `about` command is used. This is wrong?
Author
Member

Yes, this is wrong. There is no way to output additional information using the built-in about command, as it relies on the Abouter interface implementation. This interface contains only a single method that returns a structure with six numeric parameters, which are then printed to stdout.

https://git.frostfs.info/TrueCloudLab/rclone/src/branch/tcl/master/cmd/about/about.go#L120

Yes, this is wrong. There is no way to output additional information using the built-in `about` command, as it relies on the `Abouter` interface implementation. This interface contains only a single method that returns a structure with six numeric parameters, which are then printed to stdout. https://git.frostfs.info/TrueCloudLab/rclone/src/branch/tcl/master/cmd/about/about.go#L120
dkirillov marked this conversation as resolved
alexvanin approved these changes 2025-02-21 14:42:42 +00:00
Dismissed
KurlesHS force-pushed feat/frostfs_info_cmd from bd909f9fdd to 4733d46d83 2025-02-22 09:06:30 +00:00 Compare
KurlesHS dismissed dkirillov's review 2025-02-22 09:06:30 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

KurlesHS dismissed alexvanin's review 2025-02-22 09:06:30 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

dkirillov approved these changes 2025-02-24 11:44:39 +00:00
alexvanin approved these changes 2025-02-24 14:35:24 +00:00
alexvanin merged commit 4733d46d83 into tcl/master 2025-02-24 14:35:30 +00:00
alexvanin deleted branch feat/frostfs_info_cmd 2025-02-24 14:35:33 +00:00
Sign in to join this conversation.
No description provided.