diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2020-03-26 18:20:39 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2020-03-26 18:20:39 +0100 |
commit | a82614e0ae27b6aa0875c1d92b2b3116db1bbc63 (patch) | |
tree | ee2740ab937979069a09c268160911e9dc42a160 /config-model | |
parent | 2f2412562cbdacb9d17396f3f6515aa19cbf1bae (diff) |
Allow vcpu ranges and propagate error
Diffstat (limited to 'config-model')
3 files changed, 3 insertions, 3 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java index ef37481d0fc..6a52ff4f051 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java @@ -377,7 +377,7 @@ public class NodesSpecification { } } catch (IllegalArgumentException e) { - throw new IllegalArgumentException("Expected a number or range on the form [min, max], but got '" + s + "'"); + throw new IllegalArgumentException("Expected a number or range on the form [min, max], but got '" + s + "'", e); } } diff --git a/config-model/src/main/resources/schema/common.rnc b/config-model/src/main/resources/schema/common.rnc index 51a1d5f36b9..878faabfec1 100644 --- a/config-model/src/main/resources/schema/common.rnc +++ b/config-model/src/main/resources/schema/common.rnc @@ -24,7 +24,7 @@ Nodes = element nodes { } Resources = element resources { - attribute vcpu { xsd:double { minExclusive = "0.0" } } & + attribute vcpu { xsd:double { minExclusive = "0.0" } | xsd:string } & attribute memory { xsd:string } & attribute disk { xsd:string } & attribute disk-speed { xsd:string }? & diff --git a/config-model/src/test/schema-test-files/services-hosted.xml b/config-model/src/test/schema-test-files/services-hosted.xml index 709c1576725..71a07926240 100644 --- a/config-model/src/test/schema-test-files/services-hosted.xml +++ b/config-model/src/test/schema-test-files/services-hosted.xml @@ -30,7 +30,7 @@ <content id="ml" version="1.0"> <redundancy>2</redundancy> <nodes count="[10,20]" flavor="large" groups="[1,3]"> - <resources vcpu="3.0" memory="32000.0Mb" disk="300 Gb"/> + <resources vcpu="[3.0, 4]" memory="[32000.0Mb, 33Gb]" disk="[300 Gb, 1Tb]"/> </nodes> </content> |