Merge pull request #16747 from Luap99/ipvlan-parent

network create: support "-o parent=XXX" for ipvlan
This commit is contained in:
OpenShift Merge Robot
2022-12-06 10:54:11 -05:00
committed by GitHub
2 changed files with 30 additions and 1 deletions

View File

@ -125,7 +125,7 @@ func networkCreate(cmd *cobra.Command, args []string) error {
logrus.Warn("The --macvlan option is deprecated, use `--driver macvlan --opt parent=<device>` instead")
network.Driver = types.MacVLANNetworkDriver
network.NetworkInterface = networkCreateOptions.MacVLAN
} else if networkCreateOptions.Driver == types.MacVLANNetworkDriver {
} else if networkCreateOptions.Driver == types.MacVLANNetworkDriver || networkCreateOptions.Driver == types.IPVLANNetworkDriver {
// new -d macvlan --opt parent=... syntax
if parent, ok := network.Options["parent"]; ok {
network.NetworkInterface = parent