aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test/resources/policytypes
AgeCommit message (Collapse)AuthorFilesLines
2020-03-06Removing legacy guard from policy/apiRam Krishna Verma2-2/+2
Renamed the guard policy types per this review: https://gerrit.onap.org/r/c/policy/models/+/103127 Issue-ID: POLICY-2243 Change-Id: I35ef95756483c869d374f36d0a1dfe6b588444c7 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-02-13Update API for changes in TOSCA providerliamfallon1-0/+31
Knock on changes and some simplification of the code because the TOSCA provider now does some of the checks that were in API, so those checks are not needed in API any more. Various JUnit fixes. Issue-ID: POLICY-1402 Change-Id: Ic3a08e415c8cce4f2aad4b5da2623e41280c4e66 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-13Added the new versioning validation for policy and policy typeChenfei Gao1-0/+22
The following rules are implemented to validate the version provided in the POST payloads of policies and policy types: 1) If version field is not specified in POST payload, "406 - Not Acceptable" would be returned along with the message "mandantory version field is missing". 2) If the version is not in the DB, we simply insert it. 3) If the version is in the DB, "406 - Not Acceptable" is returned along with the message saying "specified version x.x.x" is already existing and the latest version is x.x.x. It can force the user to create a newer version than the latest one. 4) The same versioning validation is applied to legacy types of policies too so that everything is consistent. Issue-ID: POLICY-2316 Change-Id: I395df0196a9d3073fd1f09060f943aeeb554d277 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-09-05Knock on of changing policy types to mapliamfallon16-962/+0
This review adapts policy-api for the change in the structure of the toasca service template from a list of maps to a plain map. DUplication of policy types and policies removed and policy-models examples used instead. Issue-ID: POLICY-2047 Change-Id: Ie1fdeef79289348005314c5de9b2e37c0c45d786 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-08-30Change scope to listPamela Dragosh1-1/+1
Missed this change in last review. Issue-ID: POLICY-1899 Change-Id: I19c9bd3346b9dd870ca3b62e7a5fb61b468e804b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-08-30Update optimization policy typePamela Dragosh10-287/+66
Per work with Optimization team, identifying common attributes for matchable optimization policies. Fixed TOSCA syntax errors - use map instead of list. Removed identity from PciPolicy, QueryPolicy and OptimizationPolicy. Added example of how vCPE policies now look. Updated the example for HPA Policy based on Ruoyo input. Fixed syntax errors due to JSON conversion. Trailing spaces. Added back in list for applicableResources and required scope attribute for example policies. Issue-ID: POLICY-1899 Change-Id: Ic8ae6db0575fb21fca6103ab2ed015c8524def80 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-05-07Preload legacy operational policy type and guard policy typesChenfei Gao4-0/+89
Includes: a) Add legacy operational policy type and guard policy types into preloading list. b) Fix corresponding junit test failure. Issue-ID: POLICY-1738 Change-Id: I071e898be31e62f47d427094f1e76069fafd0148 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-04-10Modify delete safety net and DB lab setupChenfei Gao1-216/+216
Includes: a) Close db connection using try-with-resource b) Modify delete safety net for policy, policy type and legacy policies c) Modify db persistence d) Modify db setup in bootstrap config e) Add unit tests for providers and endpoints Issue-ID: POLICY-1441 Change-Id: Id89bc361c73380df61df35f01f296e47e936e9cf Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-04-09Modify policy provider to support GET/CREATEChenfei Gao11-2/+664
Modify policy and policy type providers to better support GET/CREATE policy/policy types. Issue-ID: POLICY-1442 Change-Id: I7a513be4f9dbd5b48b85a948e3bda7b6c6ab7ddb Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-04-03Implement policy provider functionsChenfei Gao4-16/+273
Includes: a) Implement policy provider functions b) Implement policy type provider functions c) Implement legacy guard policy provider functions d) Implement legacy operational policy provider functions e) Modify API endpoints to align with provider functions f) Hook up API statistics counter Junit tests for providers and new endpoints will be in next patch/review. Issue-ID: POLICY-1441 Change-Id: I113de95f6e0ea5f5436c072536f5e9a178988e5e Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-03-17Add test policytype and policiesPamela Dragosh2-0/+175
Some example policies for vDNS, vFW and vCPE use cases using DCAE TCA. The .input are the expected REST body from the calling client (eg. CLAMP). While the .output are the expected REST body for the return response from policy. The .tosca.yaml are what the DBAO will look like internally. Upgraded to support policy/model merge. Fixed missing tca_policy field in monitoring policies. Update for policy-id. Issue-ID: POLICY-1273 Change-Id: Ib087b184c3ac9a058fe600c6c8a28cca3a71fbea Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>