aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test/resources/policies
AgeCommit message (Collapse)AuthorFilesLines
2020-08-19Updates tests for new tcagen2 policy typePamela Dragosh2-4/+4
Forgot to include these. Once models got merged api failed. Issue-ID: POLICY-2772 Change-Id: Iae64effcba71ecbfbf6ab253de91842a9271c207 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-06-15Removing duplicate yamls and jsonsaditya.puthuparambil2-370/+0
Issue-ID: POLICY-2052 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech> Change-Id: Ib4125baa1415cdc7f8a34fabc21fa322bc9b82a1
2020-03-06Removing legacy guard from policy/apiRam Krishna Verma11-52/+8
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-18Add changes for safe delete in policy-modelsliamfallon1-1/+1
Issue-ID: POLICY-1402 Change-Id: I3f97fbb4c11105118857d354970d6a3de1385f2d Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-13Update API for changes in TOSCA providerliamfallon3-77/+32
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 Gao8-0/+604
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 mapliamfallon29-980/+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-30Update optimization policy typePamela Dragosh1-0/+173
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-21Modify legacy API and policy provider to support version enabled features in ↵Chenfei Gao2-0/+30
legacy db provider Includes: a) Modify legacy API endpoints to retrieve the latest version of legacy policies b) Modify legacy policy providers to support newly added version enabled features in db provider c) Fix corresponding junit test failures Issue-ID: POLICY-1777 Change-Id: I641170b37e2929b5060414832d4b8395493cecdc Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-04-16Preload policy types when api starts upChenfei Gao2-1/+2
Includes: a) Preload monitoring and optimization policy types when api component starts up b) Fix the failure unit testing delete policy type c) Enhance several junit test cases to be irrespective of running orders Issue-ID: POLICY-1441 Change-Id: Ia1ba17d58dfbc9a8ee12e789e3867b20111e9cd2 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-04-11Add junit tests for endpointsChenfei Gao3-82/+89
Add junit tests to improve code coverage to > 80%. Modify db setting and remove db authorization from persistence. Issue-ID: POLICY-1441 Change-Id: I6070ac9ba6adba836adeeb547610c27dccf577bd Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-04-10Modify delete safety net and DB lab setupChenfei Gao2-0/+101
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-03Implement policy provider functionsChenfei Gao1-1/+0
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 Dragosh29-0/+825
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>