aai/babel.git
5 years agoRe-implement model type value for Resource Mapping 26/79926/1
mark.j.leonard [Thu, 7 Mar 2019 16:17:06 +0000 (16:17 +0000)]
Re-implement model type value for Resource Mapping

Refactor the Model/Service/Resource/Widget hierarchy to improve code
readability.
Replace the configurable Boolean value for a Resource's model type with
a value from the existing ModelType enum.

Obtain the A&AI XML Model name (always resource or service) directly
from the Model class and not from the configured model type for the
Resource.

Change-Id: I1487d919392b34e4bf1314da8cd2805a9fbf96a3
Issue-ID: AAI-2212
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoRemove redundant methods from codebase 91/79791/1
mark.j.leonard [Wed, 6 Mar 2019 15:58:55 +0000 (15:58 +0000)]
Remove redundant methods from codebase

Delete methods that are never called (or only called from test code)

Issue-ID: AAI-2212
Change-Id: I1554bd76de4a9ac2e3cc05987dac1d04966b9200
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoAdd JUnit test for invalid TOSCA mappings JSON 81/79781/1
mark.j.leonard [Wed, 6 Mar 2019 13:18:43 +0000 (13:18 +0000)]
Add JUnit test for invalid TOSCA mappings JSON

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>
5 years agoFix checkstyle warnings and formatting 21/79721/1
mark.j.leonard [Tue, 5 Mar 2019 16:07:33 +0000 (16:07 +0000)]
Fix checkstyle warnings and formatting

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>
5 years agoMove Widget attribute data to the mappings JSON 04/79704/1
mark.j.leonard [Tue, 5 Mar 2019 12:28:24 +0000 (12:28 +0000)]
Move Widget attribute data to the mappings JSON

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>
5 years agoFix outstanding Sonar issues 75/78775/1
mark.j.leonard [Tue, 19 Feb 2019 19:09:00 +0000 (19:09 +0000)]
Fix outstanding Sonar issues

Change-Id: I9699ee13321f136b4460d5c85d49ab13378f52b4
Issue-ID: AAI-2121
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoRename the groupfilter.config System Property 41/78241/1
mark.j.leonard [Mon, 11 Feb 2019 17:44:17 +0000 (17:44 +0000)]
Rename the groupfilter.config System Property

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>
5 years agoMerge "Fix checkstyle issues including javadoc"
Tian Lee [Mon, 11 Feb 2019 14:00:25 +0000 (14:00 +0000)]
Merge "Fix checkstyle issues including javadoc"

5 years agoMerge "Optionally disable client authentication"
Tian Lee [Wed, 6 Feb 2019 15:20:04 +0000 (15:20 +0000)]
Merge "Optionally disable client authentication"

5 years agoOptionally disable client authentication 05/77905/2
Serban Popescu [Tue, 5 Feb 2019 19:09:00 +0000 (14:09 -0500)]
Optionally disable client authentication

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>
5 years agoFix checkstyle issues including javadoc 88/77888/1
mark.j.leonard [Tue, 5 Feb 2019 15:47:47 +0000 (15:47 +0000)]
Fix checkstyle issues including javadoc

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>
5 years agoReplace Resource sub-classes with configuration 75/77875/1
mark.j.leonard [Tue, 5 Feb 2019 14:24:33 +0000 (14:24 +0000)]
Replace Resource sub-classes with configuration

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>
5 years agoLoad type mappings from a group configuration file 55/77455/2
mark.j.leonard [Mon, 28 Jan 2019 11:42:54 +0000 (11:42 +0000)]
Load type mappings from a group configuration file

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>
5 years agoDo not try to unobfuscate clear text passwords 26/76226/1
Serban Popescu [Wed, 23 Jan 2019 15:58:12 +0000 (10:58 -0500)]
Do not try to unobfuscate clear text passwords

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>
5 years agoExclude tomcat from jersey starter 18/75018/1
jimmy [Thu, 20 Dec 2018 19:47:24 +0000 (14:47 -0500)]
Exclude tomcat from jersey starter

Issue-ID: AAI-2032
Change-Id: I224d1b03f7187f7caac8220154fce3ee1eaffa1a
Signed-off-by: jimmy <jf2512@att.com>
5 years agoUpdate to springboot 1.5.18 52/74752/1
jimmy [Mon, 17 Dec 2018 18:52:03 +0000 (13:52 -0500)]
Update to springboot 1.5.18

Change-Id: I69d083b8e1cf574b15dc20b26f2925004e22620a
Issue-ID: AAI-2012
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
5 years agoAdd null check for Group member with no A&AI Model 92/74292/1
mark.j.leonard [Wed, 5 Dec 2018 18:59:58 +0000 (18:59 +0000)]
Add null check for Group member with no A&AI Model

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>
5 years agoThrow an Exception for XML test file mismatches 87/74287/1
mark.j.leonard [Wed, 5 Dec 2018 18:29:26 +0000 (18:29 +0000)]
Throw an Exception for XML test file mismatches

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>
5 years agoCompare YML files as Strings, not XML 86/74286/1
mark.j.leonard [Wed, 5 Dec 2018 18:06:02 +0000 (18:06 +0000)]
Compare YML files as Strings, not XML

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>
5 years agoUpgrade to sdc-tosca version 1.4.7 43/74043/1
mark.j.leonard [Fri, 30 Nov 2018 10:52:50 +0000 (10:52 +0000)]
Upgrade to sdc-tosca version 1.4.7

Change-Id: I186683ff734747e64a561391ec4314bc716a0cd3
Issue-ID: AAI-1983
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoProcess Service-level Instance Groups 03/73703/1
mark.j.leonard [Tue, 27 Nov 2018 16:54:33 +0000 (16:54 +0000)]
Process Service-level Instance Groups

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>
5 years agoRefactor processProvidingService method 71/73671/2
mark.j.leonard [Tue, 27 Nov 2018 12:38:09 +0000 (12:38 +0000)]
Refactor processProvidingService method

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>
5 years agoRefactor model generation algorithm 65/73665/1
mark.j.leonard [Tue, 27 Nov 2018 11:49:58 +0000 (11:49 +0000)]
Refactor model generation algorithm

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>
5 years agoRefactor Instance Group processing 73/73373/1
mark.j.leonard [Thu, 22 Nov 2018 12:24:44 +0000 (12:24 +0000)]
Refactor Instance Group processing

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>
5 years agoAdd support for ResourceInstanceGroup 20/72320/1
mark.j.leonard [Fri, 9 Nov 2018 18:03:13 +0000 (18:03 +0000)]
Add support for ResourceInstanceGroup

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>
5 years agoMinor formatting fixes 87/72287/2
mark.j.leonard [Fri, 9 Nov 2018 11:27:01 +0000 (11:27 +0000)]
Minor formatting fixes

Non-functional changes addressing whitespace inconsistencies.

Change-Id: Ife84f6b04bf8ce0204409d2f3708ab85b3a3caff
Issue-ID: AAI-1884
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoUpversion to Spring Boot 1.15.17 83/72283/1
Lee, Tian (tl5884) [Fri, 9 Nov 2018 10:41:40 +0000 (10:41 +0000)]
Upversion to Spring Boot 1.15.17

To fix NexusIQ vunerabilities

Change-Id: I2ce3dd403292297e1a86c6a8df853d72ad42ec7d
Issue-ID: AAI-1897
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoAdd a CSAR test file containing an InstanceGroup 07/72107/2
mark.j.leonard [Wed, 7 Nov 2018 19:13:50 +0000 (19:13 +0000)]
Add a CSAR test file containing an InstanceGroup

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>
5 years agoUpgrade Babel to sdc-tosca 1.4.6 62/72062/2
mark.j.leonard [Wed, 7 Nov 2018 11:36:42 +0000 (11:36 +0000)]
Upgrade Babel to sdc-tosca 1.4.6

Change-Id: I53863aabd02050606605f2e905186b01232a77c9
Issue-ID: AAI-1771
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoUpversion to 1.4.0 54/71954/1
Lee, Tian (tl5884) [Tue, 6 Nov 2018 15:15:06 +0000 (15:15 +0000)]
Upversion to 1.4.0

Change-Id: I14455a57732ad27f3934628587f8b26c7ababa4c
Issue-ID: AAI-1848
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoupversion to 1.3.2 86/71686/1
sblimkie [Thu, 1 Nov 2018 20:21:43 +0000 (16:21 -0400)]
upversion to 1.3.2

Change-Id: Id1036eed42908e80bcf145d5864b5bd530eb84ad
Issue-ID: AAI-1814
Signed-off-by: sblimkie <steven.blimkie@amdocs.com>
5 years agoDo not apply timezone offsets to the test Clock 05/71305/1 1.3.1
mark.j.leonard [Fri, 26 Oct 2018 10:08:37 +0000 (11:08 +0100)]
Do not apply timezone offsets to the test Clock

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>
5 years agoFix JUnit test for the Info status report 66/71166/1
mark.j.leonard [Wed, 24 Oct 2018 16:29:41 +0000 (17:29 +0100)]
Fix JUnit test for the Info status report

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>
5 years agoUpversion to 1.3.1 80/70180/1
Lee, Tian (tl5884) [Wed, 10 Oct 2018 16:06:51 +0000 (17:06 +0100)]
Upversion to 1.3.1

Change-Id: I90ed0b13bb83ab9b03d873ba03fe5521eae823d4
Issue-ID: AAI-1734
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoDowngrade to sdc-tosca 1.4.4 68/70068/1 1.3.0
mark.j.leonard [Tue, 9 Oct 2018 13:53:08 +0000 (14:53 +0100)]
Downgrade to sdc-tosca 1.4.4

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>
5 years agoUpdate to sdc-tosca 1.4.5 57/70057/1
mark.j.leonard [Tue, 9 Oct 2018 11:53:59 +0000 (12:53 +0100)]
Update to sdc-tosca 1.4.5

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>
5 years agoGenerate models for child resources 79/69979/1
mark.j.leonard [Mon, 8 Oct 2018 11:04:17 +0000 (12:04 +0100)]
Generate models for child resources

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>
5 years agoRemove SNAPSHOT from aai-common dependency 71/69271/1
Lee, Tian (tl5884) [Thu, 27 Sep 2018 10:17:14 +0000 (11:17 +0100)]
Remove SNAPSHOT from aai-common dependency

Change-Id: I1d7daf205735ebb810fdb3e2cda92c982c464f49
Issue-ID: AAI-1686
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoFix spring-boot plugin missing system parameter 49/66149/1
Lee, Tian (tl5884) [Wed, 12 Sep 2018 15:26:56 +0000 (16:26 +0100)]
Fix spring-boot plugin missing system parameter

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>
5 years agoFix NexusIQ security vulnerabilities 33/66133/1
Lee, Tian (tl5884) [Wed, 12 Sep 2018 14:52:57 +0000 (15:52 +0100)]
Fix NexusIQ security vulnerabilities

- 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>
5 years ago[Babel] Use Spring Boot 1.5.15 57/66057/1
mark.j.leonard [Wed, 12 Sep 2018 10:28:14 +0000 (11:28 +0100)]
[Babel] Use Spring Boot 1.5.15

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>
5 years agoImproved logging for VNF image extraction 01/65901/1
mark.j.leonard [Tue, 11 Sep 2018 17:17:56 +0000 (18:17 +0100)]
Improved logging for VNF image extraction

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>
5 years agoAdd support for InstanceGroup resource models 59/65559/1
mark.j.leonard [Mon, 10 Sep 2018 14:53:13 +0000 (15:53 +0100)]
Add support for InstanceGroup resource models

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>
5 years agoSimplify input CSAR test data 01/65501/1
mark.j.leonard [Thu, 6 Sep 2018 14:38:04 +0000 (15:38 +0100)]
Simplify input CSAR test data

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>
5 years agoAdditional tests for VNF image extraction 95/64995/1
mark.j.leonard [Thu, 6 Sep 2018 12:12:23 +0000 (13:12 +0100)]
Additional tests for VNF image extraction

New tests for extracting software versions.

Change-Id: I26a9d654d03154a1d026741e623c8f953946a5f4
Issue-ID: AAI-1250
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoRefactor Junit test code to remove duplication 87/64987/1
mark.j.leonard [Thu, 6 Sep 2018 10:56:00 +0000 (11:56 +0100)]
Refactor Junit test code to remove duplication

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>
5 years agoMerge "Replace test UUIDs with dummy strings"
Tian Lee [Thu, 6 Sep 2018 11:04:18 +0000 (11:04 +0000)]
Merge "Replace test UUIDs with dummy strings"

5 years agoMerge "Additional VNF Configuration test scenarios"
Tian Lee [Thu, 6 Sep 2018 11:03:53 +0000 (11:03 +0000)]
Merge "Additional VNF Configuration test scenarios"

5 years agoReplace test UUIDs with dummy strings 73/64973/1
mark.j.leonard [Thu, 6 Sep 2018 10:15:04 +0000 (11:15 +0100)]
Replace test UUIDs with dummy strings

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>
5 years agoMerge "Fixing the achtype variable name"
Tian Lee [Fri, 17 Aug 2018 10:22:43 +0000 (10:22 +0000)]
Merge "Fixing the achtype variable name"

5 years agoFixing the achtype variable name 53/60353/2
Arul.Nambi [Mon, 13 Aug 2018 16:14:22 +0000 (12:14 -0400)]
Fixing the achtype variable name

Issue-ID: AAI-1449
Change-Id: I862fd89a4f9aa9525c5475997ca8c360c6cb39a7
Signed-off-by: Arul.Nambi <arul.nambi@amdocs.com>
5 years agoAdditional VNF Configuration test scenarios 15/60915/1
mark.j.leonard [Thu, 16 Aug 2018 14:14:07 +0000 (15:14 +0100)]
Additional VNF Configuration test scenarios

Add test cases for both 0 and 2 VNF Configurations in the input CSAR file

Issue-ID: AAI-1250
Change-Id: I0cae09f876d7bbb08cbe48019220e1836e4b7fca
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoUpdate SdWanServiceTest CSAR to make it valid 99/60899/1
mark.j.leonard [Thu, 16 Aug 2018 11:22:58 +0000 (12:22 +0100)]
Update SdWanServiceTest CSAR to make it valid

The SD-WAN test CSAR file is parseable using the sdc-tosca dependency
version 1.4.1 but it cannot be parsed using version 1.4.2 and above, as
there are missing data types leading to inheritance errors.

Correct the test CSAR file by adding the missing types. This has a
beneficial side-effect of increasing code coverage.

Issue-ID: AAI-1250
Change-Id: I41682b49d9d0a260a6feff05fda135949b46ec05
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoFix Babel build issue 25/60525/1
Lee, Tian (tl5884) [Tue, 14 Aug 2018 10:43:17 +0000 (11:43 +0100)]
Fix Babel build issue

Caused by a change in the structure of the aai-schema jar that Babel
depends on.

Change-Id: I68575ba0c727826de9a930a5e85c4f077d1127d1
Issue-ID: AAI-1449
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoFixing the docker jenkins job 21/60321/1
Arul.Nambi [Mon, 13 Aug 2018 14:23:38 +0000 (10:23 -0400)]
Fixing the docker jenkins job

Issue-ID: AAI-1449
Change-Id: I5cda30518c34d52e49bb61055e29aaf839e090c6
Signed-off-by: Arul.Nambi <arul.nambi@amdocs.com>
5 years agoRefactor method processServiceTosca for Sonar 81/59681/1
mark.j.leonard [Wed, 8 Aug 2018 14:47:57 +0000 (15:47 +0100)]
Refactor method processServiceTosca for Sonar

Fix for a new Sonar issue detected when a method was moved within an
existing Java class file. See
https://sonar.onap.org/project/issues?id=org.onap.aai%3Ababel&open=AWUZW80uwGn37JfbxewF

Change-Id: I3ac7ecf74c261d39a8762fd39123f7f8048894e3
Issue-ID: AAI-1242
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoAdd VF Module Groups to the SD-WAN Service test 03/59503/1
mark.j.leonard [Tue, 7 Aug 2018 17:33:38 +0000 (18:33 +0100)]
Add VF Module Groups to the SD-WAN Service test

Create additional TOSCA YAML content for the existing SD-WAN Service
CSAR input file, so that the VF Module processing code is invoked.

Issue-ID: AAI-1250
Change-Id: I24a842223154d52e1a4a19e5b9cd739b0ceee4f4
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoAdd test CSAR file for missing Service metadata 95/59495/1
mark.j.leonard [Tue, 7 Aug 2018 16:26:14 +0000 (17:26 +0100)]
Add test CSAR file for missing Service metadata

Change-Id: I4138d1d60fe234949264f3c2d2e2156681e9075c
Issue-ID: AAI-1448
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoCheck getMetaData() return value for null 85/59485/1
mark.j.leonard [Tue, 7 Aug 2018 15:43:55 +0000 (16:43 +0100)]
Check getMetaData() return value for null

Added code to check for null metadata.
Decomposed existing methods to avoid Sonar complexity warnings.
Renamed some variables for readability.

Change-Id: Id68be06bb5c105f45870a08f60a4ddc4dfbe5b09
Issue-ID: AAI-1448
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoUse sdc-tosca version 1.4.1 55/59255/1
mark.j.leonard [Mon, 6 Aug 2018 17:49:45 +0000 (18:49 +0100)]
Use sdc-tosca version 1.4.1

Update the sdc-tosca dependency to version 1.4.1

Change-Id: Idad51e28a8ebb9f345f705329cbf05e62510e38f
Issue-ID: AAI-1445
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoAdd support for the CR Widget 49/59249/1
mark.j.leonard [Mon, 6 Aug 2018 17:04:09 +0000 (18:04 +0100)]
Add support for the CR Widget

Issue-ID: AAI-1444
Change-Id: If25a2ea001fe7b43dbd14eed008a14e5dd8b3579
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoMinor text fixes 47/59247/1
mark.j.leonard [Mon, 6 Aug 2018 16:28:51 +0000 (17:28 +0100)]
Minor text fixes

Updated some Javadoc text for compatibility with Checkstyle settings.

Issue-ID: AAI-1444
Change-Id: I9d7541aa24d07e42d7d127f76b8576a7fa7184d4
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoRemove Byte Order Mark from License text 43/59243/1
mark.j.leonard [Mon, 6 Aug 2018 15:58:34 +0000 (16:58 +0100)]
Remove Byte Order Mark from License text

Change-Id: I331d3832828aa825c710d7fb058786dd1448c0c3
Issue-ID: AAI-1443
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoUpdate expected results to v14 namespace 07/57307/1
mark.j.leonard [Tue, 24 Jul 2018 11:45:57 +0000 (12:45 +0100)]
Update expected results to v14 namespace

The aai-schema version has changed from v13 to v14. Unit tests which
compare actual results with expected results are updated not to fail.

Change-Id: I464eec917d5062e21a5f9c41155fe86ca1e073b9
Issue-ID: AAI-1400
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoRefactor Widget class to reduce complexity 55/55955/1
mark.j.leonard [Fri, 6 Jul 2018 13:16:22 +0000 (14:16 +0100)]
Refactor Widget class to reduce complexity

Remove a large switch statement to reduce Cyclomatic Complexity and thus
remove an oustanding Sonar code smell. Replace the switch with a Map so
that a look-up can be implemented.

Issue-ID: AAI-1242
Change-Id: I5b396216a28b77dcb3953eb4897a5397c98d119d
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoCreate new tests for adding Widgets to VfModule 49/55949/1
mark.j.leonard [Fri, 6 Jul 2018 11:05:54 +0000 (12:05 +0100)]
Create new tests for adding Widgets to VfModule

Also correct formatting for Checkstyle and add Javadoc comments where
missing.

Issue-ID: AAI-1250
Change-Id: I614fd748fb288e6fc8f763f073e99a5067cbaac4
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoMerge "Test coverage and refactor for GeneratorUtil"
Tian Lee [Fri, 6 Jul 2018 10:32:55 +0000 (10:32 +0000)]
Merge "Test coverage and refactor for GeneratorUtil"

5 years agoTest coverage and refactor for GeneratorUtil 95/55495/4
Adam Wudzinski [Wed, 27 Jun 2018 14:53:30 +0000 (16:53 +0200)]
Test coverage and refactor for GeneratorUtil

Added tests and made GeneratorUtil final class

Change-Id: I3e9b3fa22dff5c50fa37ad10ba0ddd8b9bbef2d9
Issue-ID: AAI-1334
Signed-off-by: awudzins <adam.wudzinski@nokia.com>
5 years agoResolve Nexus-IQ security vulnerabilities 75/55875/1
Lee, Tian (tl5884) [Thu, 5 Jul 2018 11:39:02 +0000 (12:39 +0100)]
Resolve Nexus-IQ security vulnerabilities

Threat level 4+

Change-Id: Iedd7b44f7d8d07d81825b2c7cc076e82aba81b91
Issue-ID: AAI-1291
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoRefactor Model methods to reduce complexity 87/55687/1
mark.j.leonard [Tue, 3 Jul 2018 11:40:49 +0000 (12:40 +0100)]
Refactor Model methods to reduce complexity

Change-Id: Ie67b85df855670974aa7939caf0f9afc3effe077
Issue-ID: AAI-1242
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoRevert "Drop registry prefix from pom.xml" 31/55631/1
mark.j.leonard [Mon, 2 Jul 2018 14:27:36 +0000 (15:27 +0100)]
Revert "Drop registry prefix from pom.xml"

This reverts commit 1227efa25a23815c7c943c5d50da561bf369cd5d.

Issue-ID: AAI-1352
Change-Id: I8ae4f512f832567c93da8599baf23a70d9d44d48
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoSupport Port Mirroring Configuration model 31/55531/1
Lee, Tian (tl5884) [Thu, 28 Jun 2018 16:35:04 +0000 (17:35 +0100)]
Support Port Mirroring Configuration model

Add support for Port Mirroring Configuration XML model generation from SDC TOSCA

Change-Id: I44718d20a53e343ee34ae47ef2bc35d49c862ddf
Issue-ID: AAI-1345
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoAdditional junit tests for artifact generation 05/55505/1
mark.j.leonard [Wed, 27 Jun 2018 17:27:47 +0000 (18:27 +0100)]
Additional junit tests for artifact generation

New tests to improve code coverage. Remove underscores from existing
Junit test method names.

Issue-ID: AAI-1250
Change-Id: I8d0d9c41d7a124cbedea69d64c4cd78ac6e4bcfa
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoRemove the Generator Constants class 71/55471/1
mark.j.leonard [Wed, 27 Jun 2018 10:46:19 +0000 (11:46 +0100)]
Remove the Generator Constants class

Move the String constants out of a common class and into the individual
classes where they are used. This eliminates a set of Sonar code smells
relating to non-standard ordering of declarations. It simplifies the
code by removing the need for an empty private constructor in the static
class (i.e. containing static methods only).

Additionally, simplify the AaiModelGenerator interface by removing the
static factory method (which is not currently required). If multiple
implementations are needed we can use Spring annotations in the future.

Issue-ID: AAI-1242
Change-Id: Ica03b66ae2fd899977093d11d3e23dc3f3c8f194
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoFix remaining Sonar code smells 61/55361/2
mark.j.leonard [Tue, 26 Jun 2018 10:37:52 +0000 (11:37 +0100)]
Fix remaining Sonar code smells

Code reformatting to address Sonar code smells, excluding the cyclomatic
complexity errors which will require some heavier refactoring.

Issue-ID: AAI-1242
Change-Id: I0f2502c8038b1e70f53f3b82b9d4d0761d9137cc
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoExtracted repeating strings; added annotations 29/55329/1
Wiktor Garbarek [Mon, 25 Jun 2018 13:43:14 +0000 (15:43 +0200)]
Extracted repeating strings; added annotations

Change-Id: Ibe92169b6819f032f5609849f785c22d76ffc237
Issue-ID: AAI-1239
Signed-off-by: Wiktor Garbarek <wiktor.garbarek@nokia.com>
5 years agoRe-add arm64 support changes 33/49333/1
Lee, Tian (tl5884) [Tue, 29 May 2018 09:45:17 +0000 (10:45 +0100)]
Re-add arm64 support changes

Re-adding some of the changes made to support arm64 that were lost in a
previous commit.

Commits that were lost:
b50d09cce12ac78b3f518a5e52ffa45cde259e70
04e6b061e130c40e92e3e45c8fd1355f3c99ac29
1227efa25a23815c7c943c5d50da561bf369cd5d

Change-Id: Iff90e4d0fde55a283c47b687254ea4b9da2814c3
Issue-ID: CIMAN-154
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoMake babel run as root 17/49117/1
Daniel Silverthorn [Fri, 25 May 2018 12:46:18 +0000 (08:46 -0400)]
Make babel run as root

Change-Id: I14a0e96ab0b1c4b4c04b8050ea853e74d31e94ce
Issue-ID: AAI-1179
Signed-off-by: Daniel Silverthorn <daniel.silverthorn@amdocs.com>
5 years agoMerge "Upversion for Casablanca"
Steven Blimkie [Wed, 23 May 2018 18:47:46 +0000 (18:47 +0000)]
Merge "Upversion for Casablanca"

5 years agoUpversion for Casablanca 59/48759/1
Jimmy Forsyth [Wed, 23 May 2018 17:56:25 +0000 (13:56 -0400)]
Upversion for Casablanca

Issue-ID: AAI-1169
Change-Id: Iddc4a76f40b9ab60f698a0f1b5cb9ec13581c10e
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
5 years agoFix Babel authorisation mechanism 81/46581/1 2.0.0-ONAP beijing 2.0.0-ONAP v1.2.0
Lee, Tian (tl5884) [Tue, 8 May 2018 11:01:21 +0000 (12:01 +0100)]
Fix Babel authorisation mechanism

Change-Id: Iae3139b33e315fae0c205fd7e0df67554d91cd5b
Issue-ID: AAI-1126
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoRemove license violations 37/45437/1
Lee, Tian (tl5884) [Tue, 1 May 2018 13:51:03 +0000 (14:51 +0100)]
Remove license violations

Remove un-needed javaee-api dependency.

Change-Id: I86967388afa404267a1ef7f7eb9110d134050946
Issue-ID: AAI-1108
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoMerge "Upversion logback classic and core dependencies"
James Forsyth [Tue, 1 May 2018 12:52:09 +0000 (12:52 +0000)]
Merge "Upversion logback classic and core dependencies"

5 years agoUpversion logback classic and core dependencies 09/45409/1
Lee, Tian (tl5884) [Tue, 1 May 2018 09:47:29 +0000 (10:47 +0100)]
Upversion logback classic and core dependencies

To remove Nexus-IQ security vulnerability

Change-Id: Ia9ff4aaf36f525c427e30664f143803c9d08a6da
Issue-ID: AAI-1107
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoMerge "Convert Babel from AJSC2 to Spring Boot 1.5.12"
James Forsyth [Mon, 30 Apr 2018 16:27:55 +0000 (16:27 +0000)]
Merge "Convert Babel from AJSC2 to Spring Boot 1.5.12"

5 years agoConvert Babel from AJSC2 to Spring Boot 1.5.12 49/45149/4
Lee, Tian (tl5884) [Fri, 27 Apr 2018 16:50:07 +0000 (17:50 +0100)]
Convert Babel from AJSC2 to Spring Boot 1.5.12

Change-Id: I2ea10250c3881827b6b274afadf1a8c89683f568
Issue-ID: AAI-1045
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
6 years agoRemove test data containing proprietary marking 89/43889/1
mark.j.leonard [Fri, 20 Apr 2018 10:36:57 +0000 (11:36 +0100)]
Remove test data containing proprietary marking

Update the test CSAR (compressed artifacts) to delete unnecessary text
files containing wording that indicates proprietary content.
The test files were based on genuine CSAR content from a test system and
the informational files were overlooked. These can be safely removed
without breaking the unit tests.

Change-Id: I4b20f7c9a5484bf181b687dbdd821fbc4662e5aa
Issue-ID: AAI-1086
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoUpdate groupid to match ONAP convention 81/43581/1
Lee, Tian (tl5884) [Wed, 18 Apr 2018 16:30:22 +0000 (17:30 +0100)]
Update groupid to match ONAP convention

groupid must contain the repository name

Change-Id: I33c40339fc24320968ada7355239c3100f6503d7
Issue-ID: AAI-1077
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
6 years agoRe-add maven license plugin 73/43373/1
Lee, Tian (tl5884) [Tue, 17 Apr 2018 14:31:49 +0000 (15:31 +0100)]
Re-add maven license plugin

The plugin is now configured to enforce the presence of license headers
without overwriting any existing headers.

Change-Id: I11c2fc6fed0d893153f1bb8c02d5b9a70e56cdae
Issue-ID: AAI-920
Signed-off-by: Lee, Tian (tl5884) <tl5884@att.com>
6 years agoAdd .gitreview file for project 67/43167/1
Mohammed Naser [Mon, 16 Apr 2018 20:22:18 +0000 (13:22 -0700)]
Add .gitreview file for project

Change-Id: I281686783b6aa455c8964c519192b2adcd2c7cb0
Issue-ID: AAI-1038
Signed-off-by: Mohammed Naser <mnaser@vexxhost.com>
6 years agoDrop registry prefix from pom.xml 65/43165/1
Mohammed Naser [Mon, 16 Apr 2018 20:20:22 +0000 (13:20 -0700)]
Drop registry prefix from pom.xml

The registry prefix is not needed as when things get published
the maven plugin automatically prefixes them when you supply
it as part of the maven arguments.

Change-Id: I18aa3f62446b3a16924e2d3733e294bb98dd33b4
Issue-ID: CIMAN-154
Signed-off-by: Mohammed Naser <mnaser@vexxhost.com>
6 years agoDynamically determine image architecture 63/43163/1
Mohammed Naser [Mon, 16 Apr 2018 20:19:50 +0000 (13:19 -0700)]
Dynamically determine image architecture

The image architecture is currently hardcoded, this patch removes
that hardcoded value to allow for ARM64 builds to go through.

Change-Id: I214208421dd2b1d641166f0cfd977cf33073dc7a
Issue-ID: CIMAN-154
Signed-off-by: Mohammed Naser <mnaser@vexxhost.com>
6 years agoPin jnr-unixsocket for Docker plugin to 0.13 61/43161/1
Mohammed Naser [Mon, 16 Apr 2018 20:19:24 +0000 (13:19 -0700)]
Pin jnr-unixsocket for Docker plugin to 0.13

The current verison of jnr-unixsocket is 0.12 from the Docker
plugin however in order to be able the images for ARM64, it needs
the newer version which has support for it.

There is work upstream to switch the version to 0.18[0] however
it seems that this is still pending, so we can pin it for now until
that merges.

[0]: https://github.com/spotify/docker-maven-plugin/pull/379

Change-Id: I81a8ed45a0c39eaa6ddab85c37a269b30c53acff
Issue-ID: CIMAN-154
Signed-off-by: Mohammed Naser <mnaser@vexxhost.com>
6 years agoCorrect INFO.yaml to pass YAML Lint 99/41999/1
Eric Debeau [Tue, 10 Apr 2018 19:44:56 +0000 (19:44 +0000)]
Correct INFO.yaml to pass YAML Lint

Change-Id: I57f41b029b41e78520d73e7c200c18178ebd47d9
Issue-ID: AAI-1022
Signed-off-by: Eric Debeau <eric.debeau@orange.com>
6 years agoAdd explicit Maven dependency on DME2 17/41717/3
mark.j.leonard [Mon, 9 Apr 2018 12:20:26 +0000 (13:20 +0100)]
Add explicit Maven dependency on DME2

Include com.att.aft.dme2 as a dependency rather than rely on this being
provided (as specified in the AJSC BOM) so as to solve a runtime error
with the Class Loader.

Change-Id: I268551455922a8e3bd259afe2fc4561a5c020fa1
Issue-ID: AAI-1007
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoAdd version.properties file 19/41419/1
Jimmy Forsyth [Fri, 6 Apr 2018 17:55:00 +0000 (13:55 -0400)]
Add version.properties file

Issue-ID: AAI-1006
Change-Id: I053de7f323a28624be92fa8860ee8dfdbe2776ac
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
6 years agoEnsure that all properties are passed on start-up 07/41407/1
mark.j.leonard [Fri, 6 Apr 2018 16:20:11 +0000 (17:20 +0100)]
Ensure that all properties are passed on start-up

The System Properties KEY_STORE_PASSWORD and KEY_MANAGER_PASSWORD are
now read from the environment and written to the configured system
properties file. This prevents an error within AJSC on startup.

Issue-ID: AAI-1006
Change-Id: Ie92cff0a24352ef162d25dd6d60c75f23d6bdfd7
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoIncorporate the ECOMP SDC Artefact Generator code 57/39057/4
Leonard, Mark (ml401d) [Wed, 21 Mar 2018 18:40:41 +0000 (18:40 +0000)]
Incorporate the ECOMP SDC Artefact Generator code

Remove the Maven dependency on openecomp-sdc-artifact-generator-core,
because this is not maintained in the ONAP source code repositories.
The functionality provided by the SDC Artifact Generator is replaced
with equivalent code that depends on the SDC-TOSCA parsing library,
without introducing any backwards-compatibility breaks.
The intention is to make this Maven project more maintainable by
depending only the common ONAP libraries.

Change-Id: I01d78575d3b7c70a11e4c7989a021de3c0913a06
Issue-ID: AAI-943
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoFix docker image name 79/35979/1
RaviGeda [Thu, 15 Mar 2018 11:56:47 +0000 (11:56 +0000)]
Fix docker image name

Change docker image name to onap

Change-Id: I0c747e915c5ed84fe0b3d9748429f2363e5074ed
Issue-ID: AAI-878
Signed-off-by: RaviGeda <gravik@amdocs.com>
6 years agoAdd INFO.yaml file 87/32987/1
Jessica Wagantall [Tue, 27 Feb 2018 01:02:43 +0000 (17:02 -0800)]
Add INFO.yaml file

Add INFO.yaml to list:
- Project description
- Properties
- PTL information
- Meeting information
- Committer information

Change-Id: I23f88a7861ee8b0e18f5b18fdd08733c588ba34b
Issue-ID: CIMAN-134
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>