From 68d601f590917107a2978f148fb135233124ddf9 Mon Sep 17 00:00:00 2001 From: Guillaume Bougard Date: Thu, 31 Oct 2024 19:02:01 +0100 Subject: [PATCH 1/2] feat: Add ipaddress and operatingsystem fields to virtualmachine --- inventory.schema.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inventory.schema.json b/inventory.schema.json index 9748ee5..9d9bfd9 100644 --- a/inventory.schema.json +++ b/inventory.schema.json @@ -2051,6 +2051,10 @@ "redash/redash" ] }, + "ipaddress": { + "type": "string", + "title": "Virtualmachine ip" + }, "memory": { "type": "integer", "title": "Memory size in MB", @@ -2064,6 +2068,9 @@ "centos7.0" ] }, + "operatingsystem": { + "$ref": "#/properties/content/properties/operatingsystem" + }, "status": { "type": "string", "examples": [ From 6b3fb2b0304754881dd945220c30c14900fb9e61 Mon Sep 17 00:00:00 2001 From: Guillaume Bougard Date: Mon, 4 Nov 2024 14:27:47 +0100 Subject: [PATCH 2/2] fix: Validate ipaddress against ipv4 or ipv6 format --- inventory.schema.json | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/inventory.schema.json b/inventory.schema.json index 9d9bfd9..d914af6 100644 --- a/inventory.schema.json +++ b/inventory.schema.json @@ -2052,8 +2052,17 @@ ] }, "ipaddress": { - "type": "string", - "title": "Virtualmachine ip" + "title": "Virtualmachine ip", + "anyOf": [ + { + "type": "string", + "format": "ipv4" + }, + { + "type": "string", + "format": "ipv6" + } + ] }, "memory": { "type": "integer",