From 23db20582cd766b0c2efe01a842062f55ed74cc3 Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Thu, 28 Mar 2024 17:27:22 +0300 Subject: [PATCH] [#1064] cli: Add EC header output to object head Signed-off-by: Dmitrii Stepanov --- cmd/frostfs-cli/modules/object/head.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/frostfs-cli/modules/object/head.go b/cmd/frostfs-cli/modules/object/head.go index db466e588..f97ef952d 100644 --- a/cmd/frostfs-cli/modules/object/head.go +++ b/cmd/frostfs-cli/modules/object/head.go @@ -171,6 +171,15 @@ func printHeader(cmd *cobra.Command, obj *objectSDK.Object) error { cmd.Printf(" signature: %s\n", hex.EncodeToString(sigV2.GetSign())) } + if ecHeader := obj.ECHeader(); ecHeader != nil { + cmd.Print("EC header:\n") + + cmd.Printf(" parent object ID: %s\n", ecHeader.Parent().EncodeToString()) + cmd.Printf(" index: %d\n", ecHeader.Index()) + cmd.Printf(" total: %d\n", ecHeader.Total()) + cmd.Printf(" header length: %d\n", ecHeader.HeaderLength()) + } + return printSplitHeader(cmd, obj) }