X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=test%2Fpolicy-local-files%2Fold-policies%2Fhpa_policy_vG_1.json;fp=test%2Fpolicy-local-files%2Fold-policies%2Fhpa_policy_vG_1.json;h=b29c67d3dbdff4aa4ed121d720022856aa579cce;hb=fa538d59b8982a48fd58f024a30a59616d43cf81;hp=0000000000000000000000000000000000000000;hpb=fdeaf8b56c8d342ef8145aae15c87525fe105f2a;p=optf%2Fosdf.git diff --git a/test/policy-local-files/old-policies/hpa_policy_vG_1.json b/test/policy-local-files/old-policies/hpa_policy_vG_1.json new file mode 100644 index 0000000..b29c67d --- /dev/null +++ b/test/policy-local-files/old-policies/hpa_policy_vG_1.json @@ -0,0 +1,190 @@ +{ + "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"], + "identity": "hpa-vG", + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"], + "policyType": "hpa", + "flavorFeatures": [ + { + "id": "vg_1", + "type": "vnfc", + "directives": [ + { + "type": "flavor_directives", + "attributes": [ + { + "attribute_name": "flavor_label_vm_01", + "attribute_value": "" + } + ] + } + ], + "flavorProperties":[ + { + "hpa-feature" : "cpuTopology", + "mandatory" : "True", + "architecture": "generic", + "directives": [], + "hpa-feature-attributes": [ + {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value": "2","operator": ">=", "unit": ""}, + {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value": "4","operator": "<=", "unit": ""}, + {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value": "2", "operator":">=", "unit": ""}, + {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value": "4", "operator":"<=", "unit": ""}, + {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "4", "operator":">=", "unit": ""}, + {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "8", "operator":"<=", "unit": ""} + ] + }, + { + "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-feature" : "ovsDpdk", + "mandatory" : "False", + "score" : "3", + "architecture": "generic", + "directives": [], + "hpa-feature-attributes": [ + {"hpa-attribute-key":"dataProcessingAccelerationLibrary", "hpa-attribute-value":"ovsDpdk_version", "operator": "=", "unit":""} + ] + }, + { + "hpa-feature" : "cpuInstructionSetExtensions", + "mandatory" : "True", + "architecture": "INTEL-64", + "directives": [], + "hpa-feature-attributes": [ + {"hpa-attribute-key":"instructionSetExtensions", "hpa-attribute-value":["", ""], "operator": "ALL", "unit":""} + ] + } + ] + }, + { + "id": "vg_2", + "type": "vnfc", + "directives": [ + { + "type": "flavor_directives", + "attributes": [ + { + "attribute_name": "flavor_label_vm_02", + "attribute_value": "" + } + ] + } + ], + "flavorProperties":[ + { + "hpa-feature" : "cpuPinningy", + "mandatory" : "True", + "architecture": "generic", + "directives": [], + "hpa-feature-attributes": [ + {"hpa-attribute-key":"logicalCpuThreadPinningPolicy", "hpa-attribute-value":"", "operator": "=", "unit":""}, + {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "","operator": "=", "unit":""} + ] + }, + { + "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-feature" : "localStorage", + "mandatory" : "False", + "score" : "5", + "architecture": "generic", + "directives": [], + "hpa-feature-attributes": [ + {"hpa-attribute-key": "diskSize", "hpa-attribute-value": "2", "operator": "=", "unit": "GB"}, + {"hpa-attribute-key": "ephemeralDiskSize", "hpa-attribute-value": "2", "operator": "=", "unit": "GB"}, + {"hpa-attribute-key": "swapMemSize", "hpa-attribute-value":"16", "operator": "=", "unit": "MB"} + ] + }, + { + "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": ""} + ] + } + ] + }, + { + "id": "vg_3", + "type": "vnfc", + "directives": [ + { + "type": "flavor_directives", + "attributes": [ + { + "attribute_name": "flavor_label_vm_03", + "attribute_value": "" + } + ] + } + ], + "flavorProperties":[ + { + "hpa-feature" : "numa", + "mandatory" : "False", + "score" : "5", + "architecture": "generic", + "directives": [], + "hpa-feature-attributes": [ + {"hpa-attribute-key": "numaNodes", "hpa-attribute-value": "2", "operator": "=", "unit": ""}, + {"hpa-attribute-key": "numaCpu-0", "hpa-attribute-value":"2", "operator": "=", "unit": ""}, + {"hpa-attribute-key": "numaMem-0", "hpa-attribute-value": "2048", "operator": "=", "unit": "MB"}, + {"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", + "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-feature" : "hugePages", + "mandatory" : "False", + "score" : "7", + "architecture": "generic", + "directives": [], + "hpa-feature-attributes": [ + {"hpa-attribute-key": "memoryPageSize", "hpa-attribute-value": "", "operator": "=", "unit": ""} + ] + } + ] + } + ] + } +}