vmm: api: Make NetConfig defaults match between CLI and HTTP API

In order to let the CLI and the HTTP API behave the same regarding the
NetConfig structure, this patch defines some default values for tap, ip,
mask, mac and iommu.

tap is None, ip is 192.168.249.1, mask is 255.255.255.0, mac is a
randomly generated value, and iommu is false.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2019-12-09 18:45:00 +01:00
parent eff78f746a
commit befd342da4
2 changed files with 27 additions and 8 deletions

View File

@@ -279,18 +279,17 @@ components:
default: false
NetConfig:
required:
- ip
- mask
- mac
type: object
properties:
tap:
type: string
default: ""
ip:
type: string
default: "192.168.249.1"
mask:
type: string
default: "255.255.255.0"
mac:
type: string
iommu: