generated from TrueCloudLab/basic
Print resolved container id in list-container
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
f9ac7b7f53
commit
39f8d20cfa
1 changed files with 4 additions and 0 deletions
|
@ -44,6 +44,9 @@ func runListContainerCmd(cmd *cobra.Command, _ []string) error {
|
||||||
ns := viper.GetString(namespaceFlag)
|
ns := viper.GetString(namespaceFlag)
|
||||||
|
|
||||||
cnrID, err := resolver.ResolveContainerID(endpoint, ns, viper.GetString(containerFlag))
|
cnrID, err := resolver.ResolveContainerID(endpoint, ns, viper.GetString(containerFlag))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
policyHash, err := resolver.ResolveContractHash(endpoint, viper.GetString(policyHashFlag))
|
policyHash, err := resolver.ResolveContractHash(endpoint, viper.GetString(policyHashFlag))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -62,6 +65,7 @@ func runListContainerCmd(cmd *cobra.Command, _ []string) error {
|
||||||
|
|
||||||
decodeID := viper.GetBool(decodeIDFlag)
|
decodeID := viper.GetBool(decodeIDFlag)
|
||||||
|
|
||||||
|
cmd.Println("cid:", cnrID)
|
||||||
cmd.Printf("namespace '%s' policies: %d\n", ns, len(res))
|
cmd.Printf("namespace '%s' policies: %d\n", ns, len(res))
|
||||||
if err = printChains(cmd, res, decodeID); err != nil {
|
if err = printChains(cmd, res, decodeID); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue