Merge pull request from rhatdan/man

[CI:DOCS] Document --format for additional man pages
This commit is contained in:
OpenShift Merge Robot
2023-03-15 17:25:35 -04:00
committed by GitHub
8 changed files with 202 additions and 3 deletions

@ -18,6 +18,34 @@ all results in a JSON array. If a format is specified, the given template will
Format the output using the given Go template. Format the output using the given Go template.
The keys of the returned JSON can be used as the values for the --format flag (see examples below). The keys of the returned JSON can be used as the values for the --format flag (see examples below).
Valid placeholders for the Go template are listed below:
| **Placeholder** | **Description** |
| ----------------- | ------------------ |
| .Annotations | Annotation information included in the image |
| .Architecture | Architecture of software in the image |
| .Author | Image author |
| .Comment | Image comment |
| .Config ... | Structure with config info |
| .Created | Image creation time (string, ISO3601) |
| .Digest | Image digest (sha256:+64-char hash) |
| .GraphDriver ... | Structure for the graph driver info |
| .HealthCheck ... | Structure for the health check info |
| .History | History information stored in image |
| .ID | Image ID (full 64-char hash) |
| .Labels | Label information included in the image |
| .ManifestType | Manifest type of the image |
| .NamesHistory | Name history information stored in image |
| .Os | Operating system of software in the image |
| .Parent | Parent image of the specified image |
| .RepoDigests | Repository digests for the image |
| .RepoTags | Repository tags for the image |
| .RootFS ... | Structure for the root file system info |
| .Size | Size of image, in bytes |
| .User | Default user to execute the image as |
| .Version | Image Version |
| .VirtualSize | Virtual size of image, in bytes |
## EXAMPLE ## EXAMPLE
``` ```

@ -17,6 +17,11 @@ Rootless only, as all `podman machine` commands can be only be used with rootles
Change output format to "json" or a Go template. Change output format to "json" or a Go template.
| **Placeholder** | **Description** |
| ------------------- | --------------------------------- |
| .Host ... | Host information for local machine|
| .Version ... | Version of the machine |
#### **--help** #### **--help**
Print usage statement. Print usage statement.
@ -25,8 +30,60 @@ Print usage statement.
``` ```
$ podman machine info $ podman machine info
Host:
Arch: amd64
CurrentMachine: ""
DefaultMachine: ""
EventsDir: /run/user/3267/podman
MachineConfigDir: /home/myusername/.config/containers/podman/machine/qemu
MachineImageDir: /home/myusername/.local/share/containers/podman/machine/qemu
MachineState: ""
NumberOfMachines: 0
OS: linux
VMType: qemu
Version:
APIVersion: 4.4.0
Built: 1677097848
BuiltTime: Wed Feb 22 15:30:48 2023
GitCommit: aa196c0d5c9abd5800edf9e27587c60343a26c2b-dirty
GoVersion: go1.20
Os: linux
OsArch: linux/amd64
Version: 4.4.0
```
```
$ podman machine info --format json $ podman machine info --format json
$ podman machine info --format {{.Host.Arch}} {
"Host": {
"Arch": "amd64",
"CurrentMachine": "",
"DefaultMachine": "",
"EventsDir": "/run/user/3267/podman",
"MachineConfigDir": "/home/myusername/.config/containers/podman/machine/qemu",
"MachineImageDir": "/home/myusername/.local/share/containers/podman/machine/qemu",
"MachineState": "",
"NumberOfMachines": 0,
"OS": "linux",
"VMType": "qemu"
},
"Version": {
"APIVersion": "4.4.0",
"Version": "4.4.0",
"GoVersion": "go1.20",
"GitCommit": "aa196c0d5c9abd5800edf9e27587c60343a26c2b-dirty",
"BuiltTime": "Wed Feb 22 15:30:48 2023",
"Built": 1677097848,
"OsArch": "linux/amd64",
"Os": "linux"
}
}
```
```
$ podman machine info --format "{{ .Host.Arch }}"
amd64
``` ```
## SEE ALSO ## SEE ALSO

@ -20,6 +20,18 @@ Rootless only.
Print results with a Go template. Print results with a Go template.
| **Placeholder** | **Description** |
| ------------------- | ----------------------------------------------------- |
| .ConfigPath ... | Machine configuration file location |
| .ConnectionInfo ... | Machine connection information |
| .Created | Machine creation time (string, ISO3601) |
| .Image ... | Machine image config |
| .LastUp | Time when machine was last booted |
| .Name | Name of the machine |
| .Resources ... | Resources used by the machine |
| .SSHConfig ... | SSH configuration info for communitating with machine |
| .State ... | Machine state |
#### **--help** #### **--help**
Print usage statement. Print usage statement.

@ -23,7 +23,7 @@ Format secret output using Go template.
|--------------------------|-------------------------------------------------------------------| |--------------------------|-------------------------------------------------------------------|
| .CreatedAt | When secret was created (relative timestamp, human-readable) | | .CreatedAt | When secret was created (relative timestamp, human-readable) |
| .ID | ID of secret | | .ID | ID of secret |
| .Spec | Details of secret | | .Spec ... | Details of secret |
| .Spec.Driver | Driver info | | .Spec.Driver | Driver info |
| .Spec.Driver.Name | Driver name (string) | | .Spec.Driver.Name | Driver name (string) |
| .Spec.Driver.Options ... | Driver options (map of driver-specific options) | | .Spec.Driver.Options ... | Driver options (map of driver-specific options) |

@ -28,6 +28,20 @@ Valid filters are listed below:
Format secret output using Go template. Format secret output using Go template.
Valid placeholders for the Go template are listed below:
| **Placeholder** | **Description** |
| ------------------------ | ----------------------------------------------------------------- |
| .CreatedAt | When secret was created (relative timestamp, human-readable) |
| .ID | ID of secret |
| .Spec ... | Details of secret |
| .Spec.Driver | Driver info |
| .Spec.Driver.Name | Driver name (string) |
| .Spec.Driver.Options ... | Driver options (map of driver-specific options) |
| .Spec.Labels | Labels for this secret |
| .Spec.Name | Name of secret |
| .UpdatedAt | When secret was last updated (relative timestamp, human-readable) |
@@option noheading @@option noheading
#### **--quiet**, **-q** #### **--quiet**, **-q**

@ -14,6 +14,19 @@ Show podman disk usage
Pretty-print images using a Go template or JSON. This flag is not allowed in combination with **--verbose** Pretty-print images using a Go template or JSON. This flag is not allowed in combination with **--verbose**
Valid placeholders for the Go template are listed below:
| **Placeholder** | **Description** |
| ------------------------- | ------------------------------------------------ |
| .Active | Indicates whether volume is in use |
| .RawReclaimable | Raw reclaimable size of each Type |
| .RawSize | Raw size of each type |
| .Reclaimable | Reclaimable size or each type (human-readable) |
| .Size | Size of each type (human-readable) |
| .Total | Total items for each type |
| .Type | Type of data |
#### **--verbose**, **-v** #### **--verbose**, **-v**
Show detailed information on space usage Show detailed information on space usage

@ -24,6 +24,27 @@ Inspect all volumes.
Format volume output using Go template Format volume output using Go template
Valid placeholders for the Go template are listed below:
| **Placeholder** | **Description** |
| ------------------- | ------------------------------------------------------ |
| .Anonymous | Indicates whether volume is anonymous |
| .CreatedAt | Volume creation time |
| .Driver | Volume driver |
| .GID | GID the volume was created with |
| .Labels | Label information associated with the volume |
| .MountCount | Number of times the volume is mounted |
| .Mountpoint | Source of volume mount point |
| .Name | Volume name |
| .NeedsChown | Indicates volume needs to be chowned on first use |
| .NeedsCopyUp | Indicates volume needs dest data copied up on first use|
| .Options | Volume options |
| .Scope | Volume scope |
| .Status | Status of the volume |
| .StorageID | StorageID of the volume |
| .Timeout | Timeout of the volume |
| .UID | UID the volume was created with |
#### **--help** #### **--help**
Print usage statement Print usage statement
@ -33,10 +54,41 @@ Print usage statement
``` ```
$ podman volume inspect myvol $ podman volume inspect myvol
[
{
"Name": "myvol",
"Driver": "local",
"Mountpoint": "/home/myusername/.local/share/containers/storage/volumes/myvol/_data",
"CreatedAt": "2023-03-13T16:26:48.423069028-04:00",
"Labels": {},
"Scope": "local",
"Options": {},
"MountCount": 0,
"NeedsCopyUp": true,
"NeedsChown": true
}
]
```
$ podman volume inspect --all $ podman volume inspect --all
[
{
"Name": "myvol",
"Driver": "local",
"Mountpoint": "/home/myusername/.local/share/containers/storage/volumes/myvol/_data",
"CreatedAt": "2023-03-13T16:26:48.423069028-04:00",
"Labels": {},
"Scope": "local",
"Options": {},
"MountCount": 0,
"NeedsCopyUp": true,
"NeedsChown": true
}
]
```
```
$ podman volume inspect --format "{{.Driver}} {{.Scope}}" myvol $ podman volume inspect --format "{{.Driver}} {{.Scope}}" myvol
local local
``` ```
## SEE ALSO ## SEE ALSO

@ -32,6 +32,29 @@ Volumes can be filtered by the following attributes:
Format volume output using Go template. Format volume output using Go template.
Valid placeholders for the Go template are listed below:
| **Placeholder** | **Description** |
| ------------------------- | -------------------------------------------- |
| .Anonymous | Indicates whether volume is anonymous |
| .CreatedAt | Volume creation time |
| .Driver | Volume driver |
| .GID | GID of volume |
| .InspectVolumeData ... | Don't use |
| .Labels | Label information associated with the volume |
| .MountCount | Number of times the volume is mounted |
| .Mountpoint | Source of volume mount point |
| .Name | Volume name |
| .NeedsChown | Indicates whether volume needs to be chowned |
| .NeedsCopyUp | Indicates if volume needs to be copied up to |
| .Options | Volume options |
| .Scope | Volume scope |
| .Status | Status of the volume |
| .StorageID | StorageID of the volume |
| .Timeout | Timeout of the volume |
| .UID | UID of volume |
| .VolumeConfigResponse ... | Don't use |
#### **--help** #### **--help**
Print usage statement. Print usage statement.