Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support well-known application attributes in CLI #144

Merged
merged 2 commits into from
Nov 5, 2020

Conversation

alexvanin
Copy link
Contributor

Closes #117

Container attributes

Use --name argument to set container nicename

$ ./bin/neofs-cli -c config.yml container create --policy ./rule.ql --name "ABC" --await
container ID: 4Uy1tGStwxnVzkcDzxUNba6bUV6bQ1FakHrLPCFPpqZh
awaiting...
container has been persisted on sidechain
$ ./bin/neofs-cli -c config.yml container get --cid 4Uy1tGStwxnVzkcDzxUNba6bUV6bQ1FakHrLPCFPpqZh
container ID: 4Uy1tGStwxnVzkcDzxUNba6bUV6bQ1FakHrLPCFPpqZh
version: 2.0
...
attribute: Timestamp=1604411491 (2020-11-03 16:51:31 +0300 MSK)
attribute: Name=ABC
...

Use --disable-timestamp flag to not set timestamp attribute automatically.

Object attributes

$ ./bin/neofs-cli -c config.yml object put --cid 3mskf4dJJ2GHxYpEmkvL9Xt67ZYS6GBLyCGtZU52VS2E --file LICENSE
[LICENSE] Object successfully stored
  ID: 7yptiT6NGCK56K4MrFohtDvT8uVc8awhaH3qwhBx5KaH
  CID: 3mskf4dJJ2GHxYpEmkvL9Xt67ZYS6GBLyCGtZU52VS2E
$ ./bin/neofs-cli -c config.yml object head --cid 3mskf4dJJ2GHxYpEmkvL9Xt67ZYS6GBLyCGtZU52VS2E --oid 7yptiT6NGCK56K4MrFohtDvT8uVc8awhaH3qwhBx5KaH
ID: 7yptiT6NGCK56K4MrFohtDvT8uVc8awhaH3qwhBx5KaH
CID: 3mskf4dJJ2GHxYpEmkvL9Xt67ZYS6GBLyCGtZU52VS2E
...                                                                  
Attributes:
  FileName=LICENSE
  Timestamp=1604413708 (2020-11-03 17:28:28 +0300 MSK)

Use --disable-filename and --disable-timestamp flags to not set these attributes automatically.

@codecov
Copy link

codecov bot commented Nov 3, 2020

Codecov Report

Merging #144 into master will increase coverage by 0.10%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #144      +/-   ##
==========================================
+ Coverage   42.97%   43.08%   +0.10%     
==========================================
  Files          66       66              
  Lines        2820     2820              
==========================================
+ Hits         1212     1215       +3     
+ Misses       1480     1478       -2     
+ Partials      128      127       -1     
Impacted Files Coverage Δ
pkg/network/muxer/muxer.go 98.96% <0.00%> (+3.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9707729...a0b8ac2. Read the comment docs.

@alexvanin alexvanin merged commit 54818d5 into nspcc-dev:master Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality neofs-cli NeoFS CLI application issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set well-known attributes of objects and containers in CLI
3 participants