summaryrefslogtreecommitdiffstats
path: root/asdctool/src/main
AgeCommit message (Collapse)AuthorFilesLines
2020-06-19Decouple TXT Report file writing and formatting logic (1/6)Francis Toth9-33/+65
This commit is the first of a series aiming to decouple the writing and formatting logic of text report files in the asdc tool. Unfortunately because of a significant amount of technical debt, a small hack had to be done so that the header of the file is not written twice. This will be removed in a future change. Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I8d2a7c1353d59562d8026088824c26ae0daa36e9 Issue-ID: SDC-2499
2020-06-18Decouple CSV Report file writing and formatting logicFrancis Toth6-30/+170
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I6168b71bb54192a806ff6aa437788bedad933c76 Issue-ID: SDC-2499
2020-06-15Fix bug in UpdateIsVnfMenuxuegao1-2/+2
Fix the unboxing bug reported by Sonar. Issue-ID: SDC-3112 Signed-off-by: xuegao <xg353y@intl.att.com> Change-Id: I4ed3f9a48ad21af2f9f67872791df2796c4e4ad1
2020-06-10Set properties on XML parsers to prevent XXE attackNeil Derraugh1-0/+4
- Set ACCESS_EXTERNAL_DTD and ACCESS_EXTERNAL_SCHEMA properties on XML parsers to prevent XXE attacks Issue-ID: SDC-3106 Signed-off-by: Neil Derraugh <neil.derraugh@yoppworks.com> Change-Id: If4e835858dd3d718d37b3ee41fb2fd0c94574c24
2020-05-28Encapsulate ReportManager's failedVerticesPerTask and resultsPerVertex in ReportFrancis Toth14-95/+159
This commit aims to encapsulate the static fields failedVerticesPerTask and resultsPerVertex in their own class (called Report). In the short terms, any state needing to be passed around will be stored there. Unfortunately, this commit required many minor changes in functions signature (to pass the Report instance). Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I3756d9a939cbd0f2856be72aa2bd24a3980dde49 Issue-ID: SDC-2499
2020-05-24Fix potential NullPointer in SchemaFileImportandre.schmid1-10/+17
While reading the YAML to import, if the content was missing the entry node_types it was causing a NullPointerException. Also the exception was being suppressed, making very difficult to understand what happened. Change-Id: I44badbee1c739ddf6db08b4e518adb33c430fa84 Issue-ID: SDC-3070 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-05-12Remove outputFullFilePath from ValidationConfigManagerFrancis Toth20-328/+323
This commit aims to extract the outputFullFilePath field from ValidationConfigManager in order to improve testability. This commit contains multiple minor modifications resulting from bubbling up the outputFullFilePath static field to where it is actually set. Most of the modifications result from changing the signature of the functions which formerly relied on ValidationConfigManager.getOutputFullFilePath. Change-Id: I0a28e527cabe606de8af62b8dcbc4b4e70db98ed Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Issue-ID: SDC-2499
2020-04-28Remove csvReportFilePath from ValidationConfigManagerFrancis Toth5-56/+55
This commit aims to extract the csvReportFilePath field from ValidationConfigManager in order to improve testability. This commit contains multiple minor modifications resulting from bubbling up the csvReportFilePath static field to where it is actually set. Put differently, most of the modifications result from changing the signature of the functions which formerly relied on ValidationConfigManager.getCSVReportFilePath. Change-Id: I82c3b0fca8a0f407319e40ecfff45e89ec1d4323 Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Issue-ID: SDC-2499
2020-04-23Added early check for null value for `containerV`Chris André1-33/+48
- Formatting code following project's code style - Added early check for null value for `containerV` Issue-ID: SDC-2905 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I648e9a4a04be3f2e7cd3e30a70c04de2257a99d3
2020-04-20Remove props from ValidationConfigManagerFrancis Toth1-30/+1
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I1c3a845c44722010e8933876e59752cef00937f0 Issue-ID: SDC-2499
2020-04-20Fix cs-init SchemaFileImport error file creationandre.schmid1-1/+1
Fix issue in SdcSchemaFileImport "STDERR: Error in file creation : data, /tmp/sdctool/tosca/data-types/data.yml (No such file or directory)", during the cassandra init. Introduced by SDC-2898. Change-Id: Ifd2018fac456f15d03fc39ea766a6ae0c3eda081 Issue-ID: SDC-2939 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-04-20Added a try-with-resource to properly close a FileInputStreamChris André1-221/+234
Issue-ID: SDC-2898 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I0a0163937ee2e760f3074d858dfc68a7b262ecd9
2020-04-20Added early check for null value for `containerV`Chris André1-33/+48
- Formatting code following project's code style - Added early check for null value for `containerV` Issue-ID: SDC-2904 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: Ib8d7c1bf36608855c73d8a0df637e86aefce9377
2020-04-19Configure a new Artifact Typeandre.schmid2-322/+6
Centralizes artifact configuration in one yaml entry. Allow the configuration of a new artifact type without the need of code changes. The configuration file now is used as a source of artifacts types instead the artifact type enum. The enum will be used as a source of base artifact types and also in hard coded business rules. Change-Id: Id0383d9fca9bce0519a4d52a4ecb3a68c8713f0f Issue-ID: SDC-2754 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-04-19Removed explicit references to exceptions in log messagesChris André1-2/+1
Issue-ID: SDC-2884 Change-Id: I6f3e9503922cc3a4f4049fced8d23cede7b0455a Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
2020-04-05Fix data type properties declarationaribeiro1-3/+3
According to TOSCA Network properties definition the keyname 'ip_version:' should have Integer as valid_values rather than String Where the keyname 'count:' is declared as a String type the default value should be String rather than Integer Fix misspelled ONAP types 'onap.datatypes.monitoring.measurementType' and 'onap.datatypes.monitoring.managedObjectDNsBasic' Fix the keynames 'upstream:' and 'downstream:' as both are declared as a String type the valid_values should be String rather than Integer Issue-ID: SDC-2864 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: I56afdf2818b5f2463fb6088cd8b468fd38ef5086
2020-04-05Fix keyname 'constraints:' according to TOSCA property definitionaribeiro1-1/+1
Issue-ID: SDC-2863 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: I955af393b4f10ca56a01bfcb2f62c37496c484d6
2020-04-01Increase test coveragevasraz4-116/+28
Change-Id: I290371a025ba3376a013ba464e4dfb601d74aa8b Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2833
2020-03-24Improve log textsLasse Kaihlavirta1-1/+1
Issue-ID: SDC-2852 Signed-off-by: Lasse Kaihlavirta <l.kaihlavirt@partner.samsung.com> Change-Id: I7a1ebfc625e297f943794046f37b15cc48d8cacb
2020-03-22Add support for simple yaml profile 1.2vasraz1-3/+3
Change-Id: I735d25c6b6c3344c4b742f09b3aeaf4d03c2d17c Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2738
2020-03-19Added new unit testsk.kedron2-66/+28
Added new unit tests to GraphMLConverter class. Fixed the Sonar issue. Issue-ID: SDC-2327 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I985a860012c0c2b0b6524c0a2346415cb113d83c
2020-03-19Increase default janusgraph timeouts for CSITLasse Kaihlavirta1-1/+4
- increase relevant timeouts to fix random (but frequent) SDC CSIT failures in sdc-cassandra-init Issue-ID: SDC-2759 Signed-off-by: Lasse Kaihlavirta <l.kaihlavirt@partner.samsung.com> Change-Id: I302b0f5676a51b362e7c3c5387803947cf93473a
2020-03-16Remove hardcoded timeoutk.kedron2-1/+1
Added configuration for wait seconds for Cassandra connector. Also, increase the timeout value to prevent tests failed. Issue-ID: SDC-2759 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I1008ecce98efdd8627ac3232b35fecd2a41a9c79
2020-03-15Remove duplicated data typearibeiro1-16/+0
Issue-ID: SDC-2826 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: I6cb4ecd9b6e479363158c6bcb1b0f1f1f52528e1
2020-03-10Added new unit testsk.kedron1-6/+11
Added new unit tests to GraphMLDataAnalyzer class. Fixed the Sonar issue. Issue-ID: SDC-2327 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I9a61dff2e9b0be1733de00b06c255abb8a3d5a8f
2020-02-18Configuration file runtime reloadandre.schmid1-2/+0
Reloads the backend configuration file when the file listener catches a change. Forces validations errors when the configuration file could not be parsed. Remove not used configurations. Change-Id: Ic6fcb2b557d52ec53074c38ab8e0fcfa96e9be67 Issue-ID: SDC-2758 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-01-30Upgrade to Cassandra 3shrek20002-14/+14
Creating base dockers suitable for Cassandra 3 remove cqlsh version Change-Id: I996bad2341410cdf45c49f191e998acf4781fc5d Issue-ID: SDC-2596 Signed-off-by: shrek2000 <oren.kleks@amdocs.com>
2020-01-22Catalog alignmentys9693100-3293/+2170
Issue-ID: SDC-2724 Signed-off-by: ys9693 <ys9693@att.com> Change-Id: I52b4aacb58cbd432ca0e1ff7ff1f7dd52099c6fe
2019-11-25Fix Sonar issuevasraz1-1/+1
Major SmellCode: Replace StringBuffer with StringBuilder Change-Id: I0283e5160e5c1f23423c66110015f18c8163411e Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2670
2019-11-03Create new non-mano Artifact Type entry for pnf software informationaribeiro1-0/+7
Issue-ID: SDC-2615 Change-Id: I4dd879d50b1dec58aceeaf0c265901c62d038071 Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
2019-10-29Fix for status properties value.aribeiro2-104/+104
These changes were made to align the normative types to the TOSCA property definition requirements. Issue-ID: SDC-322 Change-Id: I32e815dd26990dd6c82c859ad051b271db3c8029 Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
2019-10-03Fix for error message.aribeiro1-4/+4
Fixing error message for invalid values across SDC backend API. Issue-ID: SDC-2324 Change-Id: If01307138baf7692e398abf20eb75bbe9a8aa394 Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
2019-09-03Onboard Package Handlingaribeiro1-0/+1
Retain the original onboarded package when it comes in zip/csar format. Issue-ID: SDC-2510 Change-Id: Ie293db25eca8872be26ffc8475b25ccace1aab6f Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
2019-09-03General Sonar fixesArindam Mondal3-7/+5
+)Organize imports ++) log formatter Issue-ID: SDC-2542 Change-Id: Ibb4b568b19ee40a68f783bfa820bd7c73aae5c1f Signed-off-by: arindamm <arind.mondal@samsung.com>
2019-08-27General Sonar fixesArindam Mondal2-647/+491
+) Replace System.out with logger ++) Use try-with-resources to close the resource +++) Format to delete tab charachter ++++) flip equals to avoid potential NPE Issue-ID: SDC-2542 Change-Id: If57f36072ec67e9622d4fe51bce8336094dc10c8 Signed-off-by: arindamm <arind.mondal@samsung.com>
2019-08-22unit tests - asdctoolTomasz Golabek3-123/+163
Additional junit tests Change-Id: I889772efaccbc6f1555d50cd47a02d868348d310 Issue-ID: SDC-2326 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
2019-07-24Autowired annotation for catalog-beTomasz Golabek5-61/+25
Injection of the properties moved to the constructors/setters replacing field annotations. Change-Id: I766ff67e466bec5a91db1035f29e7f919d32e0ea Issue-ID: SDC-2400 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
2019-07-22Improved test for ReportManger, ArtifactValidationUtils and Sonar fixes.k.kedron1-26/+23
Add new ReportManagerHelper to read files with reports. Fixed log.info to print the types of exception in the messages. Removed redundant new lines in the report files. Issue-ID: SDC-2327 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: If0135f01a05b0936dad681d16e846a6c6560cc80
2019-07-22Improved the CsarGenerator unit tests.k.kedron1-8/+8
Improved the CsarGeneratoryTest. Checkstyle for CsarGenerator and fixed typos. Issue-ID: SDC-2327 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I8159dd47540ee3f5ed8b46f99c494c0cb24ed1d6
2019-07-22Improved unit tests for ArtifactValidationUtils and Sonar fixes.k.kedron2-30/+40
Added new tests for ArtifactValidationUtils. Checkstyle in the ValidationConfigManager and ArtifactValidationUtils. Added private constructor to ValidationConfigManager. Added logger for ArtifactValidationUtils and simplified code. Updated the ValidationConfigManagerTest and ReportManagerTests to not influence on each other. Issue-ID: SDC-2327 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I9c7c725792737b6cfa6bba20eeeb3b1d4ef1e471
2019-07-17Remove duplicated entries on error-configuration.yamlvasraz1-1780/+1769
Change-Id: Ie9caf4a01283df368fd441f8ddecc82b84caa861 Issue-ID: SDC-2455 Signed-off-by: vasraz <vasyl.razinkov@est.tech>
2019-07-16Fixing buildWojciech Sliwka1-2/+8
Change-Id: Ia75cdf511e44347294bb646add89b6c1f60f239c Issue-ID: SDC-2403 Signed-off-by: Wojciech Sliwka <wojciech.sliwka@nokia.com>
2019-07-16Constructor injection in asdctoolPiotr Darosz23-99/+253
Use constructor injection where possible Change-Id: Ibc80850166406a6e3230f555818988109e6ca776 Issue-ID: SDC-2403 Signed-off-by: Piotr Darosz <piotr.darosz@nokia.com>
2019-07-14ComponentCache & ComponentCassandraDao removalTomasz Golabek1-33/+0
Also removed all classes uses these two. Change-Id: I6793c3c935ae61c5c65f70d3541c542edf188ab4 Issue-ID: SDC-2389 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
2019-07-11Added oparent to sdc mainTomasz Golabek87-60/+1710
Removed errors regarding to a missing license and others. Started locally and executed basic api tests Change-Id: Iea37613defc97f7b40613d60c10990841cb2a209 Issue-ID: SDC-2419 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
2019-07-07Remove field injection in catalog-daoWojciech Sliwka5-12/+22
Change-Id: I24c3a898fa34491e80074944614722fbb3085515 Issue-ID: SDC-2398 Signed-off-by: Wojciech Sliwka <wojciech.sliwka@nokia.com>
2019-06-23ExportImportMenu testsTomasz Golabek1-146/+149
Main class tested and refactored Change-Id: I379a18c289b613cdc7ecbb1617618af96ffa275b Issue-ID: SDC-2326 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
2019-06-12Upgrade SDC from Titan to Janus Graphshrikantawachar37-455/+546
Upgrade SDC from Titan to Janus Graph Change-Id: I67fb8b8e60cc6751697bc5ff2f06754c92803786 Issue-ID: SDC-2296 Signed-off-by: shrikantawachar <shrikant.awachar@amdocs.com>
2019-06-10Inheritance in ComponentExceptionTomasz Golabek1-1/+2
ComponentException was split into ByActionStatus and ByResponseFormat exceptions. Test added for ComponentLockAspectTest in passing Change-Id: I89c9ee966b8b4445e791af897bd60cdb845b845b Issue-ID: SDC-2321 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
2019-06-03fix sonar: close resourcesk.kazak2-36/+46
Use try-with-resources to close file data stream Fix tests for GraphJsonValidator Change-Id: I20931b4ef815abfb8da8ebd6242b765d0b02ef23 Issue-ID: SDC-2340 Signed-off-by: k.kazak@samsung.com