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

filters: better handling of id= #18798

Merged
merged 1 commit into from
Jun 7, 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
2 changes: 1 addition & 1 deletion cmd/podman/pods/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func sortPodPsOutput(sortBy string, lprs []*entities.ListPodsReport) error {
case "status":
sort.Sort(podPsSortedStatus{lprs})
default:
return errors.New("invalid option for --sort, options are: id, names, or number")
return errors.New("invalid option for --sort, options are: created, id, name, number, or status")
}
return nil
}
Expand Down
28 changes: 14 additions & 14 deletions docs/source/markdown/podman-pause.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ Filters with the same key work inclusive with the only exception being

Valid filters are listed below:

| **Filter** | **Description** |
| --------------- | -------------------------------------------------------------------------------- |
| id | [ID] Container's ID (accepts regex) |
| name | [Name] Container's name (accepts regex) |
| label | [Key] or [Key=Value] Label assigned to a container |
| exited | [Int] Container's exit code |
| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' |
| ancestor | [ImageName] Image or descendant used to create container |
| before | [ID] or [Name] Containers created before this container |
| since | [ID] or [Name] Containers created since this container |
| volume | [VolumeName] or [MountpointDestination] Volume mounted in container |
| health | [Status] healthy or unhealthy |
| pod | [Pod] name or full or partial ID of pod |
| network | [Network] name or full ID of network |
| **Filter** | **Description** |
|------------|----------------------------------------------------------------------------------|
| id | [ID] Container's ID (CID prefix match by default; accepts regex) |
| name | [Name] Container's name (accepts regex) |
| label | [Key] or [Key=Value] Label assigned to a container |
| exited | [Int] Container's exit code |
| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' |
| ancestor | [ImageName] Image or descendant used to create container |
| before | [ID] or [Name] Containers created before this container |
| since | [ID] or [Name] Containers created since this container |
| volume | [VolumeName] or [MountpointDestination] Volume mounted in container |
| health | [Status] healthy or unhealthy |
| pod | [Pod] name or full or partial ID of pod |
| network | [Network] name or full ID of network |

@@option latest

Expand Down
24 changes: 12 additions & 12 deletions docs/source/markdown/podman-pod-ps.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ The *filters* argument format is of `key=value`. If there is more than one *filt

Supported filters:

| Filter | Description |
| ---------- | -------------------------------------------------------------------------------------------------- |
| *ctr-ids* | Filter by container ID within the pod. |
| *ctr-names* | Filter by container name within the pod. |
| *ctr-number*| Filter by number of containers in the pod. |
| *ctr-status*| Filter by container status within the pod. |
| *id* | Filter by pod ID. |
| *label* | Filter by container with (or without, in the case of label!=[...] is used) the specified labels. |
| *name* | Filter by pod name. |
| *network* | Filter by network name or full ID of network. |
| *status* | Filter by pod status. |
| *until* | Filter by pods created before given timestamp. |
| Filter | Description |
|--------------|--------------------------------------------------------------------------------------------------|
| *ctr-ids* | Filter by container ID within the pod. (CID prefix match by default; accepts regex) |
| *ctr-names* | Filter by container name within the pod. |
| *ctr-number* | Filter by number of containers in the pod. |
| *ctr-status* | Filter by container status within the pod. |
| *id* | Filter by pod ID. (Prefix match by default; accepts regex) |
| *label* | Filter by container with (or without, in the case of label!=[...] is used) the specified labels. |
| *name* | Filter by pod name. |
| *network* | Filter by network name or full ID of network. |
| *status* | Filter by pod status. |
| *until* | Filter by pods created before given timestamp. |

The `ctr-ids`, `ctr-names`, `id`, `name` filters accept `regex` format.

Expand Down
28 changes: 14 additions & 14 deletions docs/source/markdown/podman-ps.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ Filters with the same key work inclusive with the only exception being

Valid filters are listed below:

| **Filter** | **Description** |
| --------------- | -------------------------------------------------------------------------------- |
| id | [ID] Container's ID (accepts regex) |
| name | [Name] Container's name (accepts regex) |
| label | [Key] or [Key=Value] Label assigned to a container |
| exited | [Int] Container's exit code |
| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' |
| ancestor | [ImageName] Image or descendant used to create container (accepts regex) |
| before | [ID] or [Name] Containers created before this container |
| since | [ID] or [Name] Containers created since this container |
| volume | [VolumeName] or [MountpointDestination] Volume mounted in container |
| health | [Status] healthy or unhealthy |
| pod | [Pod] name or full or partial ID of pod |
| network | [Network] name or full ID of network |
| **Filter** | **Description** |
|------------|----------------------------------------------------------------------------------|
| id | [ID] Container's ID (CID prefix match by default; accepts regex) |
| name | [Name] Container's name (accepts regex) |
| label | [Key] or [Key=Value] Label assigned to a container |
| exited | [Int] Container's exit code |
| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' |
| ancestor | [ImageName] Image or descendant used to create container (accepts regex) |
| before | [ID] or [Name] Containers created before this container |
| since | [ID] or [Name] Containers created since this container |
| volume | [VolumeName] or [MountpointDestination] Volume mounted in container |
| health | [Status] healthy or unhealthy |
| pod | [Pod] name or full or partial ID of pod |
| network | [Network] name or full ID of network |


#### **--format**=*format*
Expand Down
28 changes: 14 additions & 14 deletions docs/source/markdown/podman-restart.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ Filters with the same key work inclusive with the only exception being

Valid filters are listed below:

| **Filter** | **Description** |
| --------------- | -------------------------------------------------------------------------------- |
| id | [ID] Container's ID (accepts regex) |
| name | [Name] Container's name (accepts regex) |
| label | [Key] or [Key=Value] Label assigned to a container |
| exited | [Int] Container's exit code |
| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' |
| ancestor | [ImageName] Image or descendant used to create container |
| before | [ID] or [Name] Containers created before this container |
| since | [ID] or [Name] Containers created since this container |
| volume | [VolumeName] or [MountpointDestination] Volume mounted in container |
| health | [Status] healthy or unhealthy |
| pod | [Pod] name or full or partial ID of pod |
| network | [Network] name or full ID of network |
| **Filter** | **Description** |
|------------|----------------------------------------------------------------------------------|
| id | [ID] Container's ID (CID prefix match by default; accepts regex) |
| name | [Name] Container's name (accepts regex) |
| label | [Key] or [Key=Value] Label assigned to a container |
| exited | [Int] Container's exit code |
| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' |
| ancestor | [ImageName] Image or descendant used to create container |
| before | [ID] or [Name] Containers created before this container |
| since | [ID] or [Name] Containers created since this container |
| volume | [VolumeName] or [MountpointDestination] Volume mounted in container |
| health | [Status] healthy or unhealthy |
| pod | [Pod] name or full or partial ID of pod |
| network | [Network] name or full ID of network |

@@option latest

Expand Down
28 changes: 14 additions & 14 deletions docs/source/markdown/podman-rm.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ Filters with the same key work inclusive with the only exception being

Valid filters are listed below:

| **Filter** | **Description** |
| --------------- | -------------------------------------------------------------------------------- |
| id | [ID] Container's ID (accepts regex) |
| name | [Name] Container's name (accepts regex) |
| label | [Key] or [Key=Value] Label assigned to a container |
| exited | [Int] Container's exit code |
| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' |
| ancestor | [ImageName] Image or descendant used to create container |
| before | [ID] or [Name] Containers created before this container |
| since | [ID] or [Name] Containers created since this container |
| volume | [VolumeName] or [MountpointDestination] Volume mounted in container |
| health | [Status] healthy or unhealthy |
| pod | [Pod] name or full or partial ID of pod |
| network | [Network] name or full ID of network |
| **Filter** | **Description** |
|------------|----------------------------------------------------------------------------------|
| id | [ID] Container's ID (CID prefix match by default; accepts regex) |
| name | [Name] Container's name (accepts regex) |
| label | [Key] or [Key=Value] Label assigned to a container |
| exited | [Int] Container's exit code |
| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' |
| ancestor | [ImageName] Image or descendant used to create container |
| before | [ID] or [Name] Containers created before this container |
| since | [ID] or [Name] Containers created since this container |
| volume | [VolumeName] or [MountpointDestination] Volume mounted in container |
| health | [Status] healthy or unhealthy |
| pod | [Pod] name or full or partial ID of pod |
| network | [Network] name or full ID of network |

#### **--force**, **-f**

Expand Down
28 changes: 14 additions & 14 deletions docs/source/markdown/podman-start.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ Filters with the same key work inclusive with the only exception being

Valid filters are listed below:

| **Filter** | **Description** |
| --------------- | -------------------------------------------------------------------------------- |
| id | [ID] Container's ID (accepts regex) |
| name | [Name] Container's name (accepts regex) |
| label | [Key] or [Key=Value] Label assigned to a container |
| exited | [Int] Container's exit code |
| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' |
| ancestor | [ImageName] Image or descendant used to create container |
| before | [ID] or [Name] Containers created before this container |
| since | [ID] or [Name] Containers created since this container |
| volume | [VolumeName] or [MountpointDestination] Volume mounted in container |
| health | [Status] healthy or unhealthy |
| pod | [Pod] name or full or partial ID of pod |
| network | [Network] name or full ID of network |
| **Filter** | **Description** |
|------------|----------------------------------------------------------------------------------|
| id | [ID] Container's ID (CID prefix match by default; accepts regex) |
| name | [Name] Container's name (accepts regex) |
| label | [Key] or [Key=Value] Label assigned to a container |
| exited | [Int] Container's exit code |
| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' |
| ancestor | [ImageName] Image or descendant used to create container |
| before | [ID] or [Name] Containers created before this container |
| since | [ID] or [Name] Containers created since this container |
| volume | [VolumeName] or [MountpointDestination] Volume mounted in container |
| health | [Status] healthy or unhealthy |
| pod | [Pod] name or full or partial ID of pod |
| network | [Network] name or full ID of network |

@@option interactive

Expand Down
Loading