Skip to content

fix: handle multiple networks in 'podman inspect --type=all'#28845

Open
bit-hope wants to merge 1 commit into
podman-container-tools:mainfrom
bit-hope:fix-podman-inspect-type-all
Open

fix: handle multiple networks in 'podman inspect --type=all'#28845
bit-hope wants to merge 1 commit into
podman-container-tools:mainfrom
bit-hope:fix-podman-inspect-type-all

Conversation

@bit-hope
Copy link
Copy Markdown
Contributor

@bit-hope bit-hope commented Jun 3, 2026

Steps to Reproduce:

  1. Create multiple Podman networks:
podman network create net_1
podman network create net_2
  1. Inspect with --type=all:
podman inspect --type=all net_1 net_2
  1. Actual Result:
[
     {
          "name": "net_1",
          "id": "82e01d194062d42f8a8353f598f03bf9cb527a61ade9f5672a7a63176ccc72b3",
          "driver": "bridge",
          "network_interface": "podman1",
          "created": "2026-06-03T16:53:39.49571197+08:00",
          "subnets": [
               {
                    "subnet": "10.89.0.0/24",
                    "gateway": "10.89.0.1"
               }
          ],
          "ipv6_enabled": false,
          "internal": false,
          "dns_enabled": true,
          "ipam_options": {
               "driver": "host-local"
          },
          "containers": {}
     },
     {
          "name": "net_1",
          "id": "82e01d194062d42f8a8353f598f03bf9cb527a61ade9f5672a7a63176ccc72b3",
          "driver": "bridge",
          "network_interface": "podman1",
          "created": "2026-06-03T16:53:39.49571197+08:00",
          "subnets": [
               {
                    "subnet": "10.89.0.0/24",
                    "gateway": "10.89.0.1"
               }
          ],
          "ipv6_enabled": false,
          "internal": false,
          "dns_enabled": true,
          "ipam_options": {
               "driver": "host-local"
          },
          "containers": {}
     }
]
  1. Expected Result:
[
    {
          "name": "net_1",
          "id": "82e01d194062d42f8a8353f598f03bf9cb527a61ade9f5672a7a63176ccc72b3",
          "driver": "bridge",
          "network_interface": "podman1",
          "created": "2026-06-03T16:53:39.49571197+08:00",
          "subnets": [
               {
                    "subnet": "10.89.0.0/24",
                    "gateway": "10.89.0.1"
               }
          ],
          "ipv6_enabled": false,
          "internal": false,
          "dns_enabled": true,
          "ipam_options": {
               "driver": "host-local"
          },
          "containers": {}
     },
     {
          "name": "net_2",
          "id": "249107cc06e598e2c3c27b0064d8acde5257d67a860f24e85d12512b9afa05ed",
          "driver": "bridge",
          "network_interface": "podman2",
          "created": "2026-06-03T16:53:40.983070804+08:00",
          "subnets": [
               {
                    "subnet": "10.89.1.0/24",
                    "gateway": "10.89.1.1"
               }
          ],
          "ipv6_enabled": false,
          "internal": false,
          "dns_enabled": true,
          "ipam_options": {
               "driver": "host-local"
          },
          "containers": {}
     }
]

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

None

@bit-hope bit-hope force-pushed the fix-podman-inspect-type-all branch 2 times, most recently from 1eb4d3b to a58e0bd Compare June 3, 2026 16:13
Signed-off-by: zhongchunhe.zch <zhongchunhe.zch@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant