Move CSIT to integration/csit repo

To facilite branching of CSIT tests, all CSIT test
code and scripts are relocated to the integration/csit
repo.

Change-Id: I1e4c0eff44691f73f8098b3c52764107f6b8b8df
Issue-ID: INT-671
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
diff --git a/tests/optf-has/has/data/healthcheck.json b/tests/optf-has/has/data/healthcheck.json
new file mode 100644
index 0000000..926bb28
--- /dev/null
+++ b/tests/optf-has/has/data/healthcheck.json
@@ -0,0 +1,19 @@
+{
+    "consistencyInfo": {
+        "type": "eventual"
+    },
+    "values": {
+        "created": 1479482603641,
+        "message": "",
+        "name": "foo",
+        "recommend_max": 1,
+        "solution": "{\"healthcheck\": \" healthcheck\"}",
+        "status": "solved",
+        "template": "{\"healthcheck\": \"healthcheck\"}",
+        "timeout": 3600,
+        "translation": "{\"healthcheck\": \" healthcheck\"}",
+        "updated": 1484324150629
+    }
+}
+
+
diff --git a/tests/optf-has/has/data/onboard.json b/tests/optf-has/has/data/onboard.json
new file mode 100644
index 0000000..a4939c4
--- /dev/null
+++ b/tests/optf-has/has/data/onboard.json
@@ -0,0 +1,6 @@
+{ 
+   "appname": "conductor", 
+   "userId": "conductor", 
+   "isAAF": "false", 
+   "password": "c0nduct0r" 
+}
diff --git a/tests/optf-has/has/data/plan_with_hpa.json b/tests/optf-has/has/data/plan_with_hpa.json
new file mode 100644
index 0000000..2198577
--- /dev/null
+++ b/tests/optf-has/has/data/plan_with_hpa.json
@@ -0,0 +1,260 @@
+{
+   "name":"vCPE-with-HPA",
+   "template":{
+      "homing_template_version":"2017-10-10",
+      "parameters":{
+         "service_name":"Residential vCPE",
+         "service_id":"vcpe_service_id",
+         "customer_lat":45.395968,
+         "customer_long":-71.135344,
+         "REQUIRED_MEM":4,
+         "REQUIRED_DISK":100,
+         "pnf_id":"some_pnf_id"
+      },
+      "locations":{
+         "customer_loc":{
+            "latitude":{
+               "get_param":"customer_lat"
+            },
+            "longitude":{
+               "get_param":"customer_long"
+            }
+         }
+      },
+      "demands":{
+         "vG":[
+            {
+               "inventory_provider":"aai",
+               "inventory_type":"cloud"
+            }
+         ]
+      },
+      "constraints":{
+        "constraint_vg_customer":{
+            "type":"distance_to_location",
+            "demands":[
+               "vG"
+            ],
+            "properties":{
+               "distance":"< 100 km",
+               "location":"customer_loc"
+            }
+         },
+        "hpa_constraint":{
+            "type":"hpa",
+            "demands":[
+               "vG"
+            ],
+            "properties":{
+               "evaluate":[
+                  {
+                     "id":"vg_1",
+                     "type":"vnfc",
+                     "directives":[
+                         {
+                            "type": "flavor_directives",
+                            "attributes":[
+                                 {
+                                    "attribute_name":"flavor_label_1",
+                                    "attribute_value":""
+                                 }
+                            ]
+                         }
+                     ],
+                     "flavorProperties":[
+                        {
+                           "hpa-feature":"basicCapabilities",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "False",
+                           "score": "5",
+                           "directives": [],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"numVirtualCpu",
+                                 "hpa-attribute-value":"4",
+                                 "operator":">="
+                              },
+                              {
+                                 "hpa-attribute-key":"virtualMemSize",
+                                 "hpa-attribute-value":"4",
+                                 "operator":">=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        },
+                        {
+                           "hpa-feature":"numa",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "False",
+                           "score": "5",
+                           "directives": [],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"numaNodes",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaCpu-0",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaCpu-1",
+                                 "hpa-attribute-value":"4",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaMem-0",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              },
+                              {
+                                 "hpa-attribute-key":"numaMem-1",
+                                 "hpa-attribute-value":"4",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        },
+                        {
+                           "hpa-feature":"cpuPinning",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "False",
+                           "score": "5",
+                           "directives": [],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"logicalCpuThreadPinningPolicy",
+                                 "hpa-attribute-value":"prefer",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"logicalCpuPinningPolicy",
+                                 "hpa-attribute-value":"dedicated",
+                                 "operator":"="
+                              }
+                           ]
+                        }
+                     ]
+                  },
+                  {
+                     "id":"vg_2",
+                     "type":"vnfc",
+                     "directives":[
+                       {
+                         "type":"flavor_directives",
+                         "attributes":[
+                           {
+                             "attribute_name":"flavor_label_2",
+                             "attribute_value":""
+                           }
+                         ]
+                       }
+                     ],
+                     "flavorProperties":[
+                        {
+                           "hpa-feature":"basicCapabilities",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "False",
+                           "score": "5",
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"numVirtualCpu",
+                                 "hpa-attribute-value":"8",
+                                 "operator":">="
+                              },
+                              {
+                                 "hpa-attribute-key":"virtualMemSize",
+                                 "hpa-attribute-value":"16",
+                                 "operator":">=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        },
+                        {
+                           "hpa-feature":"numa",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "False",
+                           "score": "5",
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"numaNodes",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaCpu-0",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaCpu-1",
+                                 "hpa-attribute-value":"4",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaMem-0",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              },
+                              {
+                                 "hpa-attribute-key":"numaMem-1",
+                                 "hpa-attribute-value":"4",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        },
+                        {
+                           "hpa-feature":"ovsDpdk",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "False",
+                           "score": "5",
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"dataProcessingAccelerationLibrary",
+                                 "hpa-attribute-value":"v18.02",
+                                 "operator":"="
+                              }
+                           ]
+                        }
+                     ]
+                  }
+               ]
+            }
+         }
+      },
+      "optimization":{
+         "minimize":{
+            "sum":[
+               {
+                  "distance_between":[
+                     "customer_loc",
+                     "vG"
+                  ]
+               },
+               {
+                  "distance_between":[
+                     "customer_loc",
+                     "vG"
+                  ]
+               }
+            ]
+         }
+      }
+   },
+   "timeout":5,
+   "limit":3
+}
diff --git a/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json b/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json
new file mode 100644
index 0000000..bb613ab
--- /dev/null
+++ b/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json
@@ -0,0 +1,193 @@
+{  
+   "name":"vCPE-with-HPA-requirement-mandatory",
+   "template":{  
+      "homing_template_version":"2017-10-10",
+      "parameters":{  
+         "service_name":"Residential vCPE",
+         "service_id":"vcpe_service_id",
+         "customer_lat":45.395968,
+         "customer_long":-71.135344,
+         "REQUIRED_MEM":4,
+         "REQUIRED_DISK":100,
+         "pnf_id":"some_pnf_id"
+      },
+      "locations":{  
+         "customer_loc":{  
+            "latitude":{  
+               "get_param":"customer_lat"
+            },
+            "longitude":{  
+               "get_param":"customer_long"
+            }
+         }
+      },
+      "demands":{  
+         "vG":[  
+            {  
+               "inventory_provider":"aai",
+               "inventory_type":"cloud"
+            }
+         ]
+      },
+      "constraints":{  
+         "constraint_vg_customer":{  
+            "type":"distance_to_location",
+            "demands":[  
+               "vG"
+            ],
+            "properties":{  
+               "distance":"< 100 km",
+               "location":"customer_loc"
+            }
+         },
+         "hpa_constraint":{  
+            "type":"hpa",
+            "demands":[  
+               "vG"
+            ],
+            "properties":{  
+               "evaluate":[  
+                  {  
+                     "id":"vg_1",
+                     "type":"vnfc",
+                     "directives":[
+                        {
+                           "type":"flavor_directives",
+                           "attributes":[
+                              {
+                                 "attribute_name":"flavor_label_1",
+                                 "attribute_value":""
+                              }
+                           ]
+                        }
+                     ],
+                     "flavorProperties":[  
+                        {  
+                           "hpa-feature":"basicCapabilities",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "True",
+                           "directives":[],
+                           "hpa-feature-attributes":[  
+                              {  
+                                 "hpa-attribute-key":"numVirtualCpu",
+                                 "hpa-attribute-value":"64",
+                                 "operator":"="
+                              },
+                              {  
+                                 "hpa-attribute-key":"virtualMemSize",
+                                 "hpa-attribute-value":"64",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        },
+                        {  
+                           "hpa-feature":"numa",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory":"True",
+                           "directives":[],
+                           "hpa-feature-attributes":[  
+                              {  
+                                 "hpa-attribute-key":"numaNodes",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"="
+                              },
+                              {  
+                                 "hpa-attribute-key":"numaCpu-0",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"="
+                              },
+                              {  
+                                 "hpa-attribute-key":"numaCpu-1",
+                                 "hpa-attribute-value":"4",
+                                 "operator":"="
+                              },
+                              {  
+                                 "hpa-attribute-key":"numaMem-0",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              },
+                              {  
+                                 "hpa-attribute-key":"numaMem-1",
+                                 "hpa-attribute-value":"4",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        }
+                     ]
+                  },
+                  {  
+                     "id":"vg_2",
+                     "type":"vnfc",
+                     "directives":[
+                        {
+                           "type":"flavor_directives",
+                           "attributes":[
+                              {
+                                 "attribute_name":"flavor_label_2",
+                                 "attribute_value":""
+                              }
+                           ]
+                        }
+                     ],
+                     "flavorProperties":[  
+                        {  
+                           "hpa-feature":"basicCapabilities",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "True",
+                           "directives":[],
+                           "hpa-feature-attributes":[  
+                              {  
+                                 "hpa-attribute-key":"numVirtualCpu",
+                                 "hpa-attribute-value":"32",
+                                 "operator":"="
+                              },
+                              {  
+                                 "hpa-attribute-key":"virtualMemSize",
+                                 "hpa-attribute-value":"128",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        },
+                        {  
+                           "hpa-feature":"ovsDpdk",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "True",
+                           "directives":[],
+                           "hpa-feature-attributes":[  
+                              {  
+                                 "hpa-attribute-key":"dataProcessingAccelerationLibrary",
+                                 "hpa-attribute-value":"v18.02",
+                                 "operator":"="
+                              }
+                           ]
+                        }
+                     ]
+                  }
+               ]
+            }
+         }
+      },
+      "optimization":{  
+         "minimize":{  
+            "sum":[  
+               {  
+                  "distance_between":[  
+                     "customer_loc",
+                     "vG"
+                  ]
+               }
+            ]
+         }
+      }
+   },
+   "timeout":5,
+   "limit":3
+}
diff --git a/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json b/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json
new file mode 100644
index 0000000..50c23ee
--- /dev/null
+++ b/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json
@@ -0,0 +1,247 @@
+{
+   "name":"vCPE-HPA-Requirement-Optional",
+   "template":{
+      "homing_template_version":"2017-10-10",
+      "parameters":{
+         "service_name":"Residential vCPE",
+         "service_id":"vcpe_service_id",
+         "customer_lat":45.395968,
+         "customer_long":-71.135344,
+         "REQUIRED_MEM":4,
+         "REQUIRED_DISK":100,
+         "pnf_id":"some_pnf_id"
+      },
+      "locations":{
+         "customer_loc":{
+            "latitude":{
+               "get_param":"customer_lat"
+            },
+            "longitude":{
+               "get_param":"customer_long"
+            }
+         }
+      },
+      "demands":{
+         "vG":[
+            {
+               "inventory_provider":"aai",
+               "inventory_type":"cloud"
+            }
+         ]
+      },
+      "constraints":{
+         "constraint_vg_customer":{
+            "type":"distance_to_location",
+            "demands":[
+               "vG"
+            ],
+            "properties":{
+               "distance":"< 100 km",
+               "location":"customer_loc"
+            }
+         },
+         "hpa_constraint":{
+            "type":"hpa",
+            "demands":[
+               "vG"
+            ],
+            "properties":{
+               "evaluate":[
+                  {
+                     "id":"vg_1",
+                     "type":"vnfc",
+                     "directives":[
+                        {
+                           "type":"flavor_directives",
+                           "attributes":[
+                              {
+                                 "attribute_name":"flavor_label_1",
+                                 "attribute_value":""
+                              }
+                           ]
+                        }
+                     ],
+                     "flavorProperties":[
+                        {
+                           "hpa-feature":"basicCapabilities",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "True",
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"numVirtualCpu",
+                                 "hpa-attribute-value":"4",
+                                 "operator":">="
+                              },
+                              {
+                                 "hpa-attribute-key":"virtualMemSize",
+                                 "hpa-attribute-value":"8",
+                                 "operator":">=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        },
+                         {
+                           "hpa-feature":"instructionSetExtensions",
+                           "hpa-version":"v1",
+                           "architecture":"Intel64",
+                           "mandatory": "True",
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"instructionSetExtensions",
+                                 "hpa-attribute-value":["aes", "sse", "avx", "smt"],
+                                 "operator":"ALL",
+                                 "unit":""
+                              }
+                           ]
+                        },
+                        {
+                           "hpa-feature":"numa",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory":"False",
+                           "score":"3",
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"numaNodes",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaCpu-0",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaCpu-1",
+                                 "hpa-attribute-value":"4",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaMem-0",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              },
+                              {
+                                 "hpa-attribute-key":"numaMem-1",
+                                 "hpa-attribute-value":"4",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        }
+                     ]
+                  },
+                  {
+                     "id":"vg_2",
+                     "type":"vnfc",
+                     "directives":[
+                        {
+                           "type":"flavor_directives",
+                           "attributes":[
+                              {
+                                 "attribute_name":"flavor_label_2",
+                                 "attribute_value":""
+                              }
+                           ]
+                        }
+                     ],
+                     "flavorProperties":[
+                        {
+                           "hpa-feature":"basicCapabilities",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "True",
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"numVirtualCpu",
+                                 "hpa-attribute-value":"4",
+                                 "operator":">="
+                              },
+                              {
+                                 "hpa-attribute-key":"virtualMemSize",
+                                 "hpa-attribute-value":"8",
+                                 "operator":">=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        },
+                         {
+                           "hpa-feature":"ovsDpdk",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "False",
+                           "score":"5",
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"dataProcessingAccelerationLibrary",
+                                 "hpa-attribute-value":"v18.02",
+                                 "operator":"="
+                              }
+                           ]
+                        },
+                        {
+                           "hpa-feature":"numa",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory":"False",
+                           "score":"3",
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
+                                 "hpa-attribute-key":"numaNodes",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaCpu-0",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaCpu-1",
+                                 "hpa-attribute-value":"4",
+                                 "operator":"="
+                              },
+                              {
+                                 "hpa-attribute-key":"numaMem-0",
+                                 "hpa-attribute-value":"2",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              },
+                              {
+                                 "hpa-attribute-key":"numaMem-1",
+                                 "hpa-attribute-value":"4",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        }
+                     ]
+                  }
+               ]
+            }
+         }
+      },
+      "optimization":{
+         "minimize":{
+            "sum":[
+               {
+                  "distance_between":[
+                     "customer_loc",
+                     "vG"
+                  ]
+               }
+            ]
+         }
+      }
+   },
+   "timeout":5,
+   "limit":3
+}
diff --git a/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json b/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json
new file mode 100644
index 0000000..4a6d3bc
--- /dev/null
+++ b/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json
@@ -0,0 +1,267 @@
+{
+  "name": "vCPE-HPA-Requirement-Optional",
+  "template": {
+    "homing_template_version": "2017-10-10",
+    "parameters": {
+      "service_name": "Residential vCPE",
+      "service_id": "vcpe_service_id",
+      "customer_lat": 45.395968,
+      "customer_long": -71.135344,
+      "REQUIRED_MEM": 4,
+      "REQUIRED_DISK": 100,
+      "pnf_id": "some_pnf_id"
+    },
+    "locations": {
+      "customer_loc": {
+        "latitude": {
+          "get_param": "customer_lat"
+        },
+        "longitude": {
+          "get_param": "customer_long"
+        }
+      }
+    },
+    "demands": {
+      "vG": [
+        {
+          "inventory_provider": "aai",
+          "inventory_type": "cloud"
+        }
+      ]
+    },
+    "constraints": {
+      "constraint_vg_customer": {
+        "type": "distance_to_location",
+        "demands": [
+          "vG"
+        ],
+        "properties": {
+          "distance": "< 100 km",
+          "location": "customer_loc"
+        }
+      },
+      "hpa_constraint": {
+        "type": "hpa",
+        "demands": [
+          "vG"
+        ],
+        "properties": {
+          "evaluate": [
+            {
+              "id":"vg_1",
+              "type":"vnfc",
+              "directives":[
+                {
+                  "type":"flavor_directives",
+                  "attributes":[
+                    {
+                      "attribute_name":"flavor_label_1",
+                      "attribute_value":""
+                    }
+                  ]
+                }
+              ],
+              "flavorProperties": [
+                {
+                  "hpa-feature": "basicCapabilities",
+                  "hpa-version": "v1",
+                  "architecture": "generic",
+                  "mandatory": "True",
+                  "directives":[],
+                  "hpa-feature-attributes": [
+                    {
+                      "hpa-attribute-key": "numVirtualCpu",
+                      "hpa-attribute-value": "4",
+                      "operator": ">="
+                    },
+                    {
+                      "hpa-attribute-key": "virtualMemSize",
+                      "hpa-attribute-value": "8",
+                      "operator": ">=",
+                      "unit": "GB"
+                    }
+                  ]
+                },
+                {
+                  "hpa-feature": "instructionSetExtensions",
+                  "hpa-version": "v1",
+                  "architecture": "Intel64",
+                  "mandatory": "True",
+                  "directives":[],
+                  "hpa-feature-attributes": [
+                    {
+                      "hpa-attribute-key": "instructionSetExtensions",
+                      "hpa-attribute-value": [
+                        "aes",
+                        "sse",
+                        "avx",
+                        "smt"
+                      ],
+                      "operator": "ALL",
+                      "unit": ""
+                    }
+                  ]
+                },
+                {
+                  "hpa-feature": "numa",
+                  "hpa-version": "v1",
+                  "architecture": "generic",
+                  "mandatory": "False",
+                  "score": "3",
+                  "directives":[],
+                  "hpa-feature-attributes": [
+                    {
+                      "hpa-attribute-key": "numaNodes",
+                      "hpa-attribute-value": "2",
+                      "operator": "="
+                    },
+                    {
+                      "hpa-attribute-key": "numaCpu-0",
+                      "hpa-attribute-value": "2",
+                      "operator": "="
+                    },
+                    {
+                      "hpa-attribute-key": "numaCpu-1",
+                      "hpa-attribute-value": "4",
+                      "operator": "="
+                    },
+                    {
+                      "hpa-attribute-key": "numaMem-0",
+                      "hpa-attribute-value": "2",
+                      "operator": "=",
+                      "unit": "GB"
+                    },
+                    {
+                      "hpa-attribute-key": "numaMem-1",
+                      "hpa-attribute-value": "4",
+                      "operator": "=",
+                      "unit": "GB"
+                    }
+                  ]
+                }
+              ]
+            },
+            {
+              "id":"vg_2",
+              "type":"vnfc",
+              "directives":[
+                {
+                  "type":"flavor_directives",
+                  "attributes":[
+                    {
+                      "attribute_name":"flavor_label_2",
+                      "attribute_value":""
+                    }
+                  ]
+                }
+              ],
+              "flavorProperties": [
+                {
+                  "hpa-feature": "basicCapabilities",
+                  "hpa-version": "v1",
+                  "architecture": "generic",
+                  "mandatory": "True",
+                  "directives":[],
+                  "hpa-feature-attributes": [
+                    {
+                      "hpa-attribute-key": "numVirtualCpu",
+                      "hpa-attribute-value": "4",
+                      "operator": ">="
+                    },
+                    {
+                      "hpa-attribute-key": "virtualMemSize",
+                      "hpa-attribute-value": "8",
+                      "operator": ">=",
+                      "unit": "GB"
+                    }
+                  ]
+                },
+                {
+                  "hpa-feature": "ovsDpdk",
+                  "hpa-version": "v1",
+                  "architecture": "generic",
+                  "mandatory": "False",
+                  "score": "5",
+                  "directives":[],
+                  "hpa-feature-attributes": [
+                    {
+                      "hpa-attribute-key": "dataProcessingAccelerationLibrary",
+                      "hpa-attribute-value": "v18.02",
+                      "operator": "="
+                    }
+                  ]
+                },
+                {
+                  "hpa-feature": "numa",
+                  "hpa-version": "v1",
+                  "architecture": "generic",
+                  "mandatory": "False",
+                  "score": "3",
+                  "directives":[],
+                  "hpa-feature-attributes": [
+                    {
+                      "hpa-attribute-key": "numaNodes",
+                      "hpa-attribute-value": "2",
+                      "operator": "="
+                    },
+                    {
+                      "hpa-attribute-key": "numaCpu-0",
+                      "hpa-attribute-value": "2",
+                      "operator": "="
+                    },
+                    {
+                      "hpa-attribute-key": "numaCpu-1",
+                      "hpa-attribute-value": "4",
+                      "operator": "="
+                    },
+                    {
+                      "hpa-attribute-key": "numaMem-0",
+                      "hpa-attribute-value": "2",
+                      "operator": "=",
+                      "unit": "GB"
+                    },
+                    {
+                      "hpa-attribute-key": "numaMem-1",
+                      "hpa-attribute-value": "4",
+                      "operator": "=",
+                      "unit": "GB"
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      }
+    },
+    "optimization": {
+      "minimize": {
+        "sum": [
+          {
+            "product": [
+              100,
+              {
+                "distance_between": [
+                  "customer_loc",
+                  "vG"
+                ]
+              }
+            ]
+          },
+          {
+            "product": [
+              200,
+              {
+                "hpa_score": [
+                  "vG"
+                ]
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "timeout": 5,
+  "limit": 3
+}
diff --git a/tests/optf-has/has/data/plan_with_hpa_simple.json b/tests/optf-has/has/data/plan_with_hpa_simple.json
new file mode 100644
index 0000000..d343dc8
--- /dev/null
+++ b/tests/optf-has/has/data/plan_with_hpa_simple.json
@@ -0,0 +1,156 @@
+{  
+   "name":"vCPE-with-HPA",
+   "template":{  
+      "homing_template_version":"2017-10-10",
+      "parameters":{  
+         "service_name":"Residential vCPE",
+         "service_id":"vcpe_service_id",
+         "customer_lat":45.395968,
+         "customer_long":-71.135344,
+         "REQUIRED_MEM":4,
+         "REQUIRED_DISK":100,
+         "pnf_id":"some_pnf_id"
+      },
+      "locations":{  
+         "customer_loc":{  
+            "latitude":{  
+               "get_param":"customer_lat"
+            },
+            "longitude":{  
+               "get_param":"customer_long"
+            }
+         }
+      },
+      "demands":{
+         "vG":[  
+            {  
+               "inventory_provider":"aai",
+               "inventory_type":"cloud"
+            }
+         ]
+      },
+      "constraints":{  
+        "hpa_constraint":{  
+            "type":"hpa",
+            "demands":[  
+               "vG"
+            ],
+            "properties":{  
+               "evaluate":[  
+                  {  
+                     "id":"vg_1",
+                     "type":"vnfc",
+                     "directives":[
+                         {
+                            "type":"flavor_directives",
+                            "attributes":[
+                               {
+                                  "attribute_name":"flavor_label_1",
+                                  "attribute_value":""
+                               }
+                            ]
+                         }
+                     ],
+                     "flavorProperties":[  
+                        {  
+                           "hpa-feature":"basicCapabilities",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "False",
+                           "directives":[],
+                           "score": "5",
+                           "hpa-feature-attributes":[  
+                              {  
+                                 "hpa-attribute-key":"numVirtualCpu",
+                                 "hpa-attribute-value":"32",
+                                 "operator":"="
+                              },
+                              {  
+                                 "hpa-attribute-key":"virtualMemSize",
+                                 "hpa-attribute-value":"64",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        },
+                        {  
+                           "hpa-feature":"ovsDpdk",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "False",
+                           "directives":[],
+                           "score": "5",
+                           "hpa-feature-attributes":[  
+                              {  
+                                 "hpa-attribute-key":"dataProcessingAccelerationLibrary",
+                                 "hpa-attribute-value":"v18.02",
+                                 "operator":"="
+                              }
+                           ]
+                        }
+                     ]
+                  },
+                  {  
+                     "id":"vg_2",
+                     "type":"vnfc",
+                     "directives":[
+                         {
+                            "type":"flavor_directives",
+                            "attributes":[
+                               {
+                                  "attribute_name":"flavor_label_2",
+                                  "attribute_value":""
+                               }
+                            ]
+                         }
+                     ],
+                     "flavorProperties":[  
+                        {  
+                           "hpa-feature":"basicCapabilities",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "False",
+                           "directives":[],
+                           "score": "5",
+                           "hpa-feature-attributes":[  
+                              {  
+                                 "hpa-attribute-key":"numVirtualCpu",
+                                 "hpa-attribute-value":"8",
+                                 "operator":">="
+                              },
+                              {  
+                                 "hpa-attribute-key":"virtualMemSize",
+                                 "hpa-attribute-value":"16",
+                                 "operator":">=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        }
+                     ]
+                  }
+               ]
+            }
+         }
+      },
+      "optimization":{  
+         "minimize":{  
+            "sum":[  
+               {  
+                  "distance_between":[  
+                     "customer_loc",
+                     "vG"
+                  ]
+               },
+               {  
+                  "distance_between":[  
+                     "customer_loc",
+                     "vG"
+                  ]
+               }
+            ]
+         }
+      }
+   },
+   "timeout":5,
+   "limit":3
+}
diff --git a/tests/optf-has/has/data/plan_with_hpa_unmatched.json b/tests/optf-has/has/data/plan_with_hpa_unmatched.json
new file mode 100644
index 0000000..e95eced
--- /dev/null
+++ b/tests/optf-has/has/data/plan_with_hpa_unmatched.json
@@ -0,0 +1,143 @@
+{  
+   "name":"vCPE-with-HPA-unmatched-requirements",
+   "template":{  
+      "homing_template_version":"2017-10-10",
+      "parameters":{  
+         "service_name":"Residential vCPE",
+         "service_id":"vcpe_service_id",
+         "customer_lat":45.395968,
+         "customer_long":-71.135344,
+         "REQUIRED_MEM":4,
+         "REQUIRED_DISK":100,
+         "pnf_id":"some_pnf_id"
+      },
+      "locations":{  
+         "customer_loc":{  
+            "latitude":{  
+               "get_param":"customer_lat"
+            },
+            "longitude":{  
+               "get_param":"customer_long"
+            }
+         }
+      },
+      "demands":{  
+         "vG":[  
+            {  
+               "inventory_provider":"aai",
+               "inventory_type":"cloud"
+            }
+         ]
+      },
+      "constraints":{  
+         "constraint_vgmux_customer":{  
+            "type":"distance_to_location",
+            "demands":[  
+               "vG"
+            ],
+            "properties":{  
+               "distance":"< 100 km",
+               "location":"customer_loc"
+            }
+         },
+         "hpa_constraint":{  
+            "type":"hpa",
+            "demands":[  
+               "vG"
+            ],
+            "properties":{  
+               "evaluate":[  
+                  {  
+                     "id":"vg_1",
+                     "type":"vnfc",
+                     "directives":[
+                         {
+                            "type":"flavor_directives",
+                            "attributes":[
+                               {
+                                  "attribute_name":"flavor_label_1",
+                                  "attribute_value":""
+                               }
+                            ]
+                         }
+                     ],
+                     "flavorProperties":[  
+                        {  
+                           "hpa-feature":"basicCapabilities",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory": "True",
+                           "directives":[],
+                           "hpa-feature-attributes":[  
+                              {  
+                                 "hpa-attribute-key":"numVirtualCpu",
+                                 "hpa-attribute-value":"60",
+                                 "operator":"="
+                              },
+                              {  
+                                 "hpa-attribute-key":"virtualMemSize",
+                                 "hpa-attribute-value":"64",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        }
+                     ]
+                  },
+                  {  
+                     "id":"vg_2",
+                     "type":"vnfc",
+                     "directives":[
+                         {
+                            "type":"flavor_directives",
+                            "attributes":[
+                               {
+                                  "attribute_name":"flavor_label_2",
+                                  "attribute_value":""
+                               }
+                            ]
+                         }
+                     ],
+                     "flavorProperties":[  
+                        {  
+                           "hpa-feature":"basicCapabilities",
+                           "hpa-version":"v1",
+                           "architecture":"generic",
+                           "mandatory":"True",
+                           "directives":[],
+                           "hpa-feature-attributes":[  
+                              {  
+                                 "hpa-attribute-key":"numVirtualCpu",
+                                 "hpa-attribute-value":"30",
+                                 "operator":"="
+                              },
+                              {  
+                                 "hpa-attribute-key":"virtualMemSize",
+                                 "hpa-attribute-value":"128",
+                                 "operator":"=",
+                                 "unit":"GB"
+                              }
+                           ]
+                        }
+                     ]
+                  }
+               ]
+            }
+         }
+      },
+      "optimization":{  
+         "minimize":{  
+            "sum":[  
+               {  
+                  "distance_between":[  
+                     "customer_loc",
+                     "vG"
+                  ]
+               }
+            ]
+         }
+      }
+   },
+   "timeout":5,
+   "limit":3
+}
diff --git a/tests/optf-has/has/data/plan_with_lati_and_longi.json b/tests/optf-has/has/data/plan_with_lati_and_longi.json
new file mode 100644
index 0000000..5e35d6a
--- /dev/null
+++ b/tests/optf-has/has/data/plan_with_lati_and_longi.json
@@ -0,0 +1,41 @@
+{
+   "name":"onap template with lati and longi without constraints and without optimizations",
+   "template":{
+      "homing_template_version":"2017-10-10",
+      "parameters":{
+         "service_name":"Residential vCPE",
+         "service_id":"vcpe_service_id",
+         "customer_lat":45.395968,
+         "customer_long":-71.135344,
+         "physical_location":"DLLSTX233",
+         "REQUIRED_MEM":4,
+         "REQUIRED_DISK":100,
+         "pnf_id":"some_pnf_id"
+      },
+      "locations":{
+         "customer_loc":{
+            "latitude":{
+               "get_param":"customer_lat"
+            },
+            "longitude":{
+               "get_param":"customer_long"
+            }
+         }
+      },
+      "demands":{
+         "vG":[
+            {
+               "inventory_provider":"aai",
+               "inventory_type":"cloud"
+            }
+         ]
+      },
+      "constraints":{
+
+      },
+      "optimization":{
+
+      }
+   }
+}
+
diff --git a/tests/optf-has/has/data/plan_with_short_distance_constraint.json b/tests/optf-has/has/data/plan_with_short_distance_constraint.json
new file mode 100644
index 0000000..68a7e11
--- /dev/null
+++ b/tests/optf-has/has/data/plan_with_short_distance_constraint.json
@@ -0,0 +1,64 @@
+{
+   "name":"onap template with short distance constraint",
+   "template":{
+      "homing_template_version":"2017-10-10",
+      "parameters":{
+         "service_name":"Residential vCPE",
+         "service_id":"vcpe_service_id",
+         "customer_lat":25.395968,
+         "customer_long":-51.135344,
+         "physical_location":"DLLSTX233",
+         "REQUIRED_MEM":4,
+         "REQUIRED_DISK":100,
+         "pnf_id":"some_pnf_id"
+      },
+      "locations":{
+         "customer_loc":{
+            "latitude":{
+               "get_param":"customer_lat"
+            },
+            "longitude":{
+               "get_param":"customer_long"
+            }
+         }
+      },
+      "demands":{
+         "vG":[
+            {
+               "inventory_provider":"aai",
+               "inventory_type":"cloud"
+            }
+         ]
+      },
+      "constraints":{
+         "distance-vg":{
+            "type":"distance_to_location",
+            "demands":[
+               "vG"
+            ],
+            "properties":{
+               "distance":"< 1 km",
+               "location":"customer_loc"
+            }
+         }
+      },
+      "optimization":{
+    "minimize": {
+      "sum": [
+        {
+          "distance_between": [
+            "customer_loc",
+            "vG"
+          ]
+        },
+        {
+          "distance_between": [
+            "customer_loc",
+            "vG"
+          ]
+        }
+      ]
+    }
+      }
+   }
+}
diff --git a/tests/optf-has/has/data/plan_with_vim_fit.json b/tests/optf-has/has/data/plan_with_vim_fit.json
new file mode 100644
index 0000000..00a5991
--- /dev/null
+++ b/tests/optf-has/has/data/plan_with_vim_fit.json
@@ -0,0 +1,89 @@
+{  
+   "name":"vCPE-Sanity1",
+   "template":{  
+      "homing_template_version":"2017-10-10",
+      "parameters":{  
+         "service_name":"Residential vCPE",
+         "service_id":"vcpe_service_id",
+         "customer_lat":45.395968,
+         "customer_long":-71.135344,
+         "REQUIRED_MEM":4,
+         "REQUIRED_DISK":100,
+         "pnf_id":"some_pnf_id"
+      },
+      "locations":{  
+         "customer_loc":{  
+            "latitude":{  
+               "get_param":"customer_lat"
+            },
+            "longitude":{  
+               "get_param":"customer_long"
+            }
+         }
+      },
+      "demands":{  
+         "vG":[  
+            {  
+               "inventory_provider":"aai",
+               "inventory_type":"cloud"
+            }
+         ]
+      },
+      "constraints":{  
+         "constraint_vg_customer":{  
+            "type":"distance_to_location",
+            "demands":[  
+               "vG"
+            ],
+            "properties":{  
+               "distance":"< 100 km",
+               "location":"customer_loc"
+            }
+         },
+         "check_cloud_capacity":{  
+            "type":"vim_fit",
+            "demands":[  
+               "vG"
+            ],
+            "properties":{  
+               "controller":"multicloud",
+               "request":{  
+                  "vCPU":10,
+                  "Memory":{  
+                     "quantity":{  
+                        "get_param":"REQUIRED_MEM"
+                     },
+                     "unit":"GB"
+                  },
+                  "Storage":{  
+                     "quantity":{  
+                        "get_param":"REQUIRED_DISK"
+                     },
+                     "unit":"GB"
+                  }
+               }
+            }
+         }
+      },
+      "optimization":{  
+         "minimize":{  
+            "sum":[  
+               {  
+                  "distance_between":[  
+                     "customer_loc",
+                     "vG"
+                  ]
+               },
+               {  
+                  "distance_between":[  
+                     "customer_loc",
+                     "vG"
+                  ]
+               }
+            ]
+         }
+      }
+   },
+   "timeout":5,
+   "limit":3
+}
diff --git a/tests/optf-has/has/data/plan_with_wrong_distance_constraint.json b/tests/optf-has/has/data/plan_with_wrong_distance_constraint.json
new file mode 100644
index 0000000..9f25c2d
--- /dev/null
+++ b/tests/optf-has/has/data/plan_with_wrong_distance_constraint.json
@@ -0,0 +1,63 @@
+{
+   "name":"onap template with wrong distance constraint",
+   "template":{
+      "homing_template_version":"2017-10-10",
+      "parameters":{
+         "service_name":"Residential vCPE",
+         "service_id":"vcpe_service_id",
+         "customer_lat":45.395968,
+         "customer_long":-71.135344,
+         "physical_location":"DLLSTX233",
+         "REQUIRED_MEM":4,
+         "REQUIRED_DISK":100,
+         "pnf_id":"some_pnf_id"
+      },
+      "locations":{
+         "customer_loc":{
+            "latitude":{
+               "get_param":"customer_lat"
+            },
+            "longitude":{
+               "get_param":"customer_long"
+            }
+         }
+      },
+      "demands":{
+         "vG":[
+            {
+               "inventory_provider":"aai",
+               "inventory_type":"cloud"
+            }
+         ]
+      },
+      "constraints":{
+         "distance-vg":{
+            "demands":[
+               "vG"
+            ],
+            "properties":{
+               "distance":"< 1 km",
+               "location":"customer_loc"
+            }
+         }
+      },
+      "optimization":{
+    "minimize": {
+      "sum": [
+        {
+          "distance_between": [
+            "customer_loc",
+            "vG"
+          ]
+        },
+        {
+          "distance_between": [
+            "customer_loc",
+            "vG"
+          ]
+        }
+      ]
+    }
+      }
+   }
+}
diff --git a/tests/optf-has/has/data/plan_with_wrong_version.json b/tests/optf-has/has/data/plan_with_wrong_version.json
new file mode 100644
index 0000000..c0618bf
--- /dev/null
+++ b/tests/optf-has/has/data/plan_with_wrong_version.json
@@ -0,0 +1,41 @@
+{
+   "name":"onap template with wrong version",
+   "template":{
+      "homing_template_version":"xxxx-yy-zz",
+      "parameters":{
+         "service_name":"Residential vCPE",
+         "service_id":"vcpe_service_id",
+         "customer_lat":45.395968,
+         "customer_long":-71.135344,
+         "physical_location":"DLLSTX233",
+         "REQUIRED_MEM":4,
+         "REQUIRED_DISK":100,
+         "pnf_id":"some_pnf_id"
+      },
+      "locations":{
+         "customer_loc":{
+            "latitude":{
+               "get_param":"customer_lat"
+            },
+            "longitude":{
+               "get_param":"customer_long"
+            }
+         }
+      },
+      "demands":{
+         "vG":[
+            {
+               "inventory_provider":"aai",
+               "inventory_type":"cloud"
+            }
+         ]
+      },
+      "constraints":{
+
+      },
+      "optimization":{
+
+      }
+   }
+}
+
diff --git a/tests/optf-has/has/data/plan_without_demand_section.json b/tests/optf-has/has/data/plan_without_demand_section.json
new file mode 100644
index 0000000..fe5d2fa
--- /dev/null
+++ b/tests/optf-has/has/data/plan_without_demand_section.json
@@ -0,0 +1,33 @@
+{
+   "name":"onap template without demand section",
+   "template":{
+      "homing_template_version":"2017-10-10",
+      "parameters":{
+         "service_name":"Residential vCPE",
+         "service_id":"vcpe_service_id",
+         "customer_lat":45.395968,
+         "customer_long":-71.135344,
+         "physical_location":"DLLSTX233",
+         "REQUIRED_MEM":4,
+         "REQUIRED_DISK":100,
+         "pnf_id":"some_pnf_id"
+      },
+      "locations":{
+         "customer_loc":{
+            "latitude":{
+               "get_param":"customer_lat"
+            },
+            "longitude":{
+               "get_param":"customer_long"
+            }
+         }
+      },
+      "constraints":{
+
+      },
+      "optimization":{
+
+      }
+   }
+}
+