summaryrefslogtreecommitdiffstats
path: root/models-tosca
AgeCommit message (Collapse)AuthorFilesLines
2020-02-10Get the tree of parent entities for an entity in a containerliamfallon2-26/+169
Utilityu method to filter out all bit an entity and its parents from a service template entity container. Issue-ID: POLICY-1402 Change-Id: I8c3b4c21b27fd8787cdfde0e1b726646f52c437b Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-07Add data type and policy type reference checkingliamfallon12-125/+311
Full validation including references to policy types and data types added. Unit tests fixed to cope with new stricter validation. Issue-ID: POLICY-1402 Change-Id: I59f37640a99494a53960a54d2fc82cc96861d43b Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-05Add vaidation for entity hierarchiesliamfallon27-149/+498
This change brings in proper hierarchical checks for service templates, making sure that all parents of data types, policy types, and policies must be in place. Issue-ID: POLICY-1402 Change-Id: I61b1b556403f74aeaa092f0d4d6ed19bf6a0b715 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-04Add merge utility for service templatesliamfallon5-31/+413
This utility function allows a TOSCA service template fragment to be merged with an exsiting service template and will be tbe backbone of "create" methods on the API from now on. Issue-ID: POLICY-1402 Change-Id: I3381cb2a1bd30621a639dedc213c546eeb2bf9aa Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-28Merge "Add service template persistence provider"Jorge Hernandez5-8/+309
2020-01-28Add service template persistence providerliamfallon5-8/+309
Persistence needs to be carried out at service template level in order to guarantee consistency of the service template in the database as much as possible. Therefire, service template lelve reading, writing, and delting is required. Issue-ID: POLICY-1402 Change-Id: I5be57c29381bf6ddc87afdbb64ddae66a5ea5e5f Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-20vcpe operational policy tosca compliant jsonjhh1-3/+3
Issue-ID: POLICY-2148 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id8ac0279184e5d063cbff197e47f14745a9ef353 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-01-16Clean up TOSCA provider unit testsliamfallon1-5/+6
SOme outstanding comment on TOSCA provider unit tests cleaned up. Issue-ID: POLICY-2315 Change-Id: I235a5fc9996c81f421f17236afb413df7435de19 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-13Read resource dirs in models prvider unit testsliamfallon2-56/+51
Update the unit tests in models-provider so that we can check that the TOSCA artifact that is read from the database is the same as the TOSCA artifact that is stored. This review does some groundwork for that check. Issue-ID: POLICY-2315 Change-Id: Iabc7b247736b862713585a493752bc254cfe1c3d Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-10Bumped patch version for policy/modelsHOCKLA1-2/+2
Issue-ID: POLICY-1592 Change-Id: Iafc35fe53e28c815a79041f289cb17b6354ceccd Signed-off-by: HOCKLA <ah999m@att.com>
2020-01-10Merge "Added new policy examples to support integration of new version ↵Liam Fallon1-11/+1
validation feature"
2020-01-10Added new policy examples to support integration of new version validation ↵Chenfei Gao1-11/+1
feature Issue-ID: POLICY-2316 Change-Id: Ifcb6739c7dd6c5796067a4b9e2f3eef960e1ace4 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2020-01-10Fix policy-models to support data type propertiesliamfallon4-24/+26
Data type properties are not being stored correctly into the database when MariaDB is used (it worked fine in unit tests in H2). Issue-ID: POLICY-2315 Change-Id: Ia901a070292b338154f3766f5fc7b91d656038df Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-08Update tosca utils to remove code duplicationliamfallon2-63/+80
Refactored the ToscaUtils class to remove code duplication. Issue-ID: POLICY-2315 Change-Id: Ic06a0881d1797dbb3c45ae1903a150fbda421e72 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-08Store and return data types for policiesliamfallon5-25/+238
In this change, the data types of policy types are persisted to the database. All policy types currently in the database are returned on all policy type get requests. This will be made more intelligent in the next review. Issue-ID: POLICY-2315 Change-Id: I10065ab9b90e72114a453494fc706d8aabc50c0a Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-07Support persistence of data typesliamfallon10-213/+471
Data types must be persisted to the database in order for them to be retrieved in policy type queries and later for policy validation. Issue-ID: POLICY-2315 Change-Id: Iacb88501a597aeee8f6d8bcc3d9604c13dc09090 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-12-11Merge "Fix minor checksyle issues in models"Pamela Dragosh2-5/+6
2019-12-10Update optimization policiesPamela Dragosh1-16/+16
These policies need to be updated. Issue-ID: POLICY-2066 Change-Id: Idc15aa36f4295477b37aa6398920853436909751 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-12-10Fix minor checksyle issues in modelsliamfallon2-5/+6
New checkstyle profile flagged some minor issues in policy models. Issue-ID: POLICY-2165 Change-Id: I17ed070a3d55601ad31e48fdfd29fff01d29fa42 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-12-07Refactor optimization policiesPamela Dragosh2-27/+57
Optimization policies need to be further refactored so that Resource vs Service type policies can be specified. Issue-ID: POLICY-2066 Change-Id: Ia40a947097692ea7dcc6ea8d13eb8669c37fac14 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-12-05Add new Operational Policy TypePamela Dragosh1-5/+9
New operational policy type for Frankfurt. Updating examples. added sample CLAMP metadata. Issue-ID: POLICY-2217 Change-Id: I941c3a4187a4d164bf793ef2d82c34fccc1a2c35 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-21Update optimization policies to have versionPamela Dragosh3-8/+38
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-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-10Bump versions for models masterJim Hahn1-1/+1
Change-Id: I351d1a0ebd3c7cfa76d57297ce44ef6a6fa8c753 Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-09Add metadata to propertiesPamela Dragosh4-0/+260
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-05Repair policy types in TOSCA service templateliamfallon6-56/+115
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-08-27Replace copyTo methods with copy constructorsJim Hahn24-348/+91
Deleted the copyTo() method from PfConcepts and replaced uses with deep-copy constructors. Also added mapMap() and makeCopy() methods to PfUtils to facilitate. Change-Id: Id6391bb806ef0dfab6c1089278bf2b514c7e303e Issue-ID: POLICY-1600 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-07replace hashCode function with compareToHenry.Sun13-13/+13
Issue-ID: POLICY-1600 Change-Id: If660cbe84424e492b6db3ab11ef97b37f046b3aa Signed-off-by: Henry.Sun <henry.a.sun@est.tech>
2019-08-06Bump version in policy/modelsJim Hahn1-1/+1
Change-Id: Ie8761ccbd05edc80af51e0ae5e8c90a4dfaf7715 Issue-ID: POLICY-1965 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-05Bump versions to 2.1.2jhh1-1/+1
self-release process need to generate partial releases with some jars missing. Workaround is to bump versions an additional patch number. Issue-ID: POLICY-1953 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I4b8fa38f082d8f06c7fe56a26f8c55db91cd1d9e Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-06-27Use ToStringTester from utils-testramverma3-3/+5
Changing ToStringTester from utils to utils-test Bump up common to 1.5.1-SNAPSHOT Change-Id: I7427673c73bd1cc52d5f24a0542e89eb33a39ae8 Issue-ID: POLICY-1746 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-06-21Bump models to 2.1.1 SNAPSHOTPamela Dragosh1-1/+1
Released 2.1.0 Issue-ID: POLICY-1737 Change-Id: I2bc12dd4a9cdad7a867e3d710bb427493de6c7f4 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-06-19Merge "Change getCanonicalName to getName in models"Pamela Dragosh6-6/+6
2019-06-18Change getCanonicalName to getName in modelsJim Hahn6-6/+6
Per javadocs, getName() should generally be used instead of Class.getCanonicalName(). This change only applies to classes; it does not apply to File objects. Note: this impacts the output from PfValidationMessage, as it will now list the names of embedded classes with a "$" separator instead of a ".". Change-Id: I2cd64bc0281dd324bf80eac57335a7299a516447 Issue-ID: POLICY-1646 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-18Removed unused imports from modelsJim Hahn1-3/+0
Change-Id: I1f64127e1d783a962304c0add1524a57d6c24e4b Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-18Merge "Fix the bug of cannot return multiple versions of particular tosca ↵Pamela Dragosh2-5/+7
policy and policy type"
2019-06-17Fix the bug of cannot return multiple versions of particular tosca policy ↵Chenfei Gao2-5/+7
and policy type Issue-ID: POLICY-1807 Change-Id: I831c720993930a911d301a82b59a74cda7cb0c50 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-06-17Fix simple sonar issues in models-toscaJim Hahn33-1088/+787
Change-Id: I36a91fbbd95df7aff2656a97dd09b778cdbb798f Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-17Merge "Allow multiple versions of entities to be returned"Jorge Hernandez8-9/+146
2019-06-14Allow multiple versions of entities to be returnedliamfallon8-9/+146
Fix .gitreviw file to point at "master" rather than "dublin" Allow return of multiple versions of policy types and data types in TOSCA service templates and multiple policies in TOSCA topology templates. Because the return type is a list of singleton maps, utility methods were added to return flat maps of poliicy types, data types, and policies keyed by a compound ToscaEntityKey name/version key. Issue-ID: POLICY-1807 Change-Id: I355038aaca26f41064d0e3cb3b45b1de2294cf5f Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-06-13Remove isNullVersion from identifier classJim Hahn2-15/+0
ToscaPolicyIdentifierOptVersion had an isNullVersion() method which is not being used. Removed this version, thus eliminating the need to include a jackson @JsonIgnore annotation. Change-Id: I03309099a1173591736f69b82b549ebce7994169 Issue-ID: POLICY-1653 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-07Fix version field to represent policy version instead of type versionChenfei Gao2-11/+16
Added changes to make version field in return of GET guard policy call represent the version of guard policy instead of its type version. Issue-ID: POLICY-1809 Change-Id: Ie8db6e89d8439576ee5f6ee99c3222386775b195 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-05-29Change version to 2.1.0Pamela Dragosh1-1/+1
Bump for El Alto Issue-ID: POLICY-1747 Change-Id: I72ec2583715744e9e6debe84b75d0c1d3ffab997 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-05-23Bump to 2.0.2-SNAPSHOTPamela Dragosh1-1/+1
Released 2.0.1 Issue-ID: POLICY-1700 Change-Id: I0f40470e9a8bfb7f8136d34b65977b1b4c54e10e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-05-23Add logging to model providersliamfallon3-27/+166
Issue-ID: POLICY-1777 Change-Id: I67bf56a7848bbb0495d9e8c215b665fde5c67f1d Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-05-22Fix name/version regexp in model keysliamfallon2-4/+4
The regular expressions for checking names and versions in policy key names and versions were not expressive enough to restrict all error names and versions. Issue-ID: POLICY-1777 Change-Id: I037eca051f6c7a9f1e7182150d40d8b8d906a75c Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-05-21Add version on legacy get/deleteliamfallon4-147/+190
Issue-ID: POLICY-1777 Change-Id: I5b07ad1acdb4a614a50cb15978130c19bc5786f7 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-05-16Allow policy type prefix on policy guard policy idliamfallon2-5/+49
In order to identify the policy type of a guard policy, we need to have the first part of the policy id as the policy type identifier prefix. Issue-ID: POLICY-1776 Change-Id: I1d6a3c4b122d978ff7ef40ce76ced7f160ebd4fa Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-05-15Step snapshot version of policy modelsliamfallon1-1/+1
Issue-ID: POLICY-1630 Change-Id: I163b4566030f9beebdbb546814b1a7a777ce1205 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-05-14Remove sonar issue in simple providerliamfallon1-6/+7
Issue-ID: POLICY-1738 Change-Id: Id85d710154727c7c535db7cc50af88f52114a358 Signed-off-by: liamfallon <liam.fallon@est.tech>