aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-03-06Add JUnit test for invalid TOSCA mappings JSONmark.j.leonard10-73/+63
Add a test to improve code coverage. Also tidy up some out of date test code comments and unnecessary structural code. Change-Id: Ib38a3d602bc5ae46d16f3067d1d3e0ba0838c446 Issue-ID: AAI-2212 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2019-03-05Fix checkstyle warnings and formattingmark.j.leonard15-72/+107
Add Javadoc and make cosmetic changes to prevent Checkstyle messages Change-Id: Ibab7be42d6a01b181cdb625b6b34d580658c7046 Issue-ID: AAI-2212 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2019-03-05Move Widget attribute data to the mappings JSONmark.j.leonard45-888/+506
Extend the TOSCA mappings JSON content by adding a set of of Widget types defining the type name and data-delete flag. In this change the set of supported types (defined by an enum) remains. However the intention is to replace this in a future commit. The hierarchy of annotated Widget types is replaced by this new configuration, which is accessed from the Widget class. Refactoring has been kept to a minimum to simplify the code review process but further improvements can now be made. Ideally the set of supported Widgets can be extended through configuration changes only. Change-Id: I005cfe6976778b14f14c3ad06d8acf3745c8dd8f Issue-ID: AAI-2212 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2019-03-05AAI-2210 Add .gitignore to aai/babelKeong Lim1-0/+11
Ignore target directory created by babel and other commonly-seen files. Change-Id: Iacb9b4413d3c191e6cfb78f3adb20112ffc32ca5 Issue-ID: AAI-2210 Signed-off-by: Keong Lim <keong.lim@huawei.com>
2019-03-01Add missing INFO.yaml blocksJessica Wagantall1-5/+44
Add missing information so that the new verify job passes. Change-Id: I9f0d4db3459cb790660dfead69dc96acb5271931 Issue-ID: CIMAN-134 Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
2019-02-19Fix outstanding Sonar issuesmark.j.leonard7-61/+83
Change-Id: I9699ee13321f136b4460d5c85d49ab13378f52b4 Issue-ID: AAI-2121 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2019-02-11Rename the groupfilter.config System Propertymark.j.leonard12-54/+115
Rename the System Property to be tosca.mappings.config and default the value to ${CONFIG_HOME}/tosca-mappings.json Update Java code and comments to remove the word "filter" where this is now outdated. Add new JUnit tests for better code coverage. Change-Id: Iaa9685638e099c898894171a958b0d5d51542fde Issue-ID: AAI-2121 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2019-02-11Merge "Fix checkstyle issues including javadoc"Tian Lee13-84/+148
2019-02-06Merge "Optionally disable client authentication"Tian Lee2-1/+5
2019-02-06Optionally disable client authenticationSerban Popescu2-1/+5
based on an env. variable, client authentication can be disabled Change-Id: Ifa3e5d109d0609e0836ddaea2c1183799252ddd3 Issue-ID: AAI-2132 Signed-off-by: Serban Popescu <serban.popescu@amdocs.com>
2019-02-05Fix checkstyle issues including javadocmark.j.leonard13-84/+148
Minor code tidy-ups: mostly formatting and Javadoc comments Change-Id: I8a9ab692428fa09c73bd1fb542100610a86f6eca Issue-ID: AAI-2121 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2019-02-05Replace Resource sub-classes with configurationmark.j.leonard21-579/+442
Delete the sub-classes of the Resource (internal Model class) and replace the annotated properties of these classes with TOSCA-to-Model mappping data loaded from the JSON configuration. Change-Id: I56d5d9d4893be45eb42ae65099ea9abe5f4409b9 Issue-ID: AAI-2121 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2019-01-30Load type mappings from a group configuration filemark.j.leonard20-214/+333
Change the filter-types.properties file: re-implement to use JSON content. Remove the System Property that defines the location of the file and add this to the Spring application properties. Initialise the type-to-model mappings using the key=value pairs from this JSON content. Refactor existing Junit tests to remove duplicated resource loading code. Change-Id: Idb2e962fe5cae39b70cc8cf16053d0a253f4fac0 Issue-ID: AAI-2121 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2019-01-23Do not try to unobfuscate clear text passwordsSerban Popescu1-1/+4
The keystore password does not need to be decrypted if in clear text Change-Id: Ia0d8591e1d5ca6890fcb77295de9573921f6652f Issue-ID: AAI-2072 Signed-off-by: Serban Popescu <serban.popescu@amdocs.com>
2018-12-20Exclude tomcat from jersey starterjimmy1-0/+6
Issue-ID: AAI-2032 Change-Id: I224d1b03f7187f7caac8220154fce3ee1eaffa1a Signed-off-by: jimmy <jf2512@att.com>
2018-12-17Update to springboot 1.5.18jimmy1-1/+1
Change-Id: I69d083b8e1cf574b15dc20b26f2925004e22620a Issue-ID: AAI-2012 Signed-off-by: Jimmy Forsyth <jf2512@att.com>
2018-12-05Add null check for Group member with no A&AI Modelmark.j.leonard1-8/+18
Protect against a Null Pointer Exception when any member of an Instance Group cannot be mapped to an output XML Resource or Widget. Change-Id: Icf099686681b8dffb86e9f003bd92ace6e8679b1 Issue-ID: AAI-1991 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-12-05Throw an Exception for XML test file mismatchesmark.j.leonard2-198/+211
Fix a bug that masked differences between expected and actual XML files. This affects JUnit tests only. Change-Id: I72c779c008baa9fba52c09a0751cdd25bdc0e5cc Issue-ID: AAI-1991 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-12-05Compare YML files as Strings, not XMLmark.j.leonard1-30/+21
Simplify the JUnit testing for the YAML file extractor and compare the actual and expected files using Strings (with line endings normalized). Change-Id: Ie78d3506511b4a1d5333c1b0b95a676bbc2ab5e2 Issue-ID: AAI-1991 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-11-30Upgrade to sdc-tosca version 1.4.7mark.j.leonard1-1/+1
Change-Id: I186683ff734747e64a561391ec4314bc716a0cd3 Issue-ID: AAI-1983 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-11-27Process Service-level Instance Groupsmark.j.leonard8-410/+571
Create an InstanceGroup XML model for groups of the Service topology template in the case where there is no Resource model generated. Add a test CSAR file for a Service Proxy (an unsupported type). Assert that the Service is associated with the instance-group Models. Change-Id: If76bf7a1cfb960bc8692f1e136ee85176725915e Issue-ID: AAI-1963 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-11-27Refactor processProvidingService methodmark.j.leonard2-382/+396
Remedy some Java formatting issues and also simplify Providing Service processing code. Change-Id: Ifddc045e6a1fd1280f63065d4f3b6df83251800c Issue-ID: AAI-1884 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-11-27Refactor model generation algorithmmark.j.leonard4-481/+466
Reorganize the Service and Resource Model generation code for readability. Resort methods to put public before private. Rename generateService() to generateAllArtifacts() Reimplement this method such that the NodeTemplate list is iterated once only. This is intended to simplify future changes to the code. Change-Id: Ie0c6003eab99f42945747c6d79827881e05afc87 Issue-ID: AAI-1884 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-11-22Refactor Instance Group processingmark.j.leonard4-699/+732
Minor refactoring and reformatting of Java code using Eclipse. Add private method mergeProperties() to replace duplicated code logic for populating the Group model. Change-Id: I1360bbbf5b065149028a94392dd530af9c9153e8 Issue-ID: AAI-1884 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-11-09Add support for ResourceInstanceGroupmark.j.leonard3-30/+141
Refactor existing code and add a Junit test for the relevant method. Change-Id: I66703f1d2e93173df4676070faf66e289360609a Issue-ID: AAI-1884 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-11-09Minor formatting fixesmark.j.leonard5-4/+0
Non-functional changes addressing whitespace inconsistencies. Change-Id: Ife84f6b04bf8ce0204409d2f3708ab85b3a3caff Issue-ID: AAI-1884 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-11-09Upversion to Spring Boot 1.15.17Lee, Tian (tl5884)1-1/+1
To fix NexusIQ vunerabilities Change-Id: I2ce3dd403292297e1a86c6a8df853d72ad42ec7d Issue-ID: AAI-1897 Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
2018-11-08Add a CSAR test file containing an InstanceGroupmark.j.leonard7-6/+208
Add a test CSAR file to ensure that the ArtifactGeneratorToscaParser method processInstanceGroup() is covered, prior to refactoring. Change-Id: I277b6721c8a406631d54716aa68b313b1937e5cf Issue-ID: AAI-1884 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-11-07Upgrade Babel to sdc-tosca 1.4.6mark.j.leonard2-2/+3
Change-Id: I53863aabd02050606605f2e905186b01232a77c9 Issue-ID: AAI-1771 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-11-06Upversion to 1.4.0Lee, Tian (tl5884)2-4/+4
Change-Id: I14455a57732ad27f3934628587f8b26c7ababa4c Issue-ID: AAI-1848 Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
2018-11-01upversion to 1.3.2sblimkie2-2/+2
Change-Id: Id1036eed42908e80bcf145d5864b5bd530eb84ad Issue-ID: AAI-1814 Signed-off-by: sblimkie <steven.blimkie@amdocs.com>
2018-10-26Do not apply timezone offsets to the test Clock1.3.1mark.j.leonard1-1/+1
Use UTC for the Clock value that is passed to the Info Service as a test, to avoid any Daylight Savings adjustments. Change-Id: Id9cafdae6e63bd5908ffe8f61ca21c617e86b08b Issue-ID: AAI-1766 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-10-24Fix JUnit test for the Info status reportmark.j.leonard1-7/+7
The ZoneOffset was being applied twice, causing the number of hours added to a test Clock to be calculated incorrectly only when Daylight Savings changes were applied during the interval. For example, the status report was showing 4 days 23 hrs instead of 5 days when the clocks had been put back an hour. Change-Id: If6380a8901b2723018dd3a45fcd7df3ffa0168d4 Issue-ID: AAI-1766 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-10-10Upversion to 1.3.1Lee, Tian (tl5884)2-2/+2
Change-Id: I90ed0b13bb83ab9b03d873ba03fe5521eae823d4 Issue-ID: AAI-1734 Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
2018-10-09Downgrade to sdc-tosca 1.4.41.3.0mark.j.leonard2-2/+2
Release 1.4.5 has a dependency on a SNAPSHOT jar and therefore must not be used. Change-Id: Ibc7a3d8f7f60eb06c01daaacb451fbc9748c4048 Issue-ID: AAI-1445 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-10-09Update to sdc-tosca 1.4.5mark.j.leonard2-4/+3
Update to use a newer release of the SDC TOSCA parser. Change-Id: I8bd3288e000c27c2fbcb5b4b24c3a31cf12bfab8 Issue-ID: AAI-1445 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-10-08Generate models for child resourcesmark.j.leonard3-94/+151
Babel now generates models for immediate children of Resources, non-recursively. Existing functionality is unchanged. Some large methods are refactored to avoid a Cognitive Complexity Sonar code smell. Change-Id: I7ab173a5693f25d0b303dfa97a25106e7e29b5f2 Issue-ID: AAI-1704 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-09-27Remove SNAPSHOT from aai-common dependencyLee, Tian (tl5884)1-1/+1
Change-Id: I1d7daf205735ebb810fdb3e2cda92c982c464f49 Issue-ID: AAI-1686 Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
2018-09-12Fix spring-boot plugin missing system parameterLee, Tian (tl5884)1-0/+1
Fix issue where if Babel was started using the Spring Boot maven plugin, it would not function correctly as a required system parameter is not set. Change-Id: I7778786fc03880aba5815d2d04cd7f91f3b641b2 Issue-ID: AAI-1579 Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
2018-09-12Fix NexusIQ security vulnerabilitiesLee, Tian (tl5884)1-11/+2
- Update oparent version to 1.2.0 - Remove explicit Guava dependency (not used) - Update commons-compress version to latest (1.18) Change-Id: Ic76e7ee7634fa8f410583a9019c59b86f1f180b4 Issue-ID: AAI-1291 Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
2018-09-12[Babel] Use Spring Boot 1.5.15mark.j.leonard1-1/+1
Upgrade from 1.5.14 to avoid known vulnerabilities. Change-Id: I83e1b4a62da8312e1785bd6954f9b2644f65bdaa Issue-ID: AAI-1508 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-09-11Improved logging for VNF image extractionmark.j.leonard5-70/+142
Changes to logging messages to help with debugging issues. Improved Javadoc comments. Issue-ID: AAI-1242 Change-Id: I255eeb774b791a9653fdd0274367801245be6bbd Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-09-10Add support for InstanceGroup resource modelsmark.j.leonard16-69/+323
Generate models for Instance Groups (for specific supported types). Process groups with a metadata type of CR or Configuration. Add InstanceGroup Widget to the supported Widgets. Add support for a group filter properties resource/file (with the single property key "AAI.instance-group-types" which provides a comma-separated list of supported types). Add the System Propery groupfilter.config to define the file path. Change-Id: I6153e6284965c57ae43291b1dc3ee4a1d11e6583 Issue-ID: AAI-1579 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-09-10Simplify input CSAR test datamark.j.leonard4-1/+1
Remove unnecessary data from the test input files. Only the TOSCA YAML content is needed for testing Babel functionality. Change-Id: I25a459f70a0ea6adb64aa87965044b63e2eeb273 Issue-ID: AAI-1250 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-09-06Additional tests for VNF image extractionmark.j.leonard6-8/+201
New tests for extracting software versions. Change-Id: I26a9d654d03154a1d026741e623c8f953946a5f4 Issue-ID: AAI-1250 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-09-06Refactor Junit test code to remove duplicationmark.j.leonard9-126/+185
Simplify the code by introducing an Enum to store each of the test input CSAR files. Add common functionality to this Enum class. Change-Id: I3c44d7ec3b7808a193b8918c43cf0a9eb5369533 Issue-ID: AAI-1250 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-09-06Merge "Replace test UUIDs with dummy strings"Tian Lee9-215/+212
2018-09-06Merge "Additional VNF Configuration test scenarios"Tian Lee4-8/+44
2018-09-06Replace test UUIDs with dummy stringsmark.j.leonard9-215/+212
To simplify debugging and manual inspection of XML output files, use meaningful strings in place of UUIDs in the Junit test properties. Change-Id: If6721685d36c3959c946bd57a0872cbb1ce188ec Issue-ID: AAI-1250 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-08-17Merge "Fixing the achtype variable name"Tian Lee1-1/+1