Skip to content

add network_dns_servers as supported parameter to network.create#630

Open
mutax wants to merge 1 commit intocontainers:mainfrom
mutax:add_network_dns_servers_support
Open

add network_dns_servers as supported parameter to network.create#630
mutax wants to merge 1 commit intocontainers:mainfrom
mutax:add_network_dns_servers_support

Conversation

@mutax
Copy link

@mutax mutax commented Feb 21, 2026

The API endpoint supports setting a list of custom DNS servers when creating a network but the argument was not passed along.

This adds the argument network_dns_servers to the API call.

See https://docs.podman.io/en/latest/_static/api.html?version=latest#tag/networks/operation/NetworkCreateLibpod

@mutax mutax force-pushed the add_network_dns_servers_support branch from 61c89f1 to d7cbfaf Compare February 21, 2026 14:09
Copy link
Member

@Honny1 Honny1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add tests for this?

@mutax mutax force-pushed the add_network_dns_servers_support branch from d7cbfaf to a3adcf8 Compare February 27, 2026 23:53
@mutax
Copy link
Author

mutax commented Feb 27, 2026

@Honny1 I am not sure if just testing the case with setting two entries would be enough, but only testing a one-element list didn't seem sufficient to me. Is that what you had in mind?

@mutax mutax force-pushed the add_network_dns_servers_support branch from a3adcf8 to 9e1a5c6 Compare February 28, 2026 00:59
@mutax mutax requested a review from Honny1 February 28, 2026 01:07
The API endpoint supports setting a list of custom DNS servers when
creating a network, but the argument was not passed along.

This adds the argument network_dns_servers to the API call and
implements a unit test for setting one or multiple DNS servers.

See https://docs.podman.io/en/latest/_static/api.html?version=latest#tag/networks/operation/NetworkCreateLibpod

Signed-off-by: Florian Streibelt <mail+github@yakshaving.de>
@mutax mutax force-pushed the add_network_dns_servers_support branch from 9e1a5c6 to d1e0ccc Compare February 28, 2026 01:15
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.

2 participants