Skip to content

Commit

Permalink
Merge pull request #1284 from stgraber/main
Browse files Browse the repository at this point in the history
Correct macvlan mode names
  • Loading branch information
hallyn authored Oct 4, 2024
2 parents 80613a8 + e1e902e commit 0a38960
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/reference/devices_nic.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion internal/server/device/nic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down

0 comments on commit 0a38960

Please sign in to comment.