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

Add examples of inspect cmd #590

Merged
merged 1 commit into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cmd/ignite/cmd/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ func NewCmdInspect(out io.Writer) *cobra.Command {
The kind can be "image", "kernel" or "vm". The object is matched
by prefix based on its ID and name. Outputs JSON by default, can
be overridden with the output flag (-o, --output).

Example usage:
$ ignite inspect vm my-vm

$ ignite inspect vm my-vm -t {{.Status.IPAddresses}}

$ ignite inspect vm my-vm -t {{.ObjectMeta.Name}}

$ ignite inspect vm my-vm -t {{.Spec.Image.OCI}}
`),
Args: cobra.ExactArgs(2),
Run: func(cmd *cobra.Command, args []string) {
Expand Down
9 changes: 9 additions & 0 deletions docs/cli/ignite/ignite_inspect.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ The kind can be "image", "kernel" or "vm". The object is matched
by prefix based on its ID and name. Outputs JSON by default, can
be overridden with the output flag (-o, --output).

Example usage:
$ ignite inspect vm my-vm

$ ignite inspect vm my-vm -t {{.Status.IPAddresses}}

$ ignite inspect vm my-vm -t {{.ObjectMeta.Name}}

$ ignite inspect vm my-vm -t {{.Spec.Image.OCI}}


```
ignite inspect <kind> <object> [flags]
Expand Down