forked from TrueCloudLab/frostfs-node
[#2104] cli: OID signature in output
OID signature should always be present in an object; it does not relate to the object split. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
816c74d185
commit
ca3596dd05
2 changed files with 12 additions and 11 deletions
|
@ -38,6 +38,7 @@ Changelog for NeoFS Node
|
||||||
- Panic in IR when performing HEAD requests (#2069)
|
- Panic in IR when performing HEAD requests (#2069)
|
||||||
- Write-cache flush duplication (#2074)
|
- Write-cache flush duplication (#2074)
|
||||||
- Ignore error if a transaction already exists in a morph client (#2075)
|
- Ignore error if a transaction already exists in a morph client (#2075)
|
||||||
|
- ObjectID signature output in the CLI (#2104)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
### Updated
|
### Updated
|
||||||
|
|
|
@ -160,6 +160,17 @@ func printHeader(cmd *cobra.Command, obj *object.Object) error {
|
||||||
cmd.Printf(" %s=%s\n", attr.Key(), attr.Value())
|
cmd.Printf(" %s=%s\n", attr.Key(), attr.Value())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if signature := obj.Signature(); signature != nil {
|
||||||
|
cmd.Print("ID signature:\n")
|
||||||
|
|
||||||
|
// TODO(@carpawell): #1387 implement and use another approach to avoid conversion
|
||||||
|
var sigV2 refs.Signature
|
||||||
|
signature.WriteToV2(&sigV2)
|
||||||
|
|
||||||
|
cmd.Printf(" public key: %s\n", hex.EncodeToString(sigV2.GetKey()))
|
||||||
|
cmd.Printf(" signature: %s\n", hex.EncodeToString(sigV2.GetSign()))
|
||||||
|
}
|
||||||
|
|
||||||
return printSplitHeader(cmd, obj)
|
return printSplitHeader(cmd, obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,17 +191,6 @@ func printSplitHeader(cmd *cobra.Command, obj *object.Object) error {
|
||||||
cmd.Printf("Split ChildID: %s\n", child.String())
|
cmd.Printf("Split ChildID: %s\n", child.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
if signature := obj.Signature(); signature != nil {
|
|
||||||
cmd.Print("Split Header Signature:\n")
|
|
||||||
|
|
||||||
// TODO(@cthulhu-rider): #1387 implement and use another approach to avoid conversion
|
|
||||||
var sigV2 refs.Signature
|
|
||||||
signature.WriteToV2(&sigV2)
|
|
||||||
|
|
||||||
cmd.Printf(" public key: %s\n", hex.EncodeToString(sigV2.GetKey()))
|
|
||||||
cmd.Printf(" signature: %s\n", hex.EncodeToString(sigV2.GetSign()))
|
|
||||||
}
|
|
||||||
|
|
||||||
parent := obj.Parent()
|
parent := obj.Parent()
|
||||||
if parent != nil {
|
if parent != nil {
|
||||||
cmd.Print("\nSplit Parent Header:\n")
|
cmd.Print("\nSplit Parent Header:\n")
|
||||||
|
|
Loading…
Reference in a new issue