Alex Vanin
44138adacf
[ #1259 ] neofs-cli: Return non-zero exit code in acl extended create
command failures
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-21 19:20:19 +03:00
Evgenii Stratonikov
32badab11a
[ #1252 ] neofs-cli: Print details for AccessDenied errors
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-21 19:20:01 +03:00
Evgenii Stratonikov
800d01e28c
[ #1233 ] neofs-cli: Do not print info if output format is strict
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-21 14:52:05 +03:00
Evgenii Stratonikov
5eef0f46c5
[ #1233 ] neofs-cli: Respect format flags for SplitInfo
output
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-21 14:52:05 +03:00
Pavel Karpy
9ce0bbe90f
[ #1245 ] cli: Fix linter
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-03-17 12:09:00 +03:00
Pavel Karpy
5506b7af29
[ #1245 ] cli: Add object notification to CLI
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-03-17 12:09:00 +03:00
Evgenii Stratonikov
ad4583fe85
[ #1185 ] neofs-cli: Add progress bar to object put/get
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-16 17:28:35 +03:00
Alex Vanin
362cda53d2
[ #1238 ] Call String()
explicitly instead of using stringer pointer
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-16 15:29:31 +03:00
Alex Vanin
7f3195b197
[ #1238 ] Adopt neofs-cli for non pointer slices in SDK
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-16 15:29:31 +03:00
Leonard Lyubich
323dea95c6
[ #1181 ] Do not use deprecated elements
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-15 13:03:23 +03:00
Leonard Lyubich
d92b1d1bf8
[ #1175 ] CLI: Implement command to lock the objects
...
Implement `lock` command and add it to `object` section. The command
accepts container argument (string `cid.ID`) and list of locked objects
(string `oid.ID` list). From the provided input `LOCK` object is
constructed and stored using NeoFS API protocol.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-15 13:03:23 +03:00
Leonard Lyubich
637077a883
[ #1181 ] CLI: Simplify object type output
...
There is no need to switch between object types since `Type` implements
`fmt.Stringer`.
Replace swich-case in `printHeader` with `%s` format notation function.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-15 13:03:23 +03:00
Alex Vanin
b6720d5f97
[ #1231 ] Update new SDK Client interface
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-14 13:18:48 +03:00
Leonard Lyubich
7ccd1625af
[ #1214 ] *: Use single Object
type in whole project
...
Remove `Object` and `RawObject` types from `pkg/core/object` package.
Use `Object` type from NeoFS SDK Go library everywhere. Avoid using the
deprecated elements.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-04 17:45:00 +03:00
Alex Vanin
99749ea042
[ #1211 ] neofs-cli: Specify address in session token
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-04 11:47:24 +03:00
Alex Vanin
1b5cb2dfe2
[ #1211 ] neofs-cli: Specify verb in object session token
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-04 11:47:24 +03:00
Alex Vanin
6d3e626f20
[ #1211 ] neofs-cli: Fix objectIDs list reader
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-04 11:47:24 +03:00
Alex Vanin
4935016bf8
[ #1211 ] neofs-cli: Set bearer and session token in all object service requests
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-04 11:47:24 +03:00
Leonard Lyubich
b5bdcfc076
[ #1194 ] client: Support request X-headers
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-03 15:38:38 +03:00
Alex Vanin
09db5e387d
[ #1200 ] cli: Mention filter key prefixes in eACL creation command
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-01 10:36:41 +03:00
Leonard Lyubich
e0dce1043a
[ #1195 ] Adopt recent changes in NeoFS SDK
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-28 10:43:03 +03:00
Evgenii Stratonikov
a8d10704d5
[ #1182 ] neofs-cli: use BasicACL.String()
for user output
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-22 11:26:34 +03:00
Pavel Karpy
1667ec9e6d
[ #1131 ] *: Adopt SDK changes
...
`object.Address` has been moved to `object/address`
`object.ID` has been moved to `object/id`
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-02-08 09:45:38 +03:00
Evgenii Stratonikov
97d18bc515
[ #625 ] client/netmap: remove intermediate wrapper
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-08 09:43:54 +03:00
Pavel Karpy
c7a8c762e0
[ #1136 ] cli: Allow usage of empty wallet passwords
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-02-07 14:42:46 +03:00
Alex Vanin
b86b06c0ca
[ #1101 ] neofs-cli: Set expiration in session token based on network info
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-02-07 13:29:25 +03:00
Evgenii Stratonikov
ed50cf6207
[ #1118 ] services/control: return error counter in ListShards
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-03 15:14:27 +03:00
Evgenii Stratonikov
7fb15fa1d0
[ #1118 ] services/control: allow to reset error counter in SetShardMode
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-03 15:14:27 +03:00
Leonard Lyubich
4f3323f084
[ #1101 ] *: Adopt interface changes of API client from SDK library
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-03 14:00:14 +03:00
Evgenii Stratonikov
674f520da7
[ #1132 ] *: Use path/filepath
package when working with files
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-03 10:12:07 +03:00
Evgenii Stratonikov
3407fef799
[ #1086 ] neofs-cli: add command for shard restore
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-31 12:36:14 +03:00
Evgenii Stratonikov
2ec4a3c897
[ #1086 ] neofs-cli: add command for shard dump
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-31 12:36:14 +03:00
Pavel Karpy
679c922e0c
[ #1120 ] cli: Fix printing config file in verbose
mode
...
It was broken since `initConfig` was made before every execution of the
command and flags have not been read by cobra yet, so it was impossible to
print config file path if `verbose` flag was set in command line not in
config file.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-01-31 11:24:16 +03:00
Alex Vanin
08e83a2bc7
[ #1092 ] neofs-cli: Add 'acl extended create' command
...
Follows neofs-cli refactor scheme from #1074
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-01-28 10:39:18 +03:00
Leonard Lyubich
257069a132
[ #1084 ] cli/accounting: Convert balance response to Fixed8
...
After recent changes balance response contains contract precision.
Convert balance response to Fixed8. Use `fixedn.ToString` function to
print the converted value.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-01-26 14:10:02 +03:00
Evgenii Stratonikov
dbb04d78b9
[ #1103 ] neofs-cli: mention IR in healthcheck help message
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-26 14:09:42 +03:00
Evgenii Stratonikov
5c2b2e137d
[ #1103 ] neofs-cli: disallow generating key for control commands
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-26 14:09:42 +03:00
Evgenii Stratonikov
007158ebe1
[ #1103 ] neofs-cli: allow to set password in config
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-26 14:09:42 +03:00
Pavel Karpy
fee2f5a330
[ #1100 ] *: Adopt new SDK's owner.ID
API
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-01-21 17:58:30 +03:00
Evgenii Stratonikov
759421ebbf
[ #1083 ] neofs-cli: use single flag for key and wallet
...
Currently have static priority of what key is used irregardless of
whether a flag was provided via CLI or in config. This makes it
impossible to override some of the config settings. While we could try
to check if the key is provided by CLI by binding CLI flag under to
viper under a different name the same problem would occur for config/environment
variables. Fixing all of this with current set of keys is too complicate.
In this commit we revert changes from #610 and use a single flag for all types of keys.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-21 10:46:53 +03:00
Pavel Karpy
7c02a2e251
[ #1087 ] *: Adopt SDK changes
...
- Update `neofs-sdk-go`:
v0.0.0-20211230072947-1fe37df88f80 => v0.0.0-20220113123743-7f3162110659
- Add client interface that duplicates SDK's client behaviour and new
`MultiAddressClient` interface that has method that iterates over wrapped
clients.
- Also start using simple client mode that does not require parsing statuses
outside the SDK library.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-01-14 17:29:03 +03:00
Evgenii Stratonikov
efabffbfd0
[ #1041 ] cmd/*: factor out autocomplet command generation
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-12 18:33:48 +03:00
Pavel Karpy
86b90eb944
[ #1059 ] cli: Add SetShardMode
operation
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-30 14:14:48 +03:00
Alex Vanin
90f05d4448
[ #1066 ] cli: Support basic ACL constants without final flag
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-12-30 14:07:18 +03:00
Pavel Karpy
f5a9735e1c
[ #1048 ] cli: Add shard list
operation
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-28 13:21:44 +03:00
Pavel Karpy
90dbf3d944
[ #1039 ] cli: Make return codes depend on errors
...
Cast client errors to well-known public `sdk` errors and return appropriate
exit code.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-16 16:03:41 +03:00
Stanislav Bogatyrev
bd4d17ef9e
[ #1034 ] Add shorthand for generate-key flag
...
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2021-12-10 19:54:41 +03:00
Pavel Karpy
6207a2f261
[ #988 ] cli: Add subnet
flag to container create
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-11-29 11:03:56 +03:00
Leonard Lyubich
7f5fb130c0
[ #961 ] *: Support NeoFS API status returns
...
Upgrade NeoFS API Go library to version with status returns. Make all API
clients to pull out and return errors from failed statuses. Make signature
service to respond with status if client version supports it.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-24 09:26:40 +03:00
Leonard Lyubich
44d0d453ef
[ #961 ] client: Clarify error returns in docs
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-24 09:26:40 +03:00