aai/babel.git
4 years agoUpversion to 1.7.0 04/105504/1
Jimmy Forsyth [Wed, 8 Apr 2020 14:31:19 +0000 (10:31 -0400)]
Upversion to 1.7.0

Issue-ID: AAI-2860
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
Change-Id: Iab4f5397b370b7e4fec6d3b053b62ecde056aff5

4 years agoUpversion to 1.6.3 91/104791/1 frankfurt 6.0.0-ONAP
Jimmy Forsyth [Tue, 31 Mar 2020 19:01:16 +0000 (15:01 -0400)]
Upversion to 1.6.3

Issue-ID: AAI-2580
Change-Id: Ic958cf275dc7ddfff4dc6712ce7afeee446d89bd
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
4 years agoRelease 1.6.2 container 90/104790/1
Jimmy Forsyth [Tue, 31 Mar 2020 18:52:14 +0000 (14:52 -0400)]
Release 1.6.2 container

Issue-ID: AAI-2580
Change-Id: I24fbc7567b3c140e2eea1152d36fe0a64af2476d
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
4 years agoRelease 1.6.2 artifacts 89/104789/2
Jimmy Forsyth [Tue, 31 Mar 2020 18:39:25 +0000 (14:39 -0400)]
Release 1.6.2 artifacts

Issue-ID: AAI-2850
Change-Id: I087a020555841a4e9eafd5f30158af850eb10f86
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
4 years agoUpversion to 1.6.2 13/104713/1
Jimmy Forsyth [Mon, 30 Mar 2020 21:29:24 +0000 (17:29 -0400)]
Upversion to 1.6.2

Issue-ID: AAI-2850
Change-Id: Ic0c0a616293171b6e244f012a22e927ab22c3472
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
4 years agoUse aai-schema-service:1.6.6 98/103898/2
Jimmy Forsyth [Wed, 18 Mar 2020 17:02:25 +0000 (13:02 -0400)]
Use aai-schema-service:1.6.6

Issue-ID: AAI-2839
Change-Id: Ia3232b67e13c81d60db59b197fbc7c48f0ffc076
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
4 years agoUpdate for sonarcloud.io 62/101762/2
Forsyth, James (jf2512) [Fri, 14 Feb 2020 20:46:08 +0000 (15:46 -0500)]
Update for sonarcloud.io

Issue-ID: AAI-2793
Signed-off-by: Forsyth, James (jf2512) <jf2512@att.com>
Change-Id: I42c7e869a12651ca09a9631ae928af4f9a3065ce

4 years agoRelease artifacts 52/100452/1
Forsyth, James (jf2512) [Sat, 18 Jan 2020 02:57:29 +0000 (21:57 -0500)]
Release artifacts

Issue-ID: AAI-2757
Signed-off-by: Forsyth, James (jf2512) <jf2512@att.com>
Change-Id: Ie424205a407fa7fde3958d0b7435d3baa4e59851

4 years agoRelease container 51/100451/1
Forsyth, James (jf2512) [Sat, 18 Jan 2020 02:37:36 +0000 (21:37 -0500)]
Release container

Issue-ID: AAI-2758
Signed-off-by: Forsyth, James (jf2512) <jf2512@att.com>
Change-Id: I5a9ac4ee2cef49aadf3850ffe8053b7dc7abc38d

4 years agoUpversion to 1.6.1 41/100441/1 1.6.1
Forsyth, James (jf2512) [Fri, 17 Jan 2020 22:30:21 +0000 (17:30 -0500)]
Upversion to 1.6.1

Issue-ID: AAI-2757
Signed-off-by: Forsyth, James (jf2512) <jf2512@att.com>
Change-Id: Iecc97358ad8cdb94960c426c88f4815481bd22cd

4 years agoUpdate schema-service dep to 1.6.0 39/98739/1
sblimkie [Thu, 21 Nov 2019 19:56:17 +0000 (14:56 -0500)]
Update schema-service dep to 1.6.0

Change-Id: Idfabac878db11ccde4859ee04bdf45b560460a88
Signed-off-by: sblimkie <steven.blimkie@amdocs.com>
Issue-ID: AAI-2607

4 years agoEnforce minimum Jacoco line coverage 52/96552/1
Lee, Tian (tl5884) [Thu, 3 Oct 2019 11:22:40 +0000 (12:22 +0100)]
Enforce minimum Jacoco line coverage

Current coverage at 97%, enforced limit set to 90%

Change-Id: Ib6ad68dc5b72c2c76d02b42e18943b79400968a6
Issue-ID: AAI-2363
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
4 years agoFixed project version parsing 95/92795/4
Dmitry Puzikov [Tue, 16 Apr 2019 14:53:15 +0000 (16:53 +0200)]
Fixed project version parsing

Fixed pom.xml to execute vesion parsing earlier.

Change-Id: Ic5f2c1c304ab025cbac93d5177776c17a8ff803b
Issue-ID: INT-801
Signed-off-by: Dmitry Puzikov <dmitry.puzikov@tieto.com>
4 years agoUpversion babel in master 90/93490/1
Jimmy Forsyth [Tue, 13 Aug 2019 22:17:11 +0000 (18:17 -0400)]
Upversion babel in master

Issue-ID: AAI-2579
Change-Id: Iefe4ab17ab71fd6e50e1148befc6ebb786c12853
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
4 years agoUpgrade Spring Boot from 1.5.x to 2.1.6 97/92297/1
Lee, Tian (tl5884) [Tue, 30 Jul 2019 15:45:43 +0000 (16:45 +0100)]
Upgrade Spring Boot from 1.5.x to 2.1.6

Changes required to upgrade Babel to latest Spring Boot version.

This changelist is dependent on https://gerrit.onap.org/r/c/aai/oom/+/92293

Issue-ID: AAI-2540
Change-Id: I804b80506514d274249fa4eae36392793cb737fb
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
4 years agoPrepare babel for global-jjb 21/90621/1
Jimmy Forsyth [Thu, 27 Jun 2019 21:04:38 +0000 (17:04 -0400)]
Prepare babel for global-jjb

Issue-ID: AAI-2477
Change-Id: I19ee7cc0bc5f28954eafa591b380db755a3ed635
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
4 years agoUpversion in preparation of initial release 61/89861/2
Jimmy Forsyth [Fri, 14 Jun 2019 09:20:13 +0000 (11:20 +0200)]
Upversion in preparation of initial release

Issue-ID: AAI-2477
Change-Id: I476c3e329bb8ae247b3850d96c0f5b71da1cd190
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
4 years agoUpversion prior to release 62/86762/1 dublin 1.4.2 4.0.0-ONAP
Jimmy Forsyth [Thu, 2 May 2019 01:35:54 +0000 (21:35 -0400)]
Upversion prior to release

Issue-ID: AAI-2403
Change-Id: Ib10dbb984fb1d24252adcb4975707fc91d2379b2
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
4 years agoUpdate to latest version of schema-service 13/86713/1
Jimmy Forsyth [Wed, 1 May 2019 12:54:33 +0000 (08:54 -0400)]
Update to latest version of schema-service

Update to TOSCA Parser 1.5.1

Issue-ID: AAI-2402
Issue-ID: AAI-2169
Change-Id: I13152cecf7e8e6de2e7add5c0f829d769a35dd20
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
5 years agoRoll back springboot upgrade 40/85340/1 1.4.1
Jimmy Forsyth [Mon, 15 Apr 2019 15:38:30 +0000 (11:38 -0400)]
Roll back springboot upgrade

Issue-ID: AAI-2378
Change-Id: I39447e84938a928432b95783b0ed4ebd729cf668
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
5 years agoUpdated version.properties 10/85110/1
Polavarapu, Chaitanya (cp8128) [Thu, 11 Apr 2019 18:11:41 +0000 (14:11 -0400)]
Updated version.properties

Updated to match with pom.xml snapshot version

Issue-ID: AAI-2338
Change-Id: Ief05d895de8cbe5eff7e8bc9705d691b660dcbb0
Signed-off-by: Polavarapu, Chaitanya (cp8128) <cp8128@att.com>
5 years agoUpdated to use dublin schema version 51/84751/6
Polavarapu, Chaitanya (cp8128) [Tue, 9 Apr 2019 21:02:50 +0000 (17:02 -0400)]
Updated to use dublin schema version

Using 1.0.2 schema-service version
Fixed the junit test failure for default service version

Issue-ID: AAI-2338
Change-Id: Ie0ddda41f6895ff0ce8e97ad065fb935462e643a
Signed-off-by: Polavarapu, Chaitanya (cp8128) <cp8128@att.com>
5 years agoThis enhancement will enable Babel to process artifacts of version n.n 50/84750/2
Polavarapu, Chaitanya (cp8128) [Tue, 9 Apr 2019 20:49:30 +0000 (16:49 -0400)]
This enhancement will enable Babel to process artifacts of version n.n

Issue-ID: AAI-2338
Change-Id: I829ba56aa09ac1d98a8c9d27fabb85d95d571534
Signed-off-by: Polavarapu, Chaitanya (cp8128) <cp8128@att.com>
5 years agoMerge "Upgrade to springboot 1.5.20.RELEASE"
Steven Blimkie [Tue, 9 Apr 2019 17:05:32 +0000 (17:05 +0000)]
Merge "Upgrade to springboot 1.5.20.RELEASE"

5 years agoUpgrade to springboot 1.5.20.RELEASE 15/84715/1
Jimmy Forsyth [Tue, 9 Apr 2019 15:56:42 +0000 (11:56 -0400)]
Upgrade to springboot 1.5.20.RELEASE

Issue-ID: AAI-2349
Change-Id: I2762773f1bde721b0b18a73e6e5ccec54bae6541
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
5 years agoGenerateArtifactsServiceImpl code coverage 91/84091/1
mark.j.leonard [Wed, 3 Apr 2019 13:07:09 +0000 (14:07 +0100)]
GenerateArtifactsServiceImpl code coverage

Additional tests for coverage of the generateArtifacts() implementation.
Replace use of the generic Exception by catching only the specific types
of Exception thrown by the parser/generators.
Modify existing tests to ensure that each branch is covered.

Change-Id: Id35e8a4a51b785f0367ac04a31ed23226cdb4810
Issue-ID: AAI-2280
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoFix new Sonar code smell 86/84086/1
mark.j.leonard [Wed, 3 Apr 2019 11:23:11 +0000 (12:23 +0100)]
Fix new Sonar code smell

Log the Exception for missing software versions to prevent a Sonar
violation.

Change-Id: I1a5da4357947a57c05f2d4a40b788999149d543c
Issue-ID: AAI-2281
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoDelete temp file in FileWatcher test 82/84082/1
mark.j.leonard [Wed, 3 Apr 2019 10:47:34 +0000 (11:47 +0100)]
Delete temp file in FileWatcher test

Ensure the temporary file is deleted after the test completes.

Change-Id: I25fbab4c28d9489df0ed9b6cb74a068873aa9854
Issue-ID: AAI-2280
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoAdd tests for uncovered FileWatcher code 64/83764/2
mark.j.leonard [Fri, 29 Mar 2019 17:55:49 +0000 (17:55 +0000)]
Add tests for uncovered FileWatcher code

Move the onChange() method so that it can be tested.

Change-Id: I8a011ae581a16cf31e9573e6d4c9b2fa1c858b8a
Issue-ID: AAI-2280
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoMerge "Move REQUIRE_CLIENT_AUTH code to start script"
Tian Lee [Wed, 3 Apr 2019 10:34:37 +0000 (10:34 +0000)]
Merge "Move REQUIRE_CLIENT_AUTH code to start script"

5 years agoMove REQUIRE_CLIENT_AUTH code to start script 54/83754/3
mark.j.leonard [Fri, 29 Mar 2019 16:29:44 +0000 (16:29 +0000)]
Move REQUIRE_CLIENT_AUTH code to start script

Move the conversion from the REQUIRE_CLIENT_AUTH env variable to the
Spring setting server.ssl.client-auth out of the Java code and in to the
start script. This declutters the code and exposes this setting.

Refactor the code for readability: have Jetty deobfuscate the password
string for us rather than manually detecting the "OBF:" prefix.

Also fix a typo (spelling mistake).

Change-Id: Ic670c04f97f59e06e48ca2cf4d7a0188020b3eaa
Issue-ID: AAI-2280
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoMerge "Additional Logger tests for code coverage"
Tian Lee [Tue, 2 Apr 2019 16:31:04 +0000 (16:31 +0000)]
Merge "Additional Logger tests for code coverage"

5 years agoAdditional Logger tests for code coverage 03/83903/1
Mark Leonard [Mon, 1 Apr 2019 23:42:45 +0000 (00:42 +0100)]
Additional Logger tests for code coverage

Change-Id: Ib94fc61ae43d59a32fba19363b06dc7aed5a96bc
Issue-ID: AAI-2280
Signed-off-by: Mark Leonard <mark.j.leonard@gmail.com>
5 years agoException handling for image software versions 86/83886/1
mark.j.leonard [Mon, 1 Apr 2019 18:07:53 +0000 (19:07 +0100)]
Exception handling for image software versions

Throw an exception when no software versions are present for a VNF
image. This needs to be an unchecked exception when using Streams.

Change-Id: If7a429c79a614eed1dad6ed8ac1993caca47ab6d
Issue-ID: AAI-2306
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoAdditional null checks and comments 53/83753/1
mark.j.leonard [Fri, 29 Mar 2019 10:50:04 +0000 (10:50 +0000)]
Additional null checks and comments

Add defensive coding to check for possible null pointer values, thus
preventing certain potential runtime exceptions.
Fix some minor spelling inconsistencies.
Refactor some method signatures and update the Javadoc.
Reformat Resource toString() method to avoid lengthy String
concatenation and duplicated separators.

Change-Id: I4b01eb844700e00d0c909bcc5fa2dbc91d5149e4
Issue-ID: AAI-2281
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoUse checked Exception instead of RuntimeException 37/83637/1
mark.j.leonard [Thu, 28 Mar 2019 17:28:41 +0000 (17:28 +0000)]
Use checked Exception instead of RuntimeException

Replace IllegalArgumentException with XmlArtifactGenerationException in
the ArtifactGeneratorToscaParser method processResourceModels().
Add comments to explain the processing.

Change-Id: Icf401ae22ebe26d687fc58c33743582c9c9e576e
Issue-ID: AAI-2281
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoDepend on sdc-tosca version 1.5.0 33/83633/1
mark.j.leonard [Wed, 27 Mar 2019 17:13:21 +0000 (17:13 +0000)]
Depend on sdc-tosca version 1.5.0

Replace the following deprecated API methods with equivalent functions:
getGroupsOfOriginOfNodeTemplate()
getNodeTemplateCustomizationUuid()
getNodeTemplateChildren()
getServiceVfList()
getMembersOfVfModule()
getVfModulesByVf()

Create a helper class and move the remaining deprecated API calls into a
single Java file for ease of maintenance.

Change-Id: Icb08b2d66a34b0a3e717adb49f2d62e8f2e2ddb5
Issue-ID: AAI-2294
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoChange generic-vnf delete flag to true 98/83498/2
mark.j.leonard [Wed, 27 Mar 2019 15:22:08 +0000 (15:22 +0000)]
Change generic-vnf delete flag to true

Alter the test values for the generic-vnf Widget Type to match the
actual configured values used in historic deployments of the
Babel Service. The test values will then be aligned to the actual
run-time values thus avoiding any confusion caused by the disparity.

Issue-ID: AAI-2292
Change-Id: Ia8bef2e31d62027c4edb636a78c8cde93da6638b
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoRemove all references to artifactgenerator config 58/83458/2
mark.j.leonard [Tue, 26 Mar 2019 13:38:40 +0000 (13:38 +0000)]
Remove all references to artifactgenerator config

Delete the artifact-generator.properties file. Remove all related
functionality from the code.

Change-Id: I652d99b6424bb60af5820f5afb97ef139e3f9511
Issue-ID: AAI-2284
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoAllow UUID definitions in the mappings JSON 23/83323/1
mark.j.leonard [Tue, 26 Mar 2019 10:51:07 +0000 (10:51 +0000)]
Allow UUID definitions in the mappings JSON

Add support for reading the Widget invariant and version UUIDs from the
TOSCA mappings JSON. In this commit the artifact-generator.properties is
also read and used to provide default values. This step prevents any
existing deployments (e.g. automated test integration) from failing.
The redundant properties file will be deprecated in a future commit,
only when the JSON configuration has been updated.

Also remove two unused Java files to help with coverage stats.

Change-Id: Idc82e28092a2b028214225c7974db411c9f8a173
Issue-ID: AAI-2284
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoRefactor Widget creation methods 73/83273/1
mark.j.leonard [Mon, 25 Mar 2019 23:38:53 +0000 (23:38 +0000)]
Refactor Widget creation methods

Rename getWidget() to createWidget() to indicate that a new Object is
created. Add a method to create a Widget from the String representation
of its type.

Change-Id: I430acf02ea67c7b730e28e79887f8fbdb18feb42
Issue-ID: AAI-2281
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoAdditional JUnit tests for Model classes 47/83247/1
mark.j.leonard [Mon, 25 Mar 2019 18:12:48 +0000 (18:12 +0000)]
Additional JUnit tests for Model classes

Increase code coverage for Model and Service

Change-Id: I02430f470cfa6497535a372a0b18be8678279270
Issue-ID: AAI-2280
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoImprove javadoc comments and formatting 19/83219/1
mark.j.leonard [Mon, 25 Mar 2019 15:50:45 +0000 (15:50 +0000)]
Improve javadoc comments and formatting

Issue-ID: AAI-2281
Change-Id: I0f5cce16ce76113b1fee603ad3c191cb6f9fe80f
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoAdd hasWidgetType() helper method 15/83215/1
mark.j.leonard [Mon, 25 Mar 2019 15:41:12 +0000 (15:41 +0000)]
Add hasWidgetType() helper method

Replace getWidgetType() == WidgetType.valueOf("type") with
hasWidgetType("type") for improved readability.

Change-Id: Id51bed7c4cb9ce38799bf3ff34301c8feb664922
Issue-ID: AAI-2281
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoSimplify VNF Vendor Image extraction 51/83051/1
mark.j.leonard [Fri, 22 Mar 2019 14:49:33 +0000 (14:49 +0000)]
Simplify VNF Vendor Image extraction

Refactoring of the software version extraction routines to reduce
complexity.

Pass the NodeTemplates directly to the extractSoftwareVersions() method
and move the exception handling up the calling stack.
Remove the creation/usage of an intermediate Pair object.
Query for the Service VF list once only.
Use Streams rather than converting from Stream to List and back.

This change will simplify future work: either to convert sdc-tosca API
methods (that will be deprecated), or to use an alternative parser.

Change-Id: I745ced9e6095f389ee1bede37e8480dfaf65716a
Issue-ID: AAI-2281
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoNew JUnit tests for Babel auth module 38/83038/1
mark.j.leonard [Fri, 22 Mar 2019 12:17:38 +0000 (12:17 +0000)]
New JUnit tests for Babel auth module

Increase code coverage

Change-Id: I7eb50720fb20ce44ff87c0011e784a77606cf9ff
Issue-ID: AAI-2280
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoCreate new Resource objects for each new model 21/82921/1
mark.j.leonard [Thu, 21 Mar 2019 12:25:13 +0000 (12:25 +0000)]
Create new Resource objects for each new model

When creating multiple Resources of the same type, ensure that each
Resource has a new Java Object: follow the same pattern as used for
Widget types.

Change-Id: I1e41d3258a3ccdad91448234ae3cf40235d7b210
Issue-ID: AAI-2267
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoMerge "Upversion Spring-Boot to 1.5.19.RELEASE"
James Forsyth [Wed, 20 Mar 2019 20:32:16 +0000 (20:32 +0000)]
Merge "Upversion Spring-Boot to 1.5.19.RELEASE"

5 years agoUpversion Spring-Boot to 1.5.19.RELEASE 89/82689/1
Lee, Tian (tl5884) [Tue, 19 Mar 2019 16:17:37 +0000 (16:17 +0000)]
Upversion Spring-Boot to 1.5.19.RELEASE

Change-Id: I15591a0bac5849e7c1185261fcc6c765dc2d4baa
Issue-ID: AAI-2255
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
5 years agoAdd Eclipse files to .gitignore 63/82263/1
mark.j.leonard [Thu, 14 Mar 2019 15:05:28 +0000 (15:05 +0000)]
Add Eclipse files to .gitignore

Also add appconfig-local/ which is the local testing configuration
folder passed to Spring Boot as specified in the pom.xml

Change-Id: I38ccdc3a12c1161c5377117535e2f569f8423382
Issue-ID: AAI-2210
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoMerge "AAI-2210 Add .gitignore to aai/babel"
James Forsyth [Wed, 13 Mar 2019 11:35:21 +0000 (11:35 +0000)]
Merge "AAI-2210 Add .gitignore to aai/babel"

5 years agoMerge "Add missing INFO.yaml blocks"
James Forsyth [Wed, 13 Mar 2019 00:52:01 +0000 (00:52 +0000)]
Merge "Add missing INFO.yaml blocks"

5 years agoRefactor auth classes and add tests 70/81970/1
mark.j.leonard [Mon, 11 Mar 2019 17:50:07 +0000 (17:50 +0000)]
Refactor auth classes and add tests

Add new tests to give better coverage of the authorization classes.
Refactor the core class for readability.

Change-Id: I2be467d8f4492249a0c29be8b108bb2bce2818dd
Issue-ID: AAI-2229
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoTest starting application with OBF: password 55/81955/1
mark.j.leonard [Mon, 11 Mar 2019 15:37:58 +0000 (15:37 +0000)]
Test starting application with OBF: password

Test an uncovered code path. Remove the unnecessary declaration of the
Jetty OBF: prefix constant String. Ensure that the Spring Application
exits before the next JUnit test runs.

Change-Id: Iceb2e79a923359c15ca6ad366c2ac94a63e381b0
Issue-ID: AAI-2229
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoReimplement Widget.Type enum class 50/81950/1
mark.j.leonard [Mon, 11 Mar 2019 15:17:15 +0000 (15:17 +0000)]
Reimplement Widget.Type enum class

Replace this with a WidgetType dynamic enumeration, which may be
extended at runtime. Load the Widget Types from the mapping
configuration (JSON file).

Issue-ID: AAI-2229
Change-Id: I5d1bc4291b4446f6d744821bf1d74b1f117b901f
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoAdditional JUnit tests for code coverage 34/81934/1
mark.j.leonard [Mon, 11 Mar 2019 12:28:26 +0000 (12:28 +0000)]
Additional JUnit tests for code coverage

Improve code coverage to address Sonar code smells.
Include a dummy keystore file to allow the Spring Boot Application to
start up without error.

Change-Id: Ifab33a67e5d051baacfad91d3f317a8fb8b0a669
Issue-ID: AAI-2212
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
5 years agoRefactor AaiModelGenerator classes 26/81926/1
mark.j.leonard [Mon, 11 Mar 2019 11:10:50 +0000 (11:10 +0000)]
Refactor AaiModelGenerator classes

Refactor the AAI Model Generator implementation by removing duplicate
code and improving the variable and method names. This is not a rewrite.
The unnecessary interface has been removed to simpify code maintenance.

Change-Id: Ia8d630360008c7cfadefda3c04ff7b747ecd1577
Issue-ID: AAI-2212
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
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 agoAAI-2210 Add .gitignore to aai/babel 62/79662/1
Keong Lim [Tue, 5 Mar 2019 00:30:43 +0000 (11:30 +1100)]
AAI-2210 Add .gitignore to aai/babel

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>
5 years agoAdd missing INFO.yaml blocks 37/79537/1
Jessica Wagantall [Sat, 2 Mar 2019 02:45:02 +0000 (18:45 -0800)]
Add missing INFO.yaml blocks

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>
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>