summaryrefslogtreecommitdiffstats
path: root/openecomp-be/tools/install/database/schemaTemplates/composition
diff options
context:
space:
mode:
authorshrikantawachar <shrikant.awachar@amdocs.com>2018-05-15 15:32:18 +0530
committershrikantawachar <shrikant.awachar@amdocs.com>2018-05-29 16:25:29 +0530
commite9966c94065f6a74d07578b8cee055c37594a0f7 (patch)
treeb793a40dabb934c5354b2d5ff72ad31a0985da86 /openecomp-be/tools/install/database/schemaTemplates/composition
parente1e4f69030a34ebdbe65e72f8ff5fa25ea8e82bc (diff)
Refactoring validation
Refactoring validation from Code to FTL Change-Id: Ic33a3719a021bb4c82565653fd8d95de38b7929e Issue-ID: SDC-1334 Signed-off-by: shrikantawachar <shrikant.awachar@amdocs.com>
Diffstat (limited to 'openecomp-be/tools/install/database/schemaTemplates/composition')
-rw-r--r--openecomp-be/tools/install/database/schemaTemplates/composition/image.ftl4
-rw-r--r--openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl16
2 files changed, 13 insertions, 7 deletions
diff --git a/openecomp-be/tools/install/database/schemaTemplates/composition/image.ftl b/openecomp-be/tools/install/database/schemaTemplates/composition/image.ftl
index 8391390506..6d0fb3c890 100644
--- a/openecomp-be/tools/install/database/schemaTemplates/composition/image.ftl
+++ b/openecomp-be/tools/install/database/schemaTemplates/composition/image.ftl
@@ -3,7 +3,9 @@
"type": "object",
"properties": {
"fileName": {
- "type": "string"
+ "type": "string" <#if !manual>,
+ "enum":["${image.fileName}"]
+ </#if>
},
"description": {
"type": "string"
diff --git a/openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl b/openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl
index fec5b9cd64..15d34f2489 100644
--- a/openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl
+++ b/openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl
@@ -3,12 +3,16 @@
"type": "object",
"properties": {
"name": {
- "type": "string",
- "enum": [
- "${nic.name}"
- ],
- "default": "${nic.name}"
- },
+ "type": "string",
+ <#if manual>
+ {"pattern":"^[a-zA-Z0-9_]*$"}
+ <#else>
+ "enum": [
+ "${nic.name}"
+ ],
+ "default": "${nic.name}"
+ </#if>
+},
"description": {
"type": "string"
}<#if !manual><#if nic.networkId??>,