fix docs config files 41/136941/1 montreal
authorthmsdt <thomas.kulik@telekom.de>
Fri, 5 Jan 2024 13:11:20 +0000 (14:11 +0100)
committerthmsdt <thomas.kulik@telekom.de>
Fri, 5 Jan 2024 13:12:53 +0000 (14:12 +0100)
Issue-ID: DOC-821

Change-Id: I7f9332993119ded3806f39de527cf029bc477cb5
Signed-off-by: thmsdt <thomas.kulik@telekom.de>
15 files changed:
.gitreview
docs/conf.py
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Affinity_vCPE_1.json
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vGMuxInfra.json
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vG_1.json
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vGMuxInfra_1.json
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vG_1.json
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Placement_Optimization_1.json
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE.json
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE_2.json
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vGMuxInfra_1.json
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vG_1.json
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vG.json
test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vGMuxInfra.json
tox.ini

index 3b0dd55..685d231 100644 (file)
@@ -2,4 +2,4 @@
 host=gerrit.onap.org
 port=29418
 project=optf/osdf.git
-defaultbranch=master
+defaultbranch=montreal
index 172975d..b2cf223 100644 (file)
@@ -1,6 +1,6 @@
 project = "onap"
-release = "master"
-version = "master"
+release = "montreal"
+version = "montreal"
 
 author = "Open Network Automation Platform"
 # yamllint disable-line rule:line-length
@@ -31,7 +31,7 @@ extensions = [
 # Change to {releasename} after you have created the new 'doc' branch.
 #
 
-branch = 'latest'
+branch = 'montreal'
 
 intersphinx_mapping = {}
 doc_url = 'https://docs.onap.org/projects'
index 2953589..5364d5d 100644 (file)
@@ -1,21 +1,33 @@
 {
-    "service": "affinityPolicy",
-    "policyName": "OSDF_DUBLIN.Affinity_vCPE_1",
-    "description": "Zone policy for vCPE",
-    "templateVersion": "OpenSource.version.1",
-    "version": "test1",
-    "priority": "3",
-    "riskType": "test",
-    "riskLevel": "2",
-    "guard": "False",
-    "content": {
-        "identity": "affinity_vCPE",
-        "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"],
-        "affinityProperty": {
-            "qualifier": "same",
-            "category": "complex"
-        },
-        "policyType": "zone",
-        "resources": ["vGMuxInfra", "vG"]
+  "OSDF_FRANKFURT.Affinity_vCPE_1": {
+    "type": "onap.policies.optimization.resource.AffinityPolicy",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.Affinity_vCPE_1",
+      "policy-version": 1
+    },
+    "properties": {
+      "scope": [
+        "OSDF_FRANKFURT"
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vG",
+        "vGMuxInfra"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
+      "identity": "affinity_vCPE",
+      "applicableResources": "any",
+      "affinityProperties": {
+        "qualifier": "same",
+        "category": "complex"
+      }
     }
+  }
 }
index 010cf3f..7ce02bf 100644 (file)
@@ -1,22 +1,32 @@
 {
-    "service": "vim_fit",
-    "policyName": "OSDF_DUBLIN.Capacity_vGMuxInfra",
-    "description": "Capacity policy for vGMuxInfra",
-    "templateVersion": "OpenSource.version.1",
-    "version": "test1",
-    "priority": "5",
-    "riskType": "test",
-    "riskLevel": "2",
-    "guard": "False",
-    "content": {
-        "identity": "capacity_vGMuxInfra",
-        "policyScope": ["VCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"],
-           "resources": ["vGMuxInfra"],
-        "capacityProperty": {
-            "controller": "multicloud",
-            "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
-        },
-        "policyType": "vim_fit",
-        "applicableResources": "any"
+  "OSDF_FRANKFURT.Capacity_vGMuxInfra": {
+    "type": "onap.policies.optimization.resource.Vim_fit",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.Capacity_vGMuxInfra",
+      "policy-version": 1
+    },
+    "properties": {
+      "scope": [
+        "OSDF_FRANKFURT"
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vGMuxInfra"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
+      "identity": "capacity_vGMuxInfra",
+      "applicableResources": "any",
+      "capacityProperty": {
+        "controller": "multicloud",
+        "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
+      }
     }
+  }
 }
index fedcc4f..c897a87 100644 (file)
@@ -1,22 +1,32 @@
 {
-    "service": "vim_fit",
-    "policyName": "OSDF_DUBLIN.Capacity_vG_1",
-    "description": "Capacity policy for vG",
-    "templateVersion": "OpenSource.version.1",
-    "version": "test1",
-    "priority": "5",
-    "riskType": "test",
-    "riskLevel": "2",
-    "guard": "False",
-    "content": {
-        "identity": "capacity_vG",
-        "policyScope": ["VCPE", "US", "INTERNATIONAL", "ip", "vG"],
-           "resources": ["vG"],
-        "capacityProperty": {
-            "controller": "multicloud",
-            "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
-        },
-        "policyType": "vim_fit",
-        "applicableResources": "any"
+  "OSDF_FRANKFURT.Capacity_vG_1": {
+    "type": "onap.policies.optimization.resource.Vim_fit",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.Capacity_vG_1",
+      "policy-version": 1
+    },
+    "properties": {
+      "scope": [
+        "OSDF_FRANKFURT"
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vG"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
+      "identity": "capacity_vG",
+      "applicableResources": "any",
+      "capacityProperty": {
+        "controller": "multicloud",
+        "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
+      }
     }
+  }
 }
index e3ba83c..163d0df 100644 (file)
@@ -1,22 +1,36 @@
 {
-  "service": "distancePolicy",
-  "policyName": "OSDF_DUBLIN.Distance_vGMuxInfra",
-  "description": "Distance Policy for vGMuxInfra",
-  "templateVersion": "OpenSource.version.1",
-  "version": "test1",
-  "priority": "3",
-  "riskType": "test",
-  "riskLevel": "2",
-  "guard": "False",
-  "content": {
-    "distanceProperties": {
-      "locationInfo": "customer_loc",
-      "distance": { "value": "500", "operator": "<", "unit": "km" }
+  "OSDF_FRANKFURT.Distance_vGMuxInfra": {
+    "type": "onap.policies.optimization.resource.DistancePolicy",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.Distance_vGMuxInfra",
+      "policy-version": 1
     },
-    "identity": "distance-vGMuxInfra",
-    "resources": ["vGMuxInfra"],
-    "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"],
-    "policyType": "distance_to_location",
-    "applicableResources": "any"
+    "properties": {
+      "scope": [ 
+        "OSDF_FRANKFURT"
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vGMuxInfra"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
+      "identity": "distance-vGMuxInfra",
+      "applicableResources": "any",
+      "distanceProperties": {
+        "locationInfo": "customer_loc",
+        "distance": {
+          "value": "500",
+          "operator": "<",
+          "unit": "km"
+        }
+      }
+    }
   }
 }
index c498c7a..aa6badc 100644 (file)
@@ -1,22 +1,36 @@
 {
-  "service": "distancePolicy",
-  "policyName": "OSDF_DUBLIN.Distance_vG_1",
-  "description": "Distance Policy for vG",
-  "templateVersion": "OpenSource.version.1",
-  "version": "test1",
-  "priority": "3",
-  "riskType": "test",
-  "riskLevel": "2",
-  "guard": "False",
-  "content": {
-    "distanceProperties": {
-      "locationInfo": "customer_loc",
-      "distance": { "value": "1500", "operator": "<", "unit": "km" }
+  "OSDF_FRANKFURT.Distance_vG_1": {
+    "type": "onap.policies.optimization.resource.DistancePolicy",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.Distance_vG_1",
+      "policy-version": 1
     },
-    "identity": "distance-vG",
-    "resources": ["vG"],
-    "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"],
-    "policyType": "distance_to_location",
-    "applicableResources": "any"
+    "properties": {
+      "scope": [
+        "OSDF_FRANKFURT" 
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vG"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
+      "identity": "distance-vG",
+      "applicableResources": "any",
+      "distanceProperties": {
+        "locationInfo": "customer_loc",
+        "distance": {
+          "value": "1500",
+          "operator": "<",
+          "unit": "km"
+        }
+      }
+    }
   }
 }
index 9b062b0..62b024c 100644 (file)
@@ -1,15 +1,30 @@
 {
-    "service": "optimizationPolicy",
-    "policyName": "OSDF_DUBLIN.Placement_Optimization_1",
-    "description": "Placement Optimization Policy for vGMuxInfra",
-    "templateVersion": "OpenSource.version.1",
-    "version": "test1",
-    "priority": "5",
-    "riskType": "test",
-    "riskLevel": "3",
-    "guard": "False",
-    "content": {
-        "objectiveParameter": {
+  "OSDF_FRANKFURT.Placement_optimization_1": {
+    "type": "onap.policies.optimization.resource.OptimizationPolicy",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.Placement_optimization_1",
+      "policy-version": 1
+    },
+    "properties": {
+      "scope": [
+        "OSDF_FRANKFURT"
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vG",
+        "vGMuxInfra"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
+      "identity": "optimization",
+      "objective": "minimize",
+      "objectiveParameter": {
             "parameterAttributes": [
                 {
                     "resources": ["vGMuxInfra"],
                 }
             ],
             "operator": "sum"
-        },
-        "identity": "optimization",
-        "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"],
-        "policyType": "placement_optimization",
-        "objective": "minimize"
+        }
     }
+  }
 }
index 5097964..3bcc67e 100644 (file)
@@ -1,21 +1,38 @@
 {
-  "service": "queryPolicy",
-  "policyName": "OSDF_DUBLIN.QueryPolicy_vCPE",
-  "description": "Query policy for vCPE",
-  "templateVersion": "OpenSource.version.1",
-  "version": "test1",
-  "priority": "3",
-  "riskType": "test",
-  "riskLevel": "2",
-  "guard": "False",
-  "content": {
-    "queryProperties": [
-      {"attribute":"customerLatitude", "attribute_location": "customerLatitude"},
-      {"attribute":"customerLongitude", "attribute_location": "customerLongitude"}
-    ],
-    "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"],
-    "policyType": "request_param_query",
-    "serviceName": "vCPE",
-    "identity": "vCPE_Query_Policy"
+  "OSDF_FRANKFURT.queryPolicy_vCPE": {
+    "type": "onap.policies.optimization.service.QueryPolicy",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.queryPolicy_vCPE",
+      "policy-version": 1
+    },
+    "properties": {
+      "scope": [
+        "OSDF_FRANKFURT"
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vGMuxInfra",
+        "vG"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
+      "identity": "vCPE_Query_Policy",
+      "queryProperties": [
+        {
+          "attribute": "customerLatitude",
+          "attribute_location": "customerLatitude"
+        },
+        {
+          "attribute": "customerLongitude",
+          "attribute_location": "customerLongitude"
+        }
+      ]
+    }
   }
 }
index e398f39..3d9f4ca 100644 (file)
@@ -1,24 +1,55 @@
 {
-  "service": "queryPolicy",
-  "policyName": "OSDF_DUBLIN.queryPolicy_vCPE",
-  "description": "Query policy for vCPE",
-  "templateVersion": "OpenSource.version.1",
-  "version": "test1",
-  "priority": "3",
-  "riskType": "test",
-  "riskLevel": "2",
-  "guard": "False",
-  "content": {
-    "queryProperties": [
-      {"attribute":"locationId", "attribute_location": "customerLocation", "value": ""},
-      {"attribute":"id", "attribute_location": "vpnInfo.vpnId", "value": ""},
-      {"attribute":"upstreamBW", "attribute_location": "vpnInfo.upstreamBW", "value": ""},
-      {"attribute":"customerLatitude", "attribute_location": "customerLatitude", "value": 1.1},
-      {"attribute":"customerLongitude", "attribute_location": "customerLongitude", "value": 2.2}
-    ],
-    "serviceName": "vCPE",
-    "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"],
-    "policyType": "request_param_query",
-    "identity": "vCPE_Query_Policy"
+  "OSDF_FRANKFURT.queryPolicy_vCPE": {
+    "type": "onap.policies.optimization.service.QueryPolicy",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.queryPolicy_vCPE",
+      "policy-version": 1
+    },
+    "properties": {
+      "scope": [
+        "OSDF_FRANKFURT"
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vGMuxInfra",
+        "vG"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
+      "identity": "vCPE_Query_Policy",
+      "queryProperties": [
+        {
+          "attribute": "locationId",
+          "attribute_location": "customerLocation",
+          "value": ""
+        },
+        {
+          "attribute": "id",
+          "attribute_location": "vpnInfo.vpnId",
+          "value": ""
+        },
+        {
+          "attribute": "upstreamBW",
+          "attribute_location": "vpnInfo.upstreamBW",
+          "value": ""
+        },
+        {
+          "attribute": "customerLatitude",
+          "attribute_location": "customerLatitude",
+          "value": 1.1
+        },
+        {
+          "attribute": "customerLongitude",
+          "attribute_location": "customerLongitude",
+          "value": 2.2
+        }
+      ]
+    }
   }
 }
index 690f5dc..b6317f8 100644 (file)
@@ -1,18 +1,27 @@
 {
-    "service": "hpaPolicy",
-    "policyName": "OSDF_DUBLIN.hpa_policy_vGMuxInfra_1",
-    "description": "HPA policy for vGMuxInfra",
-    "templateVersion": "OpenSource.version.1",
-    "version": "test1",
-    "priority": "3",
-    "riskType": "test",
-    "riskLevel": "2",
-    "guard": "False",
-    "content": {
-      "resources": ["vGMuxInfra"],
+  "OSDF_FRANKFURT.hpa_policy_vGMuxInfra_1": {
+    "type": "onap.policies.optimization.resource.HpaPolicy",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.hpa_policy_vGMuxInfra_1",
+      "policy-version": 1
+    },
+    "properties": {
+      "scope": [
+        "OSDF_FRANKFURT" 
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vGMuxInfra"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
       "identity": "hpa-vGMuxInfra",
-      "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"],
-      "policyType": "hpa",
       "flavorFeatures": [
         {
           "id": "vgmux_1",
@@ -28,8 +37,8 @@
               ]
             }
           ],
-          "flavorProperties":[
-            {
+          "flavorProperties": [
+           {  
               "hpa-feature" : "cpuTopology",
               "mandatory" : "True",
               "architecture": "generic",
                 {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "8", "operator":"<=", "unit": ""}
               ]
             },
-            {
-              "hpa-feature" : "basicCapabilities",
-              "mandatory" : "True",
+           {
+              "hpa-feature": "basicCapabilities",
+              "mandatory": true,
               "architecture": "generic",
               "directives": [],
               "hpa-feature-attributes": [
-                {"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": ""},
-                {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"}
+                {
+                  "hpa-attribute-key": "numVirtualCpu",
+                  "hpa-attribute-value": 6,
+                  "operator": [
+                    "="
+                  ],
+                  "unit": ""
+                },
+                {
+                  "hpa-attribute-key": "virtualMemSize",
+                  "hpa-attribute-value": 6,
+                  "operator": [
+                    "="
+                  ],
+                  "unit": ""
+                }
               ]
             },
             {
-              "hpa-feature" : "ovsDpdk",
-              "mandatory" : "False",
-              "score" : "3",
+              "hpa-feature": "ovsDpdk",
+              "mandatory": false,
+              "score": 3,
               "architecture": "generic",
               "directives": [],
               "hpa-feature-attributes": [
-                 {"hpa-attribute-key":"dataProcessingAccelerationLibrary", "hpa-attribute-value":"ovsDpdk_version", "operator": "=", "unit":""}
+                {
+                  "hpa-attribute-key": "dataProcessingAccelerationLibrary",
+                  "hpa-attribute-value": "ovsDpdk_version",
+                  "operator": [
+                    "="
+                  ],
+                  "unit": ""
+                }
               ]
             },
             {
-              "hpa-feature" : "cpuInstructionSetExtensions",
-              "mandatory" : "True",
+              "hpa-feature": "cpuInstructionSetExtensions",
+              "mandatory": true,
               "architecture": "INTEL-64",
               "directives": [],
               "hpa-feature-attributes": [
-                {"hpa-attribute-key":"instructionSetExtensions", "hpa-attribute-value":["<CPUINST>", "<CPUINST>"], "operator": "ALL", "unit":""}
+                {
+                  "hpa-attribute-key": "instructionSetExtensions",
+                  "hpa-attribute-value": [
+                    "<CPUINST>",
+                    "<CPUINST>"
+                  ],
+                  "operator": [
+                    "ALL"
+                  ],
+                  "unit": ""
+                }
               ]
             }
           ]
                 {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "<CPUPOLICY>","operator": "=", "unit":""}
               ]
             },
           {
+ {
               "hpa-feature" : "basicCapabilities",
               "mandatory" : "True",
               "architecture": "generic",
               ]
             },
             {
-              "hpa-feature" : "pcie",
+              "hpa-feature" : "pciePassthrough",
               "mandatory" : "True",
               "architecture": "generic",
               "directives": [],
               "hpa-feature-attributes": [
                 {"hpa-attribute-key": "pciCount", "hpa-attribute-value": "2", "operator": "=", "unit": ""},
                 {"hpa-attribute-key": "pciVendorId", "hpa-attribute-value":"8086", "operator": "=", "unit": ""},
-                {"hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "2", "operator": "=", "unit": ""},
-                {"hpa-attribute-key": "functionType", "hpa-attribute-value": "<PCITYPEVALUE>","operator": "=", "unit": ""}
+                {"hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "2", "operator": "=", "unit": ""}
               ]
             }
-          ]
+]
         },
         {
           "id": "vgmux_3",
                 {"hpa-attribute-key": "numaCpu-1", "hpa-attribute-value":"4", "operator": "=", "unit": ""},
                 {"hpa-attribute-key": "numaMem-1", "value": "4096", "operator": "=", "unit": "MB"}
               ]
-            },
+},
             {
               "hpa-feature" : "basicCapabilities",
               "mandatory" : "True",
         }
       ]
     }
+  }
 }
index b29c67d..59ba4b1 100644 (file)
@@ -1,18 +1,27 @@
 {
-    "service": "hpaPolicy",
-    "policyName": "OSDF_DUBLIN.hpa_policy_vG_1",
-    "description": "HPA policy for vG",
-    "templateVersion": "OpenSource.version.1",
-    "version": "test1",
-    "priority": "3",
-    "riskType": "test",
-    "riskLevel": "2",
-    "guard": "False",
-    "content": {
-      "resources": ["vG"],
+  "OSDF_FRANKFURT.hpa_policy_vG_1": {
+    "type": "onap.policies.optimization.resource.HpaPolicy",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.hpa_policy_vG_1",
+      "policy-version": 1
+    },
+    "properties": {
+      "scope": [
+        "OSDF_FRANKFURT" 
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vG"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
       "identity": "hpa-vG",
-      "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"],
-      "policyType": "hpa",
       "flavorFeatures": [
         {
           "id": "vg_1",
@@ -28,8 +37,8 @@
               ]
             }
           ],
-          "flavorProperties":[
-            {
+          "flavorProperties": [
+           {  
               "hpa-feature" : "cpuTopology",
               "mandatory" : "True",
               "architecture": "generic",
                 {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "8", "operator":"<=", "unit": ""}
               ]
             },
-            {
-              "hpa-feature" : "basicCapabilities",
-              "mandatory" : "True",
+           {
+              "hpa-feature": "basicCapabilities",
+              "mandatory": true,
               "architecture": "generic",
               "directives": [],
               "hpa-feature-attributes": [
-                {"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": ""},
-                {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"}
+                {
+                  "hpa-attribute-key": "numVirtualCpu",
+                  "hpa-attribute-value": 6,
+                  "operator": [
+                    "="
+                  ],
+                  "unit": ""
+                },
+                {
+                  "hpa-attribute-key": "virtualMemSize",
+                  "hpa-attribute-value": 6,
+                  "operator": [
+                    "="
+                  ],
+                  "unit": ""
+                }
               ]
             },
             {
-              "hpa-feature" : "ovsDpdk",
-              "mandatory" : "False",
-              "score" : "3",
+              "hpa-feature": "ovsDpdk",
+              "mandatory": false,
+              "score": 3,
               "architecture": "generic",
               "directives": [],
               "hpa-feature-attributes": [
-                 {"hpa-attribute-key":"dataProcessingAccelerationLibrary", "hpa-attribute-value":"ovsDpdk_version", "operator": "=", "unit":""}
+                {
+                  "hpa-attribute-key": "dataProcessingAccelerationLibrary",
+                  "hpa-attribute-value": "ovsDpdk_version",
+                  "operator": [
+                    "="
+                  ],
+                  "unit": ""
+                }
               ]
             },
             {
-              "hpa-feature" : "cpuInstructionSetExtensions",
-              "mandatory" : "True",
+              "hpa-feature": "cpuInstructionSetExtensions",
+              "mandatory": true,
               "architecture": "INTEL-64",
               "directives": [],
               "hpa-feature-attributes": [
-                {"hpa-attribute-key":"instructionSetExtensions", "hpa-attribute-value":["<CPUINST>", "<CPUINST>"], "operator": "ALL", "unit":""}
+                {
+                  "hpa-attribute-key": "instructionSetExtensions",
+                  "hpa-attribute-value": [
+                    "<CPUINST>",
+                    "<CPUINST>"
+                  ],
+                  "operator": [
+                    "ALL"
+                  ],
+                  "unit": ""
+                }
               ]
             }
           ]
                 {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "<CPUPOLICY>","operator": "=", "unit":""}
               ]
             },
           {
+ {
               "hpa-feature" : "basicCapabilities",
               "mandatory" : "True",
               "architecture": "generic",
                 {"hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "2", "operator": "=", "unit": ""}
               ]
             }
-          ]
+]
         },
         {
           "id": "vg_3",
                 {"hpa-attribute-key": "numaCpu-1", "hpa-attribute-value":"4", "operator": "=", "unit": ""},
                 {"hpa-attribute-key": "numaMem-1", "value": "4096", "operator": "=", "unit": "MB"}
               ]
-            },
+},
             {
               "hpa-feature" : "basicCapabilities",
               "mandatory" : "True",
         }
       ]
     }
+  }
 }
index b047686..2dea670 100644 (file)
@@ -1,29 +1,38 @@
 {
-    "service": "vnfPolicy",
-    "policyName": "OSDF_DUBLIN.vnfPolicy_vG",
-    "description": "vnfPolicy",
-    "templateVersion": "OpenSource.version.1",
-    "version": "test1",
-    "priority": "6",
-    "riskType": "test",
-    "riskLevel": "3",
-    "guard": "False",
-    "content": {
-        "identity": "vnf_vG",
-        "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"],
-        "policyType": "vnfPolicy",
-        "resources": ["vG"],
-        "applicableResources": "any",
-           "vnfProperties": [
-            {
-                "inventoryProvider": "aai",
-                "serviceType": "",
-                "inventoryType": "cloud",
-                "customerId": "",
-                "orchestrationStatus": "",
-                "equipmentRole": ""
-
-            }
-        ]
+  "OSDF_FRANKFURT.vnfPolicy_vG": {
+    "type": "onap.policies.optimization.resource.VnfPolicy",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.vnfPolicy_vG",
+      "policy-version": 1
+    },
+    "properties": {
+      "scope": [
+        "OSDF_FRANKFURT"
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vG"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
+      "identity": "vnf_vG",
+      "applicableResources": "any",
+      "vnfProperties": [
+        {
+          "inventoryProvider": "aai",
+          "serviceType": "",
+          "inventoryType": "cloud",
+          "customerId": "",
+          "orchestrationStatus": "",
+          "equipmentRole": ""
+        }
+      ]
     }
+  }
 }
index 45d67f6..65475a9 100644 (file)
@@ -1,28 +1,38 @@
 {
-    "service": "vnfPolicy",
-    "policyName": "OSDF_DUBLIN.vnfPolicy_vGMuxInfra",
-    "description": "vnfPolicy",
-    "templateVersion": "OpenSource.version.1",
-    "version": "test1",
-    "priority": "6",
-    "riskType": "test",
-    "riskLevel": "3",
-    "guard": "False",
-    "content": {
-        "identity": "vnf_vGMuxInfra",
-        "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"],
-        "policyType": "vnfPolicy",
-        "resources": ["vGMuxInfra"],
-        "applicableResources": "any",
-           "vnfProperties": [
-            {
-                "inventoryProvider": "aai",
-                "serviceType": "vGMuxInfra-xx",
-                "inventoryType": "service",
-                "customerId": "SDN-ETHERNET-INTERNET",
-                "orchestrationStatus": "",
-                "equipmentRole": ""
-            }
-        ]
+  "OSDF_FRANKFURT.vnfPolicy_vGMuxInfra": {
+    "type": "onap.policies.optimization.resource.VnfPolicy",
+    "version": "1.0.0",
+    "type_version": "1.0.0",
+    "metadata": {
+      "policy-id": "OSDF_FRANKFURT.vnfPolicy_vGMuxInfra",
+      "policy-version": 1
+    },
+    "properties": {
+      "scope": [
+        "OSDF_FRANKFURT"
+      ],
+      "services": [
+        "vCPE"
+      ],
+      "resources": [
+        "vGMuxInfra"
+      ],
+      "geography": [
+        "US",
+        "INTERNATIONAL"
+      ],
+      "identity": "vnf_vGMuxInfra",
+      "applicableResources": "any",
+      "vnfProperties": [
+        {
+          "inventoryProvider": "aai",
+          "serviceType": "vGMuxInfra-xx",
+          "inventoryType": "service",
+          "customerId": "SDN-ETHERNET-INTERNET",
+          "orchestrationStatus": "",
+          "equipmentRole": ""
+        }
+      ]
     }
+  }
 }
diff --git a/tox.ini b/tox.ini
index 8dc20c9..6a5719f 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -26,7 +26,7 @@ deps = -r{toxinidir}/requirements.txt
 source=./apps/,./osdf/,osdfapp.py,./runtime/,solverapp.py
 
 [testenv:pylint]
-whitelist_externals=bash
+allowlist_externals=bash
 commands = bash -c "pylint --reports=y osdf apps runtime| tee pylint.out"
 
 [testenv:py3]
@@ -34,7 +34,7 @@ basepython=python3
 
 [testenv:flake8diff]
 basepython=python3
-whitelist_externals=bash
+allowlist_externals=bash
 deps = hacking>=2.0.0
 commands =
   bash -c "files=$(git diff HEAD^ HEAD --diff-filter=d --name-only | grep -E '(^apps\/|osdf\/|runtime\/)'| grep -E '*\.py$'); if [[ -z $files ]]; then exit 0; else flake8 $files; fi"