Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI:DOCS] Document --format for additional man pages #17766

Merged
merged 7 commits into from
Mar 15, 2023
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
28 changes: 28 additions & 0 deletions docs/source/markdown/podman-image-inspect.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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

```
Expand Down
59 changes: 58 additions & 1 deletion docs/source/markdown/podman-machine-info.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

| **Placeholder** | **Description** |
| ------------------- | --------------------------------- |
| .Host ... | Host information for local machine|
| .Version ... | Version of the machine |

#### **--help**

Print usage statement.
Expand All @@ -25,8 +30,60 @@ Print usage statement.

```
$ 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 {{.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
Expand Down
12 changes: 12 additions & 0 deletions docs/source/markdown/podman-machine-inspect.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ Rootless only.

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**

Print usage statement.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman-secret-inspect.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Format secret output using Go template.
|--------------------------|-------------------------------------------------------------------|
| .CreatedAt | When secret was created (relative timestamp, human-readable) |
| .ID | ID of secret |
| .Spec | Details 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) |
Expand Down
14 changes: 14 additions & 0 deletions docs/source/markdown/podman-secret-ls.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ Valid filters are listed below:

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

#### **--quiet**, **-q**
Expand Down
13 changes: 13 additions & 0 deletions docs/source/markdown/podman-system-df.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

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**
Show detailed information on space usage

Expand Down
54 changes: 53 additions & 1 deletion docs/source/markdown/podman-volume-inspect.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@ Inspect all volumes.

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**

Print usage statement
Expand All @@ -33,10 +54,41 @@ Print usage statement

```
$ 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
[
{
"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
local local
```

## SEE ALSO
Expand Down
23 changes: 23 additions & 0 deletions docs/source/markdown/podman-volume-ls.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,29 @@ Volumes can be filtered by the following attributes:

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**

Print usage statement.
Expand Down