mirror of https://github.com/containers/podman.git
quadlet: add InterfaceName option to network unit
I noticed this was missing, its a simple 1 to 1 mapping to --interface-name. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
2d234fab34
commit
a0f7db44e8
|
@ -1393,6 +1393,7 @@ Valid options for `[Network]` are listed below:
|
|||
| Driver=bridge | --driver bridge |
|
||||
| Gateway=192.168.55.3 | --gateway 192.168.55.3 |
|
||||
| GlobalArgs=--log-level=debug | --log-level=debug |
|
||||
| InterfaceName=enp1 | --interface-name enp1 |
|
||||
| Internal=true | --internal |
|
||||
| IPAMDriver=dhcp | --ipam-driver dhcp |
|
||||
| IPRange=192.168.55.128/25 | --ip-range 192.168.55.128/25 |
|
||||
|
@ -1450,6 +1451,14 @@ escaped to allow inclusion of whitespace and other control characters.
|
|||
|
||||
This key can be listed multiple times.
|
||||
|
||||
### `InterfaceName=`
|
||||
|
||||
This option maps the *network_interface* option in the network config, see **podman network inspect**.
|
||||
Depending on the driver, this can have different effects; for `bridge`, it uses the bridge interface name.
|
||||
For `macvlan` and `ipvlan`, it is the parent device on the host. It is the same as `--opt parent=...`.
|
||||
|
||||
This is equivalent to the Podman `--interface-name` option.
|
||||
|
||||
### `Internal=` (defaults to `false`)
|
||||
|
||||
Restrict external access of this network.
|
||||
|
|
|
@ -111,6 +111,7 @@ const (
|
|||
KeyHostName = "HostName"
|
||||
KeyImage = "Image"
|
||||
KeyImageTag = "ImageTag"
|
||||
KeyInterfaceName = "InterfaceName"
|
||||
KeyInternal = "Internal"
|
||||
KeyIP = "IP"
|
||||
KeyIP6 = "IP6"
|
||||
|
@ -372,6 +373,7 @@ var (
|
|||
KeyIPAMDriver: true,
|
||||
KeyIPRange: true,
|
||||
KeyIPv6: true,
|
||||
KeyInterfaceName: true,
|
||||
KeyInternal: true,
|
||||
KeyNetworkName: true,
|
||||
KeyNetworkDeleteOnStop: true,
|
||||
|
@ -977,6 +979,7 @@ func ConvertNetwork(network *parser.UnitFile, name string, unitsInfoMap map[stri
|
|||
stringKeys := map[string]string{
|
||||
KeyDriver: "--driver",
|
||||
KeyIPAMDriver: "--ipam-driver",
|
||||
KeyInterfaceName: "--interface-name",
|
||||
}
|
||||
lookupAndAddString(network, NetworkGroup, stringKeys, podman)
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
## assert-podman-final-args systemd-interface-name
|
||||
## assert-podman-args "--interface-name" "enp1"
|
||||
|
||||
[Network]
|
||||
InterfaceName=enp1
|
|
@ -1005,6 +1005,7 @@ BOGUS=foo
|
|||
Entry("Network - Gateway", "gateway.network"),
|
||||
Entry("Network - IPAM Driver", "ipam-driver.network"),
|
||||
Entry("Network - IPv6", "ipv6.network"),
|
||||
Entry("Network - InterfaceName network", "interface-name.network"),
|
||||
Entry("Network - Internal network", "internal.network"),
|
||||
Entry("Network - Label", "label.network"),
|
||||
Entry("Network - Multiple Options", "options.multiple.network"),
|
||||
|
|
Loading…
Reference in New Issue