summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-11-07Use lombok annotations for objects in models-interaction/models-impl moduleRashmi Pujar90-3219/+466
Issue-ID: POLICY-1896 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: I425afe25876cea91908391418582ef584e6fe6fc
2019-11-05Cleanup up unused actor.test maven moduleRashmi Pujar2-84/+0
Issue-ID: POLICY-1894 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ib662aa6a28beb40c2a1e6814b103e95ebf4ee2e1
2019-11-04Merge "PNF support changes in policy/models"Liam Fallon8-53/+102
2019-11-04PNF support changes in policy/modelsRashmi Pujar8-53/+102
AAI Enrichment method for PNF target-type and unit tests. Addition of a hashmap field to ControlLoopEvent class to hold event specific parameters. Update CDS actor to include additional event parameters Issue-ID: POLICY-1187 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ie0ceb320943531de6e6bc8675844b29a358dfb7e
2019-11-01Add SDNC Naming Policy Type and example policyPamela Dragosh2-0/+149
Will be used to create naming application for XACML PDP. Issue-ID: POLICY-1740 Change-Id: I996537da16bdb386f4bcddd0008055b8ffac417e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-11-01Add common Jersey versionliamfallon2-6/+11
Add a common version of Jersey for all Policy Framework components. Issue-ID: POLICY-2209 Change-Id: Ic1d2ea808bb41156f776d18b875e44de22fbf06b Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-01Merge "Change field names in policy notifications to match wiki"Jorge Hernandez3-9/+36
2019-11-01Fix Checkstyle issues in policy-modelsliamfallon6-19/+11
Some minor checkstyle issues were introduced into policy-models by recent reviews. Issue-ID: POLICY-2088 Change-Id: I84af19926432081d72e2054af788cdc35850a99c Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-31Change field names in policy notifications to match wikiJim Hahn3-9/+36
Field names looked like "policyType.name". Changed them to look like "policy-type", instead, to match the wiki for the notifications to be sent to DCAE. Change-Id: Ib3cef1712fd12a44db8acdcff2245d800b21137a Issue-ID: POLICY-2190 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-30Merge "Changes in preparation for the m2 model (part 2)"Jorge Hernandez3-100/+18
2019-10-30Changes in preparation for the m2 model (part 2)Straubs, Ralph (rs8887)3-100/+18
This change was missed earlier: convert 'ResourceType' to a 'String', so application-specific types can be added. Issue-ID: POLICY-1948 Change-Id: Ie8a35e7fb0746d8c8e3a6db11c09ca31dc4763cc Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
2019-10-29Merge "Refactor Appc LCM Model"Jorge Hernandez32-2235/+630
2019-10-25Refactor Appc LCM ModelDaniel Cruz32-2235/+630
Added model classes for APPC LCM Input and APPC LCM Output and removed adding the input/output tag to the JSON via the APPC LCM custom serializer. Issue-ID: POLICY-2043 Signed-off-by: Daniel Cruz <dc443y@att.com> Change-Id: I54e1b5f589a4b29357cf1a45dbdf2173610870ce
2019-10-25Merge "Changes in preparation for the m2 model"Jim Hahn10-323/+171
2019-10-24Changes in preparation for the m2 modelStraubs, Ralph (rs8887)10-323/+171
1) Replace enum 'ControlLoopTargetType' with 'String' -- symbols such as 'ControlLoopTargetType.VM' still work, but now expand into a String. This gives the ability to add new application-specific types. 2) Move 'ControlLoopEvent.payload' to 'VirtualControlLoopEvent'. This symbol isn't common to all 'ControlLoopEvent' types, and this definition collides with a 'payload' defined in our application. 3) Add 'RestManager.patch(...)', which performs a REST patch. 4) Add lombok getters and setters 5) Remove trailing spaces 6) Fix order of arguments in 'assertEquals' in 'ControlLoopTargetTypeTest' 7) Update Junit tests in 'RestTest' to include 'RestManager.patch(...)' Issue-ID: POLICY-1948 Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com> Change-Id: I08e04ea3cbcf368c760b630bcfe23a4370cf94dc
2019-10-24Changed the serialized name of policy notificationsJim Hahn1-1/+1
Changed the serialized name of the policy identifier from "policy" to "policy-id". Change-Id: I7188b65428728b65fef38c70e9fae99202ab0eea Issue-ID: POLICY-1841 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-24Merge "Flatten the CDS grpc request payload"Liam Fallon5-66/+146
2019-10-23Flatten the CDS grpc request payloadRashmi Pujar5-66/+146
Before: { "vfw-modify-config-request":{ "resolution-key":"1234567890", "aai-properties":{ "service-instance.service-instance-id":"1234", "generic-vnf.vnf-id":"5678" }, "policy-payload":{ "data":"{\"active-streams\":\"5\"}" } } } After: { "vfw-modify-config-request":{ "resolution-key":"1234567890", "vfw-modify-config-properties":{ "service-instance.service-instance-id":"1234", "generic-vnf.vnf-id":"5678", "data":"{\"active-streams\":\"5\"}" } } } Issue-ID: POLICY-2089 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: I139a7ca3e1e2d0cd50bbd86d0cdf499f215be74f
2019-10-21Update optimization policies to have versionPamela Dragosh12-8/+47
These should be version 1.0.0. Add in a no version test. Issue-ID: POLICY-2066 Change-Id: Ie113c02c37e95b86dbb31247bf7a9fda09f724b1 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-18Merge "Add PolicyNotification.isEmpty() method"Liam Fallon2-0/+22
2019-10-17Add PolicyNotification.isEmpty() methodJim Hahn2-0/+22
Change-Id: I5cf5f21b968975018bd1f18daa1653289b837d2e Issue-ID: POLICY-1841 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-17Remove the CDS blueprint name and version from its payload.Rashmi Pujar2-3/+8
This information is redundant since it is included in the request header. Found during integration testing Issue-ID: POLICY-2089 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Icdb4753ccae687f85318f5efeed09d5e13a6853b
2019-10-15Merge "Remove actor and recipe checks from ControlLoopCompiler.java"Jorge Hernandez3-62/+20
2019-10-15Remove actor and recipe checks from ControlLoopCompiler.javadg57623-62/+20
Remove actor and recipe checks from ControlLoopCompiler.java and adjusted associated JUNIT tests for the changes that were implented. Removed some redundant variables, replaced null check in actor/recipe with blank string, which checks for null as well as empty/blank strings. drools-applications still builds correctly. Issue-ID: POLICY-2128 Change-Id: I83d9e3b1152d87c9c8d2c90586300aebdd53b8e2 Signed-off-by: dg5762 <dg5762@att.com>
2019-10-15Add PAP Policy Notification classesJim Hahn4-0/+229
Added classes that PAP will use to publish to DMaaP to indicate policy status changes (i.e., added/removed from PDPs). Modified serialized name of the policy identified to match other uses (e.g., PAP REST API calls). Added policy type, per review comments. Change-Id: I66131fa9ae0b63081f239e7f402b7fea65c434a5 Issue-ID: POLICY-1841 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-15Fix remaining fixable Sonar issues on policy modelsliamfallon3-26/+27
This patch fixes the remaining easy to fix Sonar issues on policy models. The remaining issues are - methods that do not follow Java naming conventions and fixing those will probably break policies that use those methods - TODO statements to do with functionality we didn't get done in Dublin and will address in Frankfurt Issue-ID: POLICY-2165 Change-Id: I7f604bc2335388bdc0dd9286ae17a5ab76517665 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-14Clean up minor things in policy-modelsliamfallon9-118/+139
Cleam up of some minor eclipse, checkstyle, and Sonar issues in policy-models Issue-ID: POLICY-2165 Change-Id: Id5682fd60e1a6cebbf716d9c258453aa53ca2482 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-14Merge "Clean up SONAR issues in CDS actor"Liam Fallon1-1/+4
2019-10-11Fix dmaap simulator junitJim Hahn1-49/+42
Modified the code to leave the topics open through-out the test cases, and simply clear the queues between each test case. Hopefully that will fix the EndToEndTest junit in the dmaap simulator. Change-Id: I3658df4dbc70cd47fec1cfb84c7a2365133105ff Issue-ID: POLICY-2144 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-11Clean up SONAR issues in CDS actorliamfallon1-1/+4
Issue-ID: POLICY-2165 Change-Id: I2ccfb32193c85958d525af19a7744a74c97a3485 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-10Merge "Added new policy example to support junit test for new simplified API"Jorge Hernandez2-43/+234
2019-10-09Added new policy example to support junit test for new simplified APIChenfei Gao2-43/+234
Issue-ID: POLICY-1991 Change-Id: Ib52bffe7895dc0625c77da7aa954bb71ed16187d Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-10-09Added ModelType to SO Req.pramod.jamkhedkar1-0/+1
Added ModelType to SO Request and set it to vfModule Issue-ID: POLICY-2156 Change-Id: Icfd824ff1f521ec32a711506d01283566d2a7ed9 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2019-10-08Correct the CDS basic auth header in the requestRashmi Pujar2-3/+5
Issue-ID: POLICY-2088 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ibcdfdbd1de66fcf193e52fcc14a1220c7520f140
2019-10-07Merge "Flesh out DMaaP simulator"Pamela Dragosh41-416/+2972
2019-10-07Flesh out DMaaP simulatorJim Hahn41-416/+2972
Fleshed out the dmaap simulator with additional media types. Added more junit tests. Added buildDmaapSim() to simulators Util. Change-Id: I39acd3df8e8d0ded21228e56fa1ef919cafc3772 Issue-ID: POLICY-2144 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-07Changes in model to integrate cds actorBruno Sakoto4-24/+82
* Create class for CDS response Issue-ID: POLICY-2088 Change-Id: I813a310f7d5123fac4bb1c3880d108391096250f Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
2019-10-01Update CDS grpc request generation in CDS Actor service providerRashmi Pujar3-11/+33
- CDS payload requires resolution-key (random UUID) - Update the CDS request object to rename the payload child node key name from config-deploy-properties to policy-payload. - Generate dynamic childnode key name from the policy recipe-name aka CDS action-name. action-name itself is never included in serialization as is. Below is a sample: { "commonHeader": { "subRequestId": "$subReqId", "requestId": "$reqId", "originatorId": "POLICY" }, "actionIdentifiers": { "mode": "sync", "blueprintName": "$bpName", "blueprintVersion": "$bpVer", "actionName": "$recipeName" }, "payload": { "$recipeName-request": { "resolution-key": "{{$guid}}", "aai-properties": { "$key": "$value", ... }, "policy-payload": { "$clamp-payload" } } } } Issue-ID: POLICY-2120 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ia7f0551f94755bbe73b48ae387b4c53842729a81
2019-09-19Change policy/common version in modelsJim Hahn1-1/+1
Junits in policy/api were breaking. Tracked it down to the fact the policy/models was still referencing an old version of policy/common. Change-Id: I1aee40336382741d62cabbcac0f6268d2ceab263 Issue-ID: POLICY-2101 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-11Fix derivedFrom fieldliamfallon1-1/+1
TOSCA does not have a version on derivedFrom fields on policies and policy types. THerefore, we use the default value of 0.0.0 for versions on these fields in the database. When reading back out derivedFrom fields, we need to just take the name of the field and not the ID of the field. Issue-ID: POLICY-2075 Change-Id: I55e9c479047d6c1a9376a1713f4ddb2536476b29 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-09-10Upgrade io.netty : netty-codec-http2 and netty-common to 4.1.39.FinalRashmi Pujar1-1/+19
These insecure dependencies are brought in by io.grpc:grpc-netty:1.17.1. Override the io.netty dependencies and add exclusions where version is mandated. Resulting dependencies in policy/models/models-interactions on master* $ mvn dependency:tree -Dverbose| grep io.netty [INFO] +- io.netty:netty-codec-http2:jar:4.1.39.Final:compile [INFO] | +- io.netty:netty-common:jar:4.1.39.Final:compile [INFO] | +- io.netty:netty-buffer:jar:4.1.39.Final:compile [INFO] | +- io.netty:netty-transport:jar:4.1.39.Final:compile [INFO] | | \- io.netty:netty-resolver:jar:4.1.39.Final:compile [INFO] | +- io.netty:netty-codec:jar:4.1.39.Final:compile [INFO] | +- io.netty:netty-handler:jar:4.1.39.Final:compile [INFO] | \- io.netty:netty-codec-http:jar:4.1.39.Final:compile [INFO] +- io.netty:netty-handler-proxy:jar:4.1.39.Final:compile [INFO] | \- io.netty:netty-codec-socks:jar:4.1.39.Final:compile [INFO] | +- io.netty:netty-codec-http2:jar:4.1.39.Final:provided [INFO] | | +- io.netty:netty-common:jar:4.1.39.Final:provided [INFO] | | +- io.netty:netty-buffer:jar:4.1.39.Final:provided [INFO] | | +- io.netty:netty-transport:jar:4.1.39.Final:provided [INFO] | | | \- io.netty:netty-resolver:jar:4.1.39.Final:provided [INFO] | | +- io.netty:netty-codec:jar:4.1.39.Final:provided [INFO] | | +- io.netty:netty-handler:jar:4.1.39.Final:provided [INFO] | | \- io.netty:netty-codec-http:jar:4.1.39.Final:provided [INFO] | +- io.netty:netty-handler-proxy:jar:4.1.39.Final:provided [INFO] | | \- io.netty:netty-codec-socks:jar:4.1.39.Final:provided Issue-ID: POLICY-2072 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ib3706e1c67e33fe73ebbfc80a6b474021b4a2679
2019-09-10Bump versions for models masterJim Hahn39-40/+40
Change-Id: I351d1a0ebd3c7cfa76d57297ce44ef6a6fa8c753 Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-09Add release yaml file to modelsJim Hahn1-0/+4
Change-Id: I5053071a63c67770986181fe034d7371ac98ddca Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-09Add metadata to propertiesPamela Dragosh5-4/+270
Properties should support metadata - adding it in. Added junit tests for the new metadata field. Issue-ID: POLICY-2060 Change-Id: I2e1933ca4260fe5989f36a098108893a366f657a Signed-off-by: Pamela Dragosh <pdragosh@research.att.com> Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-09Use released versions in models pomJim Hahn1-2/+2
Updated models pom.xml to use released version of parent and common artifacts. Change-Id: I21bf9911d1dcd3ea9cc0f065dc80f65e153da885 Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-06Merge "CDS Actor service-provider implemntation"Pamela Dragosh7-0/+632
2019-09-06CDS Actor service-provider implemntationRashmi Pujar7-0/+632
https://wiki.onap.org/display/DW/CDS+actor+support+in+Policy Issue-ID: POLICY-1763 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Idcb6e9168b949745cc644e97ba77c479573a8bf5
2019-09-05Repair policy types in TOSCA service templateliamfallon26-1200/+1095
Changed policy types from a list of maps to a map. Changed data types from a list of maps to a map. Made all knock on changes to adapters and tests. Updated Issue ID. Added onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml policy type that is required to be preloaded in policy-api. Issue-ID: POLICY-2047 Change-Id: Ic8e809eab248fd7242f0e565fa2e3da75bcfbdeb Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-09-03Merge "Added VFModule count"Pamela Dragosh6-1791/+3669
2019-08-30Added VFModule countpramod.jamkhedkar6-1791/+3669
Added the function VFModuleCount to AaiCqResponse class. It counts the number of vf modules. Also changed the same custom query response in AaiSimulator. Issue-ID: POLICY-1858 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com> Change-Id: If08de84f74d2bd9501b501b881cdd761089614dc