Print resolved container id in list-container

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
Denis Kirillov 2024-09-03 15:41:05 +03:00
parent f9ac7b7f53
commit 39f8d20cfa

View file

@ -44,6 +44,9 @@ func runListContainerCmd(cmd *cobra.Command, _ []string) error {
ns := viper.GetString(namespaceFlag)
cnrID, err := resolver.ResolveContainerID(endpoint, ns, viper.GetString(containerFlag))
if err != nil {
return err
}
policyHash, err := resolver.ResolveContractHash(endpoint, viper.GetString(policyHashFlag))
if err != nil {
@ -62,6 +65,7 @@ func runListContainerCmd(cmd *cobra.Command, _ []string) error {
decodeID := viper.GetBool(decodeIDFlag)
cmd.Println("cid:", cnrID)
cmd.Printf("namespace '%s' policies: %d\n", ns, len(res))
if err = printChains(cmd, res, decodeID); err != nil {
return err