From f5f13c4f6b6fe3b4d98e349dfd7db59339803436 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 19 Feb 2017 12:35:04 +0200 Subject: push addional code Change-Id: Ia427bb3460cda3a896f8faced2de69eaf3807b74 Signed-off-by: Michael Lando --- .../schemaTemplates/composition/component.ftl | 28 ++ .../schemaTemplates/composition/network.ftl | 25 ++ .../database/schemaTemplates/composition/nic.ftl | 36 +++ .../schemaTemplates/questionnaire/component.ftl | 327 +++++++++++++++++++++ .../database/schemaTemplates/questionnaire/nic.ftl | 120 ++++++++ .../database/schemaTemplates/questionnaire/vsp.ftl | 89 ++++++ 6 files changed, 625 insertions(+) create mode 100644 openecomp-be/tools/install/database/schemaTemplates/composition/component.ftl create mode 100644 openecomp-be/tools/install/database/schemaTemplates/composition/network.ftl create mode 100644 openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl create mode 100644 openecomp-be/tools/install/database/schemaTemplates/questionnaire/component.ftl create mode 100644 openecomp-be/tools/install/database/schemaTemplates/questionnaire/nic.ftl create mode 100644 openecomp-be/tools/install/database/schemaTemplates/questionnaire/vsp.ftl (limited to 'openecomp-be/tools/install/database/schemaTemplates') diff --git a/openecomp-be/tools/install/database/schemaTemplates/composition/component.ftl b/openecomp-be/tools/install/database/schemaTemplates/composition/component.ftl new file mode 100644 index 0000000000..1c0cb4eb8a --- /dev/null +++ b/openecomp-be/tools/install/database/schemaTemplates/composition/component.ftl @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "name": { + "type": "string"<#if !manual>, + "enum": [ + "${component.name}" + ], + "default": "${component.name}" + }, + "displayName": { + "type": "string"<#if !manual && component.displayName??>, + "enum": [ + "${component.displayName}" + ], + "default": "${component.displayName}" + }, + "description": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name"<#if !manual && component.displayName??>, + "displayName" + ] +} \ No newline at end of file diff --git a/openecomp-be/tools/install/database/schemaTemplates/composition/network.ftl b/openecomp-be/tools/install/database/schemaTemplates/composition/network.ftl new file mode 100644 index 0000000000..1193992923 --- /dev/null +++ b/openecomp-be/tools/install/database/schemaTemplates/composition/network.ftl @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "name": { + "type": "string"<#if !manual>, + "enum": [ + "${network.name}" + ], + "default": "${network.name}" + }, + "dhcp": { + "type": "boolean"<#if !manual>, + "enum": [ + ${network.dhcp?c} + ], + "default": ${network.dhcp?c} + } + }, + "additionalProperties": false, + "required": [ + "name", + "dhcp" + ] +} \ No newline at end of file diff --git a/openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl b/openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl new file mode 100644 index 0000000000..6111348f88 --- /dev/null +++ b/openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "name": { + "type": "string"<#if !manual>, + "enum": [ + "${nic.name}" + ], + "default": "${nic.name}" + + }, + "description": { + "type": "string" + }<#if !manual><#if nic.networkId??>, + "networkId": { + "type": "string", + "enum": [ + "${nic.networkId}" + ], + "default": "${nic.networkId}" + } + <#else>, + "networkId": { + "type": "string", + "enum": [<#list networkIds as networkId> + "${networkId}"<#sep>, + ] + } + + }, + "additionalProperties": false, + "required": [ + "name" + ] +} \ No newline at end of file diff --git a/openecomp-be/tools/install/database/schemaTemplates/questionnaire/component.ftl b/openecomp-be/tools/install/database/schemaTemplates/questionnaire/component.ftl new file mode 100644 index 0000000000..540afca430 --- /dev/null +++ b/openecomp-be/tools/install/database/schemaTemplates/questionnaire/component.ftl @@ -0,0 +1,327 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "general": { + "type": "object", + "properties": { + "hypervisor": { + "type": "object", + "properties": { + "hypervisor": { + "type": "string", + "enum": [ + "KVM", + "VMWare ESXi" + ], + "default": "KVM" + }, + "drivers": { + "type": "string", + "maxLength": 300, + "pattern": "^[A-Za-z0-9_,-]*$" + }, + "containerFeaturesDescription": { + "type": "string", + "maxLength": 1000, + "pattern": "^[A-Za-z0-9_, -]*$" + } + }, + "additionalProperties": false + }, + "image": { + "type": "object", + "properties": { + "format": { + "type": "string", + "enum": [ + "aki", + "ami", + "ari", + "iso", + "qcow2", + "raw", + "vdi", + "vhd", + "vmdk" + ], + "default": "qcow2" + }, + "providedBy": { + "type": "string", + "enum": [ + "Vendor" + ], + "default": "Vendor" + }, + "bootDiskSizePerVM": { + "type": "number", + "maximum": 100 + }, + "ephemeralDiskSizePerVM": { + "type": "number", + "maximum": 400 + } + }, + "additionalProperties": false + }, + "recovery": { + "type": "object", + "properties": { + "pointObjective": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 15, + "exclusiveMaximum ": true + }, + "timeObjective": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 300, + "exclusiveMaximum ": true + }, + "vmProcessFailuresHandling": { + "type": "string" + } + }, + "additionalProperties": false + }, + "dnsConfiguration": { + "type": "string" + }, + "vmCloneUsage": { + "type": "string", + "maximum": 300 + } + }, + "additionalProperties": false + }, + "compute": { + "type": "object", + "properties": { + "vmSizing": { + "type": "object", + "properties": { + "numOfCPUs": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 16, + "default": 2 + }, + "fileSystemSizeGB": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true, + "default": 5 + }, + "persistentStorageVolumeSize": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "IOOperationsPerSec": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + } + }, + "additionalProperties": false + }, + "numOfVMs": { + "type": "object", + "properties": { + "minimum": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 100 + }, + "maximum": { + "type": "number", + "minimum": <#if (componentQuestionnaireData.compute.numOfVMs.minimum)?? + && (componentQuestionnaireData.compute.numOfVMs.minimum)?is_number + && ((componentQuestionnaireData.compute.numOfVMs.minimum) > 0 + && (componentQuestionnaireData.compute.numOfVMs.minimum) <= 100)> + ${componentQuestionnaireData.compute.numOfVMs.minimum}<#else> + 0 , + "exclusiveMinimum": true, + "maximum": 100 + }, + "CpuOverSubscriptionRatio": { + "type": "string", + "enum": [ + "1:1", + "4:1", + "16:1" + ], + "default": "4:1" + }, + "MemoryRAM": { + "type": "string", + "enum": [ + "2 GB", + "4 GB", + "8 GB" + ], + "default": "2 GB" + } + }, + "additionalProperties": false + }, + "guestOS": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 50 + }, + "bitSize": { + "type": "number", + "enum": [ + 64, + 32 + ], + "default": 64 + }, + "tools": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "highAvailabilityAndLoadBalancing": { + "type": "object", + "properties": { + "failureLoadDistribution": { + "type": "string", + "maxLength": 1000 + }, + "nkModelImplementation": { + "type": "string", + "maxLength": 1000 + }, + "architectureChoice": { + "type": "string", + "maxLength": 1000 + }, + "slaRequirements": { + "type": "string", + "maxLength": 1000 + }, + "horizontalScaling": { + "type": "string", + "maxLength": 1000 + }, + "loadDistributionMechanism": { + "type": "string", + "maxLength": 1000 + } + }, + "additionalProperties": false + }, + "network": { + "type": "object", + "properties": { + "networkCapacity": { + "type": "object", + "properties": { + "protocolWithHighestTrafficProfileAcrossAllNICs": { + "type": "string", + "enum": [ + "", + "TCP", + "UDP", + "SCTP", + "IPsec" + ], + "default": "" + }, + "networkTransactionsPerSecond": { + "type": "number" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "storage": { + "type": "object", + "properties": { + "backup": { + "type": "object", + "properties": { + "backupType": { + "type": "string", + "enum": [ + "On Site", + "Off Site" + ], + "default": "On Site" + }, + "backupStorageSize": { + "type": "number" + }, + "backupSolution": { + "type": "string" + }, + "backupNIC": { + "type": "string", + "enum": [ + "", <#if nicNames??><#list nicNames as nicName> + "${nicName}"<#sep>, + ], + "default": "" + } + }, + "additionalProperties": false + }, + "snapshotBackup": { + "type": "object", + "properties": { + "snapshotFrequency": { + "type": "number", + "default": 24, + "minimum": 1, + "exclusiveMinimum": true + } + }, + "additionalProperties": false + }, + "logBackup": { + "type": "object", + "properties": { + "sizeOfLogFiles": { + "type": "number", + "maximum": 5, + "exclusiveMaximum": true + }, + "logBackupFrequency": { + "type": "number", + "maximum": 4, + "exclusiveMaximum": true + }, + "logRetentionPeriod": { + "type": "number", + "maximum": 15, + "exclusiveMaximum": true + }, + "logFileLocation": { + "type": "string", + "maxLength": 300 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/openecomp-be/tools/install/database/schemaTemplates/questionnaire/nic.ftl b/openecomp-be/tools/install/database/schemaTemplates/questionnaire/nic.ftl new file mode 100644 index 0000000000..f5ea08b98a --- /dev/null +++ b/openecomp-be/tools/install/database/schemaTemplates/questionnaire/nic.ftl @@ -0,0 +1,120 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "protocols": { + "type": "object", + "properties": { + "protocols": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "", + "TCP", + "UDP", + "SCTP", + "IPsec" + ], + "default": "" + }, + "minItems": 1 + }, + "protocolWithHighestTrafficProfile": { + "$ref": "#/properties/protocols/properties/protocols/items" + } + }, + "additionalProperties": false + }, + "ipConfiguration": { + "type": "object", + "properties": { + "ipv4Required": { + "type": "boolean", + "default": true + }, + "ipv6Required": { + "type": "boolean", + "default": false + } + }, + "additionalProperties": false + }, + "network": { + "type": "object", + "properties": { + "networkDescription": { + "type": "string", + "pattern": "[A-Za-z]+", + "maxLength": 300 + } + }, + "additionalProperties": false + }, + "sizing": { + "type": "object", + "definitions": { + "peakAndAvg": { + "type": "object", + "properties": { + "peak": { + "type": "number" + }, + "avg": { + "type": "number" + } + }, + "additionalProperties": false + }, + "packetsAndBytes": { + "type": "object", + "properties": { + "packets": { + "$ref": "#/properties/sizing/definitions/peakAndAvg" + }, + "bytes": { + "$ref": "#/properties/sizing/definitions/peakAndAvg" + } + }, + "additionalProperties": false + } + }, + "properties": { + "describeQualityOfService": { + "type": "string" + }, + "inflowTrafficPerSecond": { + "$ref": "#/properties/sizing/definitions/packetsAndBytes" + }, + "outflowTrafficPerSecond": { + "$ref": "#/properties/sizing/definitions/packetsAndBytes" + }, + "flowLength": { + "$ref": "#/properties/sizing/definitions/packetsAndBytes" + }, + "acceptableJitter": { + "type": "object", + "properties": { + "mean": { + "type": "number" + }, + "max": { + "type": "number" + }, + "variable": { + "type": "number" + } + }, + "additionalProperties": false + }, + "acceptablePacketLoss": { + "type": "number", + "minimum": 0, + "maximum": 100 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/openecomp-be/tools/install/database/schemaTemplates/questionnaire/vsp.ftl b/openecomp-be/tools/install/database/schemaTemplates/questionnaire/vsp.ftl new file mode 100644 index 0000000000..6b1502c4a2 --- /dev/null +++ b/openecomp-be/tools/install/database/schemaTemplates/questionnaire/vsp.ftl @@ -0,0 +1,89 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "general": { + "type": "object", + "properties": { + "affinityData": { + "type": "string", + "enum": [ + "", + "Affinity", + "Anti Affinity", + "None" + ], + "default": "" + }, + "availability": { + "type": "object", + "properties": { + "useAvailabilityZonesForHighAvailability": { + "type": "boolean", + "default": false + } + }, + "additionalProperties": false + }, + "regionsData": { + "type": "object", + "properties": { + "multiRegion": { + "type": "boolean", + "default": false + }, + "regions": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + "default": "" + } + } + }, + "additionalProperties": false + }, + "storageDataReplication": { + "type": "object", + "properties": { + "storageReplicationAcrossRegion": { + "type": "boolean", + "default": false + }, + "storageReplicationSize": { + "type": "number", + "maximum": 100, + "exclusiveMaximum": true + }, + "storageReplicationFrequency": { + "type": "number", + "minimum": 5 + }, + "storageReplicationSource": { + "type": "string", + "maxLength": 300 + }, + "storageReplicationDestination": { + "type": "string", + "maxLength": 300 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false +} \ No newline at end of file -- cgit 1.2.3-korg