From eb3b8e68ceb0a9ada748ccc019e85259e718ccea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Thu, 3 Oct 2024 13:04:32 -0400 Subject: [PATCH 1/2] doc: Correct name of macvlan modes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- doc/reference/devices_nic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/reference/devices_nic.md b/doc/reference/devices_nic.md index 71b6cb1ed3..2f4b0bc37f 100644 --- a/doc/reference/devices_nic.md +++ b/doc/reference/devices_nic.md @@ -118,7 +118,7 @@ Key | Type | Default | Managed | Description `boot.priority` | integer | - | no | Boot priority for VMs (higher value boots first) `gvrp` | bool | `false` | no | Register VLAN using GARP VLAN Registration Protocol `hwaddr` | string | randomly assigned | no | The MAC address of the new interface -`mode` | string | `bridge` | no | Macvlan mode (one of `bridge`, `vepa`, `passthrough` or `private`) +`mode` | string | `bridge` | no | Macvlan mode (one of `bridge`, `vepa`, `passthru` or `private`) `mtu` | integer | parent MTU | yes | The MTU of the new interface `name` | string | kernel assigned | no | The name of the interface inside the instance `network` | string | - | no | The managed network to link the device to (instead of specifying the `nictype` directly) From e1e902ec66e54fbb4ab642cb5e556aba93daccbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Thu, 3 Oct 2024 13:04:40 -0400 Subject: [PATCH 2/2] incusd/device/nic: Correct name of macvlan modes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- internal/server/device/nic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/server/device/nic.go b/internal/server/device/nic.go index 270b62caa5..02f743967c 100644 --- a/internal/server/device/nic.go +++ b/internal/server/device/nic.go @@ -52,7 +52,7 @@ func nicValidationRules(requiredFields []string, optionalFields []string, instCo "security.acls.default.ingress.logged": validate.Optional(validate.IsBool), "security.acls.default.egress.logged": validate.Optional(validate.IsBool), "security.promiscuous": validate.Optional(validate.IsBool), - "mode": validate.Optional(validate.IsOneOf("bridge", "vepa", "passthrough", "private")), + "mode": validate.Optional(validate.IsOneOf("bridge", "vepa", "passthru", "private")), } validators := map[string]func(value string) error{}