-
Bug
-
Resolution: Done
-
High
-
Casablanca Release
-
None
-
None
running below cmd could easy reproduce it:
curl -k -v -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{"configBody":"{\"service\":\"hpaPolicy\",\"description\":\"OOF Policy\",\"version\":\"CSIT\",\"priority\":\"5\",\"riskType\":\"Test\",\"riskLevel\":\"2\",\"guard\":\"false\",\"content\":{\"resources\":null,\"identity\":null,\"policyScope\":[],\"policyType\":\"Optimization\",\"flavorFeatures\":[{\"id\":\"vdu_vnf_2\",\"type\":\"tosca.node.nfv.Vdu.Compute\",\"directives\":[{\"type\":\"flavor_directive\",\"attributes\":[
]}],\"flavorProperties\":[{\"hpa-feature\":\"BasicCapabilities\",\"mandatory\":\"true\",\"architecture\":\"generic\",\"hpa-version\":\"v1\",\"directives\":[\"test1\"],\"hpa-feature-attributes\":[
{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"4096\",\"operator\":\"\",\"unit\":\"MB\"}]},{\"hpa-feature\":\"BasicCapabilities\",\"mandatory\":\"true\",\"architecture\":\"generic\",\"hpa-version\":\"v1\",\"directives\":[\"test1\"],\"hpa-feature-attributes\":[
{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"2\",\"operator\":\"\",\"unit\":\"\"}]}]}]}}",
"policyConfigType": "Optimization",
"policyName": "Test.HPA1016v4",
"onapName": "OOF"
}' 'https://localhost:8081/pdp/api/createPolicy'
the error log info from pdp:
2018-10-16T14:23:40.224+00:00|8b586695-ef01-4fda-b9c1-d5bba350183c|http-nio-8081-exec-7|POLICY|||||POLICY-515E||POLICY-515E ERROR: Exception Occured during Policy Validationjava.lang.NullPointerException
2018-10-16T14:23:40.224+00:00|8b586695-ef01-4fda-b9c1-d5bba350183c|http-nio-8081-exec-7|POLICY|||||POLICY-515E||POLICY-515E ERROR: PE300 - Data Issue: Unknown Error Occured During Policy Validation