Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

How to use Go template to fetch data from ignite inspect output? #587

@zhuangh7

Description

@zhuangh7

Hi there, I'm not familar with Go template and I try to use '-t' of ignite inspect command.
I used to use Go template in docker inspect, and I can use command like:
docker inspect --format {{.NetworkSettings.Networks.bridge.IPAddress}} 1564bdd87437
to get the ip of the container

But when I use command like:
sudo ignite inspect -t '{{.status.ipAddresses}}' vm 24
it just response with an error:
FATA[0000] failed rendering template: template: :1:9: executing "" at <.status.ipAddresses>: can't evaluate field status in type *ignite.VM

Could you please give me some idea about how to use Go timeplate here?
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions