Refactoring validation
Refactoring validation from Code to FTL
Change-Id: Ic33a3719a021bb4c82565653fd8d95de38b7929e
Issue-ID: SDC-1334
Signed-off-by: shrikantawachar <shrikant.awachar@amdocs.com>
diff --git a/openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl b/openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl
index fec5b9c..15d34f2 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??>,