From 2b5a566395883b7d1959344bc725186bda441d01 Mon Sep 17 00:00:00 2001 From: Adam Israel Date: Wed, 18 Jul 2018 13:06:29 -0400 Subject: [PATCH] Extend data-type to initial-config-primitive The config-primitive defines a data-type, which is an enumerator of STRING, INTEGER, and BOOLEAN, that informs consumers of the VNFD of what type to treat the value as. Yang itself is loosely typed, treating everything as a string, but specifying the data-type is required when integrating with strongly-typed languages. We've experienced this issue, documented in bug #502, where the service primitives defined via the VCA are strongly-typed and will fail if used with a primitive expecting a non-STRING value. This extends the data-type key to initial-config-primitive, allowing the operator to define what type of data is expected. This will then be consumed by N2VC to properly convert the value appropriately. Signed-off-by: Adam Israel --- models/yang/mano-types.yang | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/models/yang/mano-types.yang b/models/yang/mano-types.yang index ba917c0..9fb3713 100644 --- a/models/yang/mano-types.yang +++ b/models/yang/mano-types.yang @@ -78,6 +78,12 @@ module mano-types type string; } + leaf data-type { + description + "Data type associated with the value."; + type manotypes:parameter-data-type; + } + leaf value { description "Value associated with the name."; -- 2.17.1