push addional code

Change-Id: Ia427bb3460cda3a896f8faced2de69eaf3807b74
Signed-off-by: Michael Lando <ml636r@att.com>
diff --git a/openecomp-be/tools/install/database/monitoring/component/ceilometer.ftl b/openecomp-be/tools/install/database/monitoring/component/ceilometer.ftl
new file mode 100644
index 0000000..6cf3dfd
--- /dev/null
+++ b/openecomp-be/tools/install/database/monitoring/component/ceilometer.ftl
@@ -0,0 +1,67 @@
+{
+    "ceilometerInfoList": [
+        {
+            "name": "instance",
+            "type": "Gauge",
+            "unit": "instance",
+            "category": "compute",
+            "description": "Existence of instance"
+        },
+        {
+            "name": "instance:type",
+            "type": "Gauge",
+            "unit": "instance",
+            "category": "compute",
+            "description": "Existence of instance <type> (OpenStack types)"
+        },
+        {
+            "name": "memory",
+            "type": "Gauge",
+            "unit": "MB",
+            "category": "compute",
+            "description": "Volume of RAM allocated to the instance"
+        },
+        {
+            "name": "memory.usage",
+            "type": "Gauge",
+            "unit": "MB",
+            "category": "compute",
+            "description": "Volume of RAM used by the instance from the amount of its allocated memory"
+        },
+        {
+            "name": "memory.resident",
+            "type": "Gauge",
+            "unit": "MB",
+            "category": "compute",
+            "description": "Volume of RAM used by the instance on the physical machine"
+        },
+        {
+            "name": "cpu",
+            "type": "Cumulative",
+            "unit": "ns",
+            "category": "compute",
+            "description": "CPU time used"
+        },
+        {
+            "name": "cpu_util",
+            "type": "Gauge",
+            "unit": "%",
+            "category": "compute",
+            "description": "Average CPU utilization"
+        },
+        {
+            "name": "cpu.delta",
+            "type": "Delta",
+            "unit": "ns",
+            "category": "compute",
+            "description": "CPU time used since previous datapoint"
+        },
+        {
+            "name": "vcpus",
+            "type": "Gauge",
+            "unit": "ms",
+            "category": "compute",
+            "description": "Average disk latency"
+        }
+    ]
+}
\ No newline at end of file
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 0000000..1c0cb4e
--- /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}"</#if>
+    },
+    "displayName": {
+      "type": "string"<#if !manual && component.displayName??>,
+      "enum": [
+        "${component.displayName}"
+      ],
+      "default": "${component.displayName}"</#if>
+    },
+    "description": {
+      "type": "string"
+    }
+  },
+  "additionalProperties": false,
+  "required": [
+    "name"<#if !manual && component.displayName??>,
+    "displayName"</#if>
+  ]
+}
\ 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 0000000..1193992
--- /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}"</#if>
+    },
+    "dhcp": {
+      "type": "boolean"<#if !manual>,
+      "enum": [
+      ${network.dhcp?c}
+      ],
+      "default": ${network.dhcp?c}</#if>
+    }
+  },
+  "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 0000000..6111348
--- /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}"
+    </#if>
+    },
+    "description": {
+      "type": "string"
+    }<#if !manual><#if nic.networkId??>,
+    "networkId": {
+      "type": "string",
+      "enum": [
+        "${nic.networkId}"
+      ],
+      "default": "${nic.networkId}"
+    }
+  </#if><#else>,
+    "networkId": {
+      "type": "string",
+      "enum": [<#list networkIds as networkId>
+        "${networkId}"<#sep>,</#list>
+      ]
+    }
+  </#if>
+  },
+  "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 0000000..540afca
--- /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</#if> ,
+              "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>,</#list></#if>
+              ],
+              "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 0000000..f5ea08b
--- /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 0000000..6b1502c
--- /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