Update OOF CSIT plans with new policy model 03/67303/1
authorRuoyu Ying <ruoyu.ying@intel.com>
Tue, 18 Sep 2018 22:30:16 +0000 (06:30 +0800)
committerRuoyu Ying <ruoyu.ying@intel.com>
Tue, 18 Sep 2018 22:33:45 +0000 (06:33 +0800)
Update OOF-HAS CSIT plans with the new policy model

Change-Id: Ie5c99c9f92c88200edb0d5e541c37f557fdf1fc0
Issue-ID: OPTFRA-322
Signed-off-by: Ruoyu Ying <ruoyu.ying@intel.com>
test/csit/tests/optf-has/has/data/plan_with_hpa.json
test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json
test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json
test/csit/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json
test/csit/tests/optf-has/has/data/plan_with_hpa_simple.json
test/csit/tests/optf-has/has/data/plan_with_hpa_unmatched.json

index bf314a9..2198577 100644 (file)
@@ -1,8 +1,8 @@
-{  
+{
    "name":"vCPE-with-HPA",
-   "template":{  
+   "template":{
       "homing_template_version":"2017-10-10",
-      "parameters":{  
+      "parameters":{
          "service_name":"Residential vCPE",
          "service_id":"vcpe_service_id",
          "customer_lat":45.395968,
          "REQUIRED_DISK":100,
          "pnf_id":"some_pnf_id"
       },
-      "locations":{  
-         "customer_loc":{  
-            "latitude":{  
+      "locations":{
+         "customer_loc":{
+            "latitude":{
                "get_param":"customer_lat"
             },
-            "longitude":{  
+            "longitude":{
                "get_param":"customer_long"
             }
          }
       },
       "demands":{
-         "vG":[  
-            {  
+         "vG":[
+            {
                "inventory_provider":"aai",
                "inventory_type":"cloud"
             }
          ]
       },
       "constraints":{
-        "constraint_vg_customer":{  
+        "constraint_vg_customer":{
             "type":"distance_to_location",
-            "demands":[  
+            "demands":[
                "vG"
             ],
-            "properties":{  
+            "properties":{
                "distance":"< 100 km",
                "location":"customer_loc"
             }
          },
-        "hpa_constraint":{  
+        "hpa_constraint":{
             "type":"hpa",
-            "demands":[  
+            "demands":[
                "vG"
             ],
-            "properties":{  
-               "evaluate":[  
-                  {  
-                     "flavorLabel":"flavor_label_1",
-                     "flavorProperties":[  
-                        {  
+            "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",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "directives": [],
+                           "hpa-feature-attributes":[
+                              {
                                  "hpa-attribute-key":"numVirtualCpu",
                                  "hpa-attribute-value":"4",
                                  "operator":">="
                               },
-                              {  
+                              {
                                  "hpa-attribute-key":"virtualMemSize",
                                  "hpa-attribute-value":"4",
                                  "operator":">=",
                               }
                            ]
                         },
-                        {  
+                        {
                            "hpa-feature":"numa",
                            "hpa-version":"v1",
                            "architecture":"generic",
                            "mandatory": "False",
                            "score": "5",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "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":"=",
                               }
                            ]
                         },
-                        {  
+                        {
                            "hpa-feature":"cpuPinning",
                            "hpa-version":"v1",
                            "architecture":"generic",
                            "mandatory": "False",
                            "score": "5",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "directives": [],
+                           "hpa-feature-attributes":[
+                              {
                                  "hpa-attribute-key":"logicalCpuThreadPinningPolicy",
                                  "hpa-attribute-value":"prefer",
                                  "operator":"="
                               },
-                              {  
+                              {
                                  "hpa-attribute-key":"logicalCpuPinningPolicy",
                                  "hpa-attribute-value":"dedicated",
                                  "operator":"="
                         }
                      ]
                   },
-                  {  
-                     "flavorLabel":"flavor_label_2",
-                     "flavorProperties":[  
-                        {  
+                  {
+                     "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",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
                                  "hpa-attribute-key":"numVirtualCpu",
                                  "hpa-attribute-value":"8",
                                  "operator":">="
                               },
-                              {  
+                              {
                                  "hpa-attribute-key":"virtualMemSize",
                                  "hpa-attribute-value":"16",
                                  "operator":">=",
                               }
                            ]
                         },
-                        {  
+                        {
                            "hpa-feature":"numa",
                            "hpa-version":"v1",
                            "architecture":"generic",
                            "mandatory": "False",
                            "score": "5",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "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":"=",
                               }
                            ]
                         },
-                        {  
+                        {
                            "hpa-feature":"ovsDpdk",
                            "hpa-version":"v1",
                            "architecture":"generic",
                            "mandatory": "False",
                            "score": "5",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
                                  "hpa-attribute-key":"dataProcessingAccelerationLibrary",
                                  "hpa-attribute-value":"v18.02",
                                  "operator":"="
             }
          }
       },
-      "optimization":{  
-         "minimize":{  
-            "sum":[  
-               {  
-                  "distance_between":[  
+      "optimization":{
+         "minimize":{
+            "sum":[
+               {
+                  "distance_between":[
                      "customer_loc",
                      "vG"
                   ]
                },
-               {  
-                  "distance_between":[  
+               {
+                  "distance_between":[
                      "customer_loc",
                      "vG"
                   ]
index 80685ae..bb613ab 100644 (file)
             "properties":{  
                "evaluate":[  
                   {  
-                     "flavorLabel":"flavor_label_1",
+                     "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",
@@ -74,6 +87,7 @@
                            "hpa-version":"v1",
                            "architecture":"generic",
                            "mandatory":"True",
+                           "directives":[],
                            "hpa-feature-attributes":[  
                               {  
                                  "hpa-attribute-key":"numaNodes",
                      ]
                   },
                   {  
-                     "flavorLabel":"flavor_label_2",
+                     "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-version":"v1",
                            "architecture":"generic",
                            "mandatory": "True",
+                           "directives":[],
                            "hpa-feature-attributes":[  
                               {  
                                  "hpa-attribute-key":"dataProcessingAccelerationLibrary",
index 4672349..50c23ee 100644 (file)
@@ -1,8 +1,8 @@
-{  
+{
    "name":"vCPE-HPA-Requirement-Optional",
-   "template":{  
+   "template":{
       "homing_template_version":"2017-10-10",
-      "parameters":{  
+      "parameters":{
          "service_name":"Residential vCPE",
          "service_id":"vcpe_service_id",
          "customer_lat":45.395968,
          "REQUIRED_DISK":100,
          "pnf_id":"some_pnf_id"
       },
-      "locations":{  
-         "customer_loc":{  
-            "latitude":{  
+      "locations":{
+         "customer_loc":{
+            "latitude":{
                "get_param":"customer_lat"
             },
-            "longitude":{  
+            "longitude":{
                "get_param":"customer_long"
             }
          }
       },
-      "demands":{  
-         "vG":[  
-            {  
+      "demands":{
+         "vG":[
+            {
                "inventory_provider":"aai",
                "inventory_type":"cloud"
             }
          ]
       },
-      "constraints":{  
-         "constraint_vg_customer":{  
+      "constraints":{
+         "constraint_vg_customer":{
             "type":"distance_to_location",
-            "demands":[  
+            "demands":[
                "vG"
             ],
-            "properties":{  
+            "properties":{
                "distance":"< 100 km",
                "location":"customer_loc"
             }
          },
-         "hpa_constraint":{  
+         "hpa_constraint":{
             "type":"hpa",
-            "demands":[  
+            "demands":[
                "vG"
             ],
-            "properties":{  
-               "evaluate":[  
-                  {  
-                     "flavorLabel":"flavor_label_1",
-                     "flavorProperties":[  
-                        {  
+            "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",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
                                  "hpa-attribute-key":"numVirtualCpu",
                                  "hpa-attribute-value":"4",
                                  "operator":">="
                               },
-                              {  
+                              {
                                  "hpa-attribute-key":"virtualMemSize",
                                  "hpa-attribute-value":"8",
                                  "operator":">=",
                               }
                            ]
                         },
-                         {  
+                         {
                            "hpa-feature":"instructionSetExtensions",
                            "hpa-version":"v1",
                            "architecture":"Intel64",
                            "mandatory": "True",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
                                  "hpa-attribute-key":"instructionSetExtensions",
                                  "hpa-attribute-value":["aes", "sse", "avx", "smt"],
                                  "operator":"ALL",
                               }
                            ]
                         },
-                        {  
+                        {
                            "hpa-feature":"numa",
                            "hpa-version":"v1",
                            "architecture":"generic",
                            "mandatory":"False",
                            "score":"3",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "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":"=",
                         }
                      ]
                   },
-                  {  
-                     "flavorLabel":"flavor_label_2",
-                     "flavorProperties":[  
-                        {  
+                  {
+                     "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",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "directives":[],
+                           "hpa-feature-attributes":[
+                              {
                                  "hpa-attribute-key":"numVirtualCpu",
                                  "hpa-attribute-value":"4",
                                  "operator":">="
                               },
-                              {  
+                              {
                                  "hpa-attribute-key":"virtualMemSize",
                                  "hpa-attribute-value":"8",
                                  "operator":">=",
                               }
                            ]
                         },
-                         {  
+                         {
                            "hpa-feature":"ovsDpdk",
                            "hpa-version":"v1",
                            "architecture":"generic",
                            "mandatory": "False",
                            "score":"5",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "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",
-                           "hpa-feature-attributes":[  
-                              {  
+                           "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":"=",
             }
          }
       },
-      "optimization":{  
-         "minimize":{  
-            "sum":[  
-               {  
-                  "distance_between":[  
+      "optimization":{
+         "minimize":{
+            "sum":[
+               {
+                  "distance_between":[
                      "customer_loc",
                      "vG"
                   ]
index 55536f3..4a6d3bc 100644 (file)
         "properties": {
           "evaluate": [
             {
-              "flavorLabel": "flavor_label_1",
+              "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",
@@ -74,6 +87,7 @@
                   "hpa-version": "v1",
                   "architecture": "Intel64",
                   "mandatory": "True",
+                  "directives":[],
                   "hpa-feature-attributes": [
                     {
                       "hpa-attribute-key": "instructionSetExtensions",
                   "architecture": "generic",
                   "mandatory": "False",
                   "score": "3",
+                  "directives":[],
                   "hpa-feature-attributes": [
                     {
                       "hpa-attribute-key": "numaNodes",
               ]
             },
             {
-              "flavorLabel": "flavor_label_2",
+              "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",
                   "architecture": "generic",
                   "mandatory": "False",
                   "score": "5",
+                  "directives":[],
                   "hpa-feature-attributes": [
                     {
                       "hpa-attribute-key": "dataProcessingAccelerationLibrary",
                   "architecture": "generic",
                   "mandatory": "False",
                   "score": "3",
+                  "directives":[],
                   "hpa-feature-attributes": [
                     {
                       "hpa-attribute-key": "numaNodes",
index 25b2262..d343dc8 100644 (file)
             "properties":{  
                "evaluate":[  
                   {  
-                     "flavorLabel":"flavor_label_1",
+                     "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":[  
                               {  
@@ -65,6 +78,7 @@
                            "hpa-version":"v1",
                            "architecture":"generic",
                            "mandatory": "False",
+                           "directives":[],
                            "score": "5",
                            "hpa-feature-attributes":[  
                               {  
                      ]
                   },
                   {  
-                     "flavorLabel":"flavor_label_2",
+                     "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":[  
                               {  
index 8a31985..e95eced 100644 (file)
             "properties":{  
                "evaluate":[  
                   {  
-                     "flavorLabel":"flavor_label_1",
+                     "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",
                      ]
                   },
                   {  
-                     "flavorLabel":"flavor_label_2",
+                     "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",