261 Commits

Author SHA1 Message Date
Markus Block
ed1e7d8da2 Adding last action status code in view Rolloutgroup targets (#1295)
* added column action status code to RolloutGroupTarget view, currently bug too many rows
* changed JPA query to return also action status code
* added repository tests
* additional checks in tests
* improved jpa query to retrieve targets of rollout group
* added new property lastActionStatusCode to action for performance reasons
* added new property lastActionStatusCode to action for performance reasons
* adapted test cases
* fixing build problems on MAC with asciidoctor
* added testcase to ensure action status code is stored on action
* setting min push size to this value reduces multiple calls to the db
* renamed properties for consistency
* incorporated code review remarks
2023-01-12 12:53:23 +01:00
Florian Ruschbaschan
32718676a4 Feature/java11 build (#1280)
* hawkBit on Java 11

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Preparing java 11 build

- Update eclipse-link maven plugin dependencies
- Fixing warnings, adopt to java-11 style

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Preparing java 11 build

- Fixing warnings, adapt to java-11 style
- Added since to deprecated

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Fixing sonar warnings

- removed deprecated API

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Fixing sonar warnings & failing test

- Added suppressWarning
- added WithSpringAuthorityRule to clean-up listener

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Compile warnings

- Test if final causes issues in tests

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Removed deprecated code

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Reverted changes

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Removed final as this causes invalid reflective access exceptions

- The eclipselink generated classes seem to modify the field directly
- update plugin version

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Upgrade eclipselink from 2.7.9 to 2.7.10

* Remove @deprecated endpoints from MgmtTargetTagResource

* Remove dependencies already defined in eclipselink-maven-plugin

* Try eclipselink 2.7.11-RC1

* Set project encoding to UTF-8

* Upgrade surefire and failsafe plugins to 3.0.0-M7

* Try fixed string instead of a random generated one

* Replace JsonBuilder by Jackson ObjectMapper usage

* Use JsonBuilder again

* Use APPLICATION_JSON_UTF8 instead of APPLICATION_JSON

* Try to replace com.vaadin.external.google:android-json by org.json:json

* Add debugging outputs

* Improve debugging outputs

* Improve debugging outputs

* Use Jackson instead of JsonBuilder

* Use Jackson instead of JsonBuilder 2nd part

* Use Spring json dependency

* Use eclipselink 2.7.11

* Fix RootControllerDocumentationTest

* Improve helper methods of AbstractDDiApiIntegrationTest

* Upgrade SpringBoot and SpringCloud versions

* Improve deprecation notice for 0.3.0M8

* Fix BaseAmqpServiceTest

* Fix SpecificationsBuilderTest

* Removed deprecated code

* Define maven-enforcer-plugin version

* Remove com.google.code.findbugs.jsr305

Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io>

* Update circleci image to openjdk:openjdk:11.0.13-jdk-buster

Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io>

* Fix javadoc generation and license check

Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io>

* Fix review findings

Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io>

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>
Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>
Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io>
Co-authored-by: Dominic Schabel <dominic.schabel@bosch.io>
Co-authored-by: Peter Vigier <Peter.Vigier@bosch.io>
Co-authored-by: Markus Block <markus.block@bosch-si.com>
2022-09-19 10:33:31 +02:00
Dimitar Shterev
bc2f228edc Dmf batch support changes. (#1273)
* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Update hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AmqpMessageDispatcherServiceIntegrationTest.java

Co-authored-by: Bondar Bogdan <36962546+bogdan-bondar@users.noreply.github.com>

* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Dmf batch support changes. Implement code review comments.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>
Co-authored-by: Bondar Bogdan <36962546+bogdan-bondar@users.noreply.github.com>
2022-08-30 09:55:52 +02:00
Michael Herdt
f0a7c2d07d Improve target management (#1260)
* Fix join type for targets with their assignedDs

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Override saveAll method and make use of it in the JpaTargetManagement

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Use unmodifiable list and flip transactional logic

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Initialize new list instead of an unmodifiable list.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Fix testdata factory

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
2022-07-01 13:47:00 +02:00
Ahmed Sayed
949cd8cd8b Feature/speedup quota tests (#1125)
* reduce the number of created entities in tests

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* fixed tests

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* fixed review findings

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* merged master

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* adapted target count

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* fixed review findings

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* fixed RolloutManagementTest

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* fixed flaky test ConcurrentDistributionSetInvalidationTest

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>
2022-02-21 12:58:05 +01:00
Peter Vigier
44a85f20eb Feature/fix sonar warnings (#1226)
* Fixed sonar warnings

- "Cognitive Complexity"
- "Do not use replaceAll when not using a regex"
- java:S5869 - Character classes in regular expressions should not contain the same character twice
- Improved bad name
- Typos
- reduced code duplications
- Replaced hand-made wait-utility with Awaitility
- Log messages
- Duplicate code
- Typos
- Removed Thread.sleep, instead relaxed check condition
- Removed use of deprecated API
- Removed use of deprecated API
- Added supress-warnings as I do not see a better way to write the tests
- Removed Thread.sleep / redundant functionality to Awaitility
- Fixed other warnings (use isZero, isEmpty, hasToString)
- Removed/Reduced duplicate code
- Added generics
- Fixed asserts
- removed: field.setAccessible(true) actually should not be needed for public static fields!
- Too long constructor passes arguments in wrong order - how surprisingly...
- Clean-up use of varargs arguments
- Fixed regex
- Fixed typos and other minor stuff
- Making public constructors protected in abstract classes
- Swapped expected and asserted argument
- volatile not enough for syncing threads
- volatile not enough for syncing threads
- out-commented code
- Made regex not-greedy, added tests for verification
- Avoid exposure of thread-local member var

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Fixed Sonar warnings

* License header fix

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* License header fix #2

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Fixing review findings

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Fixing tests

- Fixed '&' usage in javadoc and typos
- Fixing some warnings

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>
2022-01-31 21:59:46 +01:00
Bondar Bogdan
146735012a Artifact Encryption plug point (#1202)
* added ArtifactEncryption interface, injected it into SM creation UI module, added encryption metadata key generation upon SM creation, used encryptor during file upload

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* add default artifact encryption implementation based on gcm aes algorithm

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* changed ArtifactEncryptor interface to manage encryption secrets by itself

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* cleaned up stale code, fixed sonar

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* fixed software module encryption within transaction

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added artifact encryption secrets store

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* extended ArtifactEncryption interface to allow decryption, secrets store provides removeSecret, added missing javadocs

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* intriduced DbArtifact interface, use EncryptionAwareDbArtifact for artifact decryption during download

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* introduced ArtifactEncryptionService to minimize duplications and unneccessary dependency injections

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* declared ArtifactEncryptionService as a bean

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added persistant encryption flag to software module

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* further adptations for encryption flag persistence

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added ArtifactEncryptionException, fixed encryption check in UI

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added encryption error handling

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added encrypted flag to DDI/DMF, adapted exception handling

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* adapted rest docs

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* Add test to verify artifact encryption is not given by default

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Add isEncrypted() to toString() of JpaSoftwareModule, fix typos

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Fix sql migration scripts

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Calculate encrypted artifact size by subtract encryption size overhead

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* publish upload failed without waiting for interuption during UI file upload

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* upgraded cron utils to 9.1.6

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

Co-authored-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>
2021-11-18 09:07:05 +01:00
Anand Kumar
70779d1ac7 Feature target type filter (#1197)
* Added Target type filter with drag and drop support

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Removed the unused enums and target type filter button class

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Resolved merge conflicts

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed java doc issue with the method link in the comment

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed the IN query overflow for target Type assignment

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed Review comments

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>
2021-10-27 15:24:09 +02:00
Robert Sing
dea6fa3ce6 Adapt UI for target type compatibility check (#1189)
* Added compatibility calls needed for UI

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* Adapted UI for target type compatibility checks

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* improved exception handling for incompatibility check

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* added & fixed unit tests

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed merged conflicts

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed target type incompatibly specification

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* changed UI behaviour to close assignment popup in case of IncompatibleTargetTypeException

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* added unit test to validate incompatibly specification fix

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review findings

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review findings

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fix potential null pointer

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* Fixed rolloutcopy by adding dsTypeId to ProxyDistributionSetInfo

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* suppressed warning

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>
2021-10-22 16:23:25 +02:00
Robert Sing
76be812cf1 Feature - TargetType compatibility check (#1180)
* added targettype compatibility check in deployment

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* added targettype compatibility for autssignment

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* added / fixed tests for auto assignment compatibility check

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* adapted rollout creation to use JPA specifications for compatibility checks

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fix unit tests and javadoc

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fix copyright header

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review findings

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review findings

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* replaced validated-DS management calls

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* improved compatibility check in DeploymentManagementTest

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review findings

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>
2021-10-15 15:39:21 +02:00
Sebastian Firsching
825cb64448 Introduce basic functionality for invalidation of distributionsets (#1179)
* Basic DS invalidation functionality

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add checks for valid/complete DS

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Stop rollouts + auto assignments when invalidating a DS

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add methods to count AAs + rollouts for invalidation

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Small refactoring for DS management

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add invalidation functionality to REST API

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix update stopped rollouts status

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add various tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Introduce countActionsForInvalidation

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix event tests with incomplete DS

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add H2 migration script

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix action count method

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix REST documentation tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Change flyway version number

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add lock for DS invalidation + adapt tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Move concurrency test to own class

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Handle possible InterruptedException

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix concurrency test

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Use one transaction for all invalidations

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add invalidate endpoint to REST docu

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Execute invalidation in transaction when actions are cancelled

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Check that distribution set is valid when editing/creating metadata

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Remove all changes in UI

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add DB migration files for all databases

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Implement review findings

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Move DS invalidation to own class to check permissions for single steps

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Move invalidation count methods to management classes

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix failing tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
2021-09-30 15:26:36 +02:00
Natalia Kislicyn
b5fcb48ab1 Colour property in Mgmt API response for DS/SM type (#1174)
* Update name SP to hawkbit in api guide adocs

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix javadoc class descriptions of existing resource/api classes

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add color property to api response of ds/sw type

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add color property to sw type test data & adapt rest docu

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add missing property description for "colour" and "deleted"

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix review findings

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2021-09-02 10:09:17 +02:00
Bondar Bogdan
87199937c4 Dependency upgrades (#1170)
* Increase jsoup version

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* bumped vaadin/guava/common-io to newest versions

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* substituted deprecated guava create temp dir method

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2021-08-30 15:39:23 +02:00
Anand Kumar
3fa1dd1be4 Feature target type entity (#1162)
* Added Target Type model

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added Target Type JPA model

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added Target Type repository model classes

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Removed the name entity from Target Type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Refactored the Target Type models

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added the DB migration script and updated the Target Type models

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target type in target Mapper

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Changed the target type ID to Long

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added MYSQL DB migration script and removed the deleted column for target type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Updated the DB migration script for target table

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added manyToMany reltation between target type and Ds type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added POSTGRESQL DB migration script

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added MSSQL SERVER DB migration script

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added DB2 DB migration script

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added missing license header and java docs

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added on delete cascade in DB migration script

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added Target Type specification

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Removed the delete cascade and Added type API
Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* fixed API doc build

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target type management test

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target type events test

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target type update and unassign to target

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added API tests for assigning target type to target

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added missing license header

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added missing docs

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed sonar issues

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed license header build issue

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Updated the attribute name to target type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed the review comments

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Removed unused error status variable

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target API to assign target type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added the tests for assigning target type to target

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed the review comments for null check

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>
2021-08-25 12:13:27 +02:00
Stefan Behl
cf67467fb5 Execute rollouts and auto assignments in the correct user context (#1100)
* Execute rollouts and auto assignments in correct user context

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>

* Cleanup usage of lenient

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
2021-04-15 12:23:14 +02:00
Florian Ruschbaschan
41922b6dca Feature/remove junit5 leftovers (#1097)
* Migrate JUnit4 leftovers to JUnit5

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Fix method name typos

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Avoid unnecessary Mockito stubbings

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Replace assertThrows by assertThatExceptionOfType, fix test TODO

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>
2021-03-22 10:37:31 +01:00
Dominic Schabel
81defa10a6 Migration to JUnit5 as default test runtime (#1082)
* Migrate tests to JUnit5

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* REST docs tests migrated to JUnit5

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Migrated security and UI tests to JUnit5

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Migrated management tests to JUnit5

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Reflecting changes from JUnit5 migration

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Fix RabbitMQ test detection

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Drop support for JUnit4

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>
2021-03-15 13:40:40 +01:00
Ammar Bikic
ac8c174b2c Merge remote-tracking branch 'origin/master' into fix_migration_to_new_spring_boot_version_merge_master
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2021-01-15 17:28:49 +01:00
Kai Zimmermann
e9f11d2a20 DB and RabbitMQ integration tests and PostgreSQL testing/bug fixing (#1047)
* Initial matrixSigned-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* License header

* MySQL DB testSigned-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Create matrix for DBsSigned-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* RabbitMQ and H2Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* MySQL 8.0Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Postgresql test supportSigned-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Postgresql test supportSigned-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Fix DB issues post and mssql

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Wait MSSQL

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Fix postgresql tests.

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* MSSQL startup fix.Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Fix syntax error

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Further fix postgres tests.Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Revert unnecessary changes.

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Add SonarCloud Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Simplify devcontainer. Test JDK 15Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>
2021-01-14 09:07:03 +01:00
Ammar Bikic
165f6e0435 Change to proper versioning
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2020-11-03 09:59:21 +01:00
Ammar Bikic
28b65a290d Update Spring Boot to 2.3.2
-Update Spring Cloud to Hoxton.SR7
-Replace ResourceSupport by RepresentationModel (Spring Hateoas 1.0)
-Replace ControllerLinkBuilder by WebMvcLinkBuilder (Spring Hateoas 1.0)
-Move getId() from Identifiable to BaseEntity (Spring Hateoas 1.0)
-Remove hamcrest.Factory
-Use static Sort.by reference
-Place http security anyRequest().authenticated()
-Replace MockMvcRequestBuilders.fileUpload by MockMvcRequestBuilders.multipart
-Deprecate MEDIA_TYPE_CBOR_UTF8
-Replace MEDIA_TYPE_CBOR_UTF8 by MEDIA_TYPE_CBOR in tests
-Replace HAL_JSON_UTF8 by HAL_JSON in tests
-Replace APPLICATION_JSON_UTF8 by APPLICATION_JSON in tests
-Use org.mockito.junit.MockitoJUnitRunner
-Remove overridden dependency versions
-Removing not needed comments in pom.xml
-Downgrade flyway-core to be MySQL 5.6 compatible
-Add maven-site-plugin since it was removed with spring-boot 2.3
-Set servlet encoding properties
-Introducing Test that verifies the charset inside the content-type of a response
-Add @DirtiesContext to CorsTest and ContentTypeTest
-Add content-type mockmvc test with adapted mockmvc config
-Move encoding.force property to test class
-Switch expected and actual parameter values in content-type test
-Delete deprecated content-type test with TestRestTemplate
-Exclude JUnit5 from spring-boot-starter-test
-Upgrade allure-junit4 to 2.13.5
-Add aspectjweaver 1.9.6 to surefire test execution
-Add flyway-core version to property
-Use getRequiredLink() within MgmtBaseEntity.getId()

Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2020-10-02 18:11:18 +02:00
Sebastian Firsching
8d3ba68be9 Fix already assigned targets (#919)
* Dont count not existing targets as already assigned to DS

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add test for deploymentManagement

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Delete 404 error message from docs when target is not found

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add text to implementation notes

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add assertions to test

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add expected behaviour to test description

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Refactor deploymentMgmtTest

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Filter out non-existing controllerIds

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Extend test descriptions

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Refactor createTargets method

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add createTargetAndJsonArray method

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Correct expected test result

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Adapt rest docs

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Correct test

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Only count targets that exist for total and adapt test

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Use only existign targetWithActionTypes for assignment

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Rename targetIds to providedTargetIds

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
2020-01-13 12:41:59 +01:00
Stefan Klotz
9cb5d31396 Prioritisation of assignments via mgmt-API (#895)
* Updating the schema for targetfilterquery and rollout
* Updating the weight validation logic and tests
* Make weight optional
* Fix existing multi assignment tests by adding weight, remove weight from TargetFilterQuery
* Add weight validation tests, fix tests
* Add mgmt api tests for assignment and getting action with weight
* Add management layer validation and tests for creating rollouts with weight
* Fix amqp test, add repo level validation to resource tests
* Add weight to rollout mgmt-api and tests
* Add weight to mgmt api target Filter create and update
* Add target filter auto assign weight. disable enforcement of setting a weight in multiassign mode
* Remove ignored tests, fix api doc
* Fix minor findings
* Fix findings
* Remove hardcoded min weight
* Add docu text, fix findings
* Fix api documentation
* Expose weight via DMF
* Expose actions according to weight via ddi
* Fix documentation
* Add method to get actions ordered by weight to deploymentManagement
* Updating the schema for targetfilterquery and rollout
* Updated the indentation
* Updated the helper class, fixed the randomUID in test factory
* Updated the class name with prefix JPA
* Adding the missing License for WeightValidationHelper class
* Adding documentation to the dmf api on weight
* Removed the merger markers
* Updated the class name
* Removed the redundant method
* Addressed final PR comments
* Updated the missing testcase with latest default weight value
* Reverting the default value of weight back to 1000 and updated tests

Signed-off-by: Shruthi Manavalli Ramanna <shruthimanavalli.ramanna@bosch-si.com>
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
2019-11-08 10:47:35 +01:00
Ammar Bikic
af0f7ceb5a Feature add optional name to thing created (#888)
* First implementation pushed because of debugging purpose

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Add name field and tests regarding name field functionality in THING_CREATED

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* SonarQube realted changes in name field functionality in THING_CREATED

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Add name field and tests regarding name field functionality in UPDATE_ATTRIBUTES

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Adapt documentation due to name field in THING_CREATED and UPDATE_ATTRIBUTES

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Add integration tests regarding name field functionality in THING_CREATED

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Reformat after finding format bug regarding THING_CREATED

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Reformat after finding the real format bug regarding THING_CREATED

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Reformat regarding THING_CREATED

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Use constant in THING_CREATED

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Format in THING_CREATED

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Resolving peer review comments regarding THING_CREATED

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Resolving peer review comments (organize imports) regarding THING_CREATED

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Refactoring regarding THING_CREATED

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Refactoring due to peer review

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Refactoring due to peer review

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Excluding UPDATE_ATTRIBUTES changes and provide functionality of updating the name property in THING_CREATED message

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Refactoring due to peer review

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Refactoring due to peer review

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Fix SonarQube finding

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Merge master into current branch

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>

* Fix peer review findings

Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>
2019-10-24 12:13:35 +02:00
Stefan Klotz
8687510131 Assign multiple distribution sets to a target via mgmt api (#886)
* Add multiassignment to mgmt api target endpoint
* Remove single assignment ds to targets offline
* Fix tests
* Add quota for maxResultingActionsPerManualAssignment
* Fix assignment with same target or distribution set multiple times in one request
* Log UI error
* Add tests
* Enable single assignment requests with multiple DSs and types
* Remove redundant target to DS assignment methods
* Add tests, fix assignment
* Fix possible nullpointer during target assignment request
* Update api docu
* Clean up deployment management code
* Enforce MaxActions quota for offline assignment
* Fix review findings
* Rename property, add migration into
* Add builder for DeploymentRequest
* Change offline assignment method to accept an assignment list, like online assignment
* Fix PR findings

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
2019-09-17 14:20:26 +02:00
Ahmed Sayed
d40b11d2ab introduced open actionIds in MgmtTargetAssignmentResponseBody (#864)
* introduced open actionIds in MgmtTargetAssignmentResponseBody

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* fixed SonarQube issues

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* removed unused method parameter

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* updated documentation tests

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* added limit to the alreadyAssignedActions in the AssignmentResult

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* moved alreadyAssignedActions limitation to MgmtDistributionSetMapper

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* fixed review findings

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* removed alreadyAssignedActions

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* fixed sonarQube issues

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* fixed compilation error

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* fixed PR review findings

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* fixed PR review findings

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* Renamed AssignmentResult to AbstractAssignmentResult

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* fixed review findings

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* fixed formatting

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* reverted method visibility

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
2019-08-20 11:31:20 +02:00
Bondar Bogdan
c68c5a6f5b Feature event publishing (#884)
* refactored code to use EventPublisherHolder for publishing application events where possible

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* fixed comment

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
2019-08-14 09:08:23 +02:00
Ahmed Sayed
4640b8ad5e refactored DdiDeploymentBaseTest.java (#853)
* refactored DdiDeploymentBaseTest.java
* removed hardcoded variables, moved createArtifact() to TestDataFactory

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
2019-06-21 11:12:21 +02:00
Nazife Basbaz
fde0cbdf16 fix bug: change sql-query in localArtifactRepository (#820)
Also-by: Nazife Basbaz <nazife.basbaz@bosch-si.com>
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
2019-06-05 16:07:07 +02:00
Ahmed Sayed
ed95ae6398 Feature download only (#810)
* Added initial version of DOWNLOAD_ONLY
* Added DOWNLOAD_ONLY option to ActionTypeOptionGroupLayout
* Removed DOWNLOAD_ONLY checkbox, added Download Only UI option
* Mark actions that finished with DOWNLOADED as finished
* initial changes to realize downoadOnly in UI
* Changed method of disabling maintenanceWindow into smarter solution
* Added new icon for download only option
* Set DistributionSet as unassigned when DOWNLOAD_ONLY
* Enabled update action status for DOWNLOAD_ONLY after download
* Current state of abstraction task
* Assign DistributionSet to target if target installs it after downloading
* Abstracted class redundant methods
* Added tests
* Fixed Rollout finish status for DWONLOAD_ONLY Rollouts
* Added Rollout type json property in test documentation
* Added DOWNLOAD_ONLY test for target assignment
* Added event listener also to DistributionTable
* Fixed event listener problem
* Change column name to "Type" and added also DownloadOnly icon to that column.
* Cleanup
* Center aligned the icons in type column
* Fixed DistributionSet already assigned but not installed
* Rename download_only to downloadonly
* Further changes regarding center aligned the icons
* Fixed target assign status in Rollout view when download_only
* Fixed SonarQube issues
* Fixed SonarQube issues + code formatting
* Fixed Tests
* Marked squid:S128 as suppressed - irrelevant
* Adapting rollouts view by additional column (not finished by now)
* Putted type column on proper position
* Trying to display icons in new type column in rollouts view
* Added icon also for soft, icon might change -> just change
* createOptionGroup method in ActionTypeOptionGroupLayout class
* added first draft of type column in rollouts view
* increase visibility of sendUpdateMessageToTarget method
* Ground functionality of new type column in deployment view is now implemented
* Type column implementation in rollouts view is finished for now
* Rebased on master
* Fixed DurationControl change on ScheduleControl change.
* (Re)Added Soft deployment Icon
* Fixed SonarQube issues
* Fixed SonarQube issues
* Fixed failing test
* Fixes + added missing header
* Added message to the fail() instruction
* Fixed copyright header
* Apply suggestions from code review
* Fixed TotalTargetCountStatus.java
* Removed unused method from TotalTargetCountStatus.java
* add id to rollout create and update UI popup
* Added download_only tests for MgmtTargetResourceTest.java
* added missing header in TotalTargetCountStatusTest.java
* Rename because of newest changes
* added Download_Only dmf integration tests
* Renamed MgmtAction.forcedType to actionType
* renamed actionType to forceType for Mgmt API
* added missing javadocs for public methods
* Added Download Only support for AutoAssignment

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
Signed-off-by: Ammar Bikic <ammar.bikic@bosch-si.com>
2019-04-17 12:27:23 +02:00
Bondar Bogdan
473b6b2cc5 Feature extend target attributes constraints (#799)
* extended target attributes key limit to 128 characters

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* fixed tests

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
2019-02-25 14:54:30 +01:00
Kai Zimmermann
f9a7194fd5 Fix JavaDoc syntax errors. Add check to circle build. (#791)
* Fix JavaDoc syntax errors. Add check to circle build.

* One more code error

* Added missing tags.
2019-02-01 10:31:40 +01:00
Kai Zimmermann
d52a720480 Spring Boot 2.0 (#721)
* Migration to Boot 2.0.

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>
2019-01-31 07:29:27 +01:00
Stefan Klotz
20d84a10eb Fix artifact filename validation (#770)
* use validated ArtifactUpload object when creating a new artifact

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* rename method

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* add regular expression classes

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* add filename validation to UI upload button

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* move filename validation to uploadStarted

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* clean up code for UI error handling during artifact upload, assert
filename validation

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* update visibilities

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* clean up code

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* clean up code

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* change RegexChar class to enum and use i18n

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* typo, use StringBuilder

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* typo

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* use dedicated class for collections of regular expression characters

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* remove Optional, remove stringBuilder

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* PR findings

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* make regex validation method static

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* use WhiteListType.NONE for filename validation via mgmt-api

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
2018-12-17 10:17:46 +01:00
Bondar Bogdan
b2dfd4a99e Feature target metadata filter (#767)
* implemented RSQL query filter for target metadata

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* refactored rsql fields providers code for targets, distribution sets and software modules for consistency, fixed predicate grouping for map fields in rsql utility

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* extended tests for target management rsql queries with target metadata

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* extended target management test for RSQL not equal case of target metadata, added a suggestion of comparator operators when map key ends with = or ! symbol in Target Filter View

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* Fixed peer review findings

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* small test fixes: seconds are respected while scheduling the maintenance window, redundant ds-target assignment statement removed

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
2018-11-28 14:09:52 +01:00
Kai Zimmermann
ac931ec8fa Master now on 0.3 2018-06-11 15:57:15 +02:00
Michael Müller
cef7c2bbf2 Feature Approval Workflow for rollouts (#678)
* implement feature approval workflow

Signed-off-by: Ioannis Spyropoulos <ioannis.spyropoulos@bosch-si.com>
Signed-off-by: Michael Müller <Michael.Mueller17@bosch-si.com>

* add documentation for REST endpoints

Signed-off-by: Ioannis Spyropoulos <ioannis.spyropoulos@bosch-si.com>
Signed-off-by: Michael Müller <Michael.Mueller17@bosch-si.com>

* fix broken documentation test

Signed-off-by: Ioannis Spyropoulos <ioannis.spyropoulos@bosch-si.com>

* fix broken documentation test II

Signed-off-by: Ioannis Spyropoulos <ioannis.spyropoulos@bosch-si.com>
2018-06-04 16:36:56 +02:00
Bondar Bogdan
b5114081be Integrated Maintenance Window fields in Management API and UI (#677)
* Added Maintenance Window properties to API and UI

* extended Management API with Maintenance Window schedule, duration, timezone and nextAt properties
* extended integration tests for the above properties
* extended Management UI with Maintenance Window column in Action History grid, added tooltip for next execution
* general refactoring

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* fixed Sonar issues

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* changed the documentation help link for maintenance window

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* added licence header, first refactoring after partial PR review

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* changes related to PR review findings

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* last PR review findings

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
2018-05-15 11:12:33 +02:00
Stefan Behl
6dd98d2134 Protection against misuse with system-wide quota definitions (#670)
* Added quota for meta data per software module

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Added unit test for "meta data per module" quota

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* quota test enhancements

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Verify enforcement of meta data quota via REST

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Quota for distribution set meta data

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Verify enforcement of distribution set meta data quota via REST

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* software modules per distribution set quota

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Integration test enhancements for Modules per DistSet quota

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Quota for software module types per distribution set type

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Quota for max artifacts per software module

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Quotas for ActionStatus per Action and Messages per ActionStatus

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Quota attributes per target

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Quota targets per rollout group

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Quota max targets per rollout group

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per rollout group

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per rollout group

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per rollout group

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per group

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* quota max actions per target

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per rollout group

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max actions per target

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max actions per target

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per auto assignment

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per manual assignment

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per auto assignment

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per auto assign

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per auto assignment

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max actions per target

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per manual assignment

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix issues caused by merge

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Improve JavaDoc

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix Sonar issues

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix Sonar findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max artifact size

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Optimize quota configuration

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix test failures

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Improve test coverage

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max rollout groups per rollout

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Configure Rollout UI enhancements

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* UI enhancements

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Minor changes

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per group

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Quota max targets per group

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix Sonar findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix Sonar findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix Sonar finding

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix code review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* New approach for 'max artifact size' enforcement

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix Sonar findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Reduce max artifact size for tests

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix Kai's review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
2018-05-02 12:09:29 +02:00
Bondar Bogdan
d9fc3c0e31 Introduced deleted flag in REST API (#665)
* — refactored distribution set update test, changed rollout test steps to check if deleted flag is set to false
— added deleted json property for soft deletion of rollout, distribution set, distribution set type, software module, software module type, covered relevant get and put requests with tests

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* Changed deleted flag json property to primitive boolean type, tests refactoring

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* Deleted flag getters renaming

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
2018-03-26 18:11:16 +02:00
Kai Zimmermann
1f43862618 Support for MS SQL Server and RabbitMQ 3.7 (#656)
* SQL server support.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Complete SQL server setup.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* DB2 support.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Add new rabbit http client version.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Cleanup JDBC driver dependencies.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix test.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Complete test utils for MSSQL.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Add and fix comments

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix Javadoc

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Removed super constr call

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fixed merge bug.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Remove non null migrations. Won't work in production.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Added config profile for MS SQL server according to MySQL configuration

Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>

* Minor fix in status column

Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>
2018-03-13 16:41:10 +01:00
stormc
f4278c45ef 245 maintenance window (#535)
* Maintenance Window: Introduced dynamic update to polling time. (#245)

Resolves #245

Added new configuration parameters and controller handling that can be
used to enable reduction in polling time near to start of a maintenance
window.

- The device may only get to know of start of maintenance window when
the device polls the server. If a window is available, server responds
with maintenanceWindow as 'available' and the update as 'forced'. Hence,
as the time for start of a maintenance window approaches, the device
should poll the server more often in order to decrease the possibility
of missing the maintenance window start time due to non-alignment of
polling with the start time, or due to packet losses and other network
issues.

- Additional configuration parameter is introduced that will be used to
specify the minimum number of times the controller should poll between
current time and the start of maintenance window. Using this parameter,
an "inverse exponential back-off" scheme for reducing the polling time
is implemented.

- Implemented inverse exponential back-off for polling.
For example, considering default polling-time = 00:05:00,
min-polling-time = 00:00:30, maintenance-window-poll-count = 3, we
expect that controller should poll the server 3 times between current
time and start of a maintenance window. Thus in following scenario
controller will get to know of start of maintenance 3 secs after
scheduled start. Whereas without this scheme, delay may be as much as 4
minutes.
time until start: 00:21:00; polling time: 00:05:00
time until start: 00:16:00; polling time: 00:05:00
time until start: 00:11:00; polling time: 00:03:40
time until start: 00:07:20; polling time: 00:02:27
time until start: 00:04:53; polling time: 00:01:38
time until start: 00:02:10; polling time: 00:00:43
time until start: 00:01:27; polling time: 00:00:30
time until start: 00:00:57; polling time: 00:00:30
time until start: 00:00:27; polling time: 00:00:30
time until start: -00:00:03; polling time: 00:05:00

- Once a maintenance window starts, the polling time is reverted to
default. Polling time is not changed near the end of a maintenance
window.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com>
Signed-off-by: Raju HS <raju.hs@siemens.com>

* Maintenance Window: Updated the DMF API.

Added maintenance window handling for DMF API. Currently no timer or
scheduler is used to send updates to devices when a maintenance window
becomes available. The device can simulate a poll behaviour by sending a
message on UPDATE_ACTION_STATUS topic. Depending on whether there is a
maintenance window available or not, server should send
DOWNLOAD_AND_INSTALL or DOWNLOAD_AND_SKIP.

- Additional action status (DOWNLOADED) and event topic
(DOWNLOAD_AND_SKIP)

- Server sends DOWNLOAD_AND_SKIP or DOWNLOAD_AND_INSTALL based on
maintenance window using ControllerManagement

Signed-off-by: Christian Storm <christian.storm@siemens.com>
Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com>
Signed-off-by: Raju HS <raju.hs@siemens.com>

* Maintenance Window: Added tests for DDI and Management APIs.

Added test cases for DDI and Management API to test for maintenance
window related logic.

- Tests for Management API for DistributionSet assignment with and
without valid maintenance schedule specified.

- Tests for lapsed maintenance schedule.

- Additional test helper methods.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com>
Signed-off-by: Raju HS <raju.hs@siemens.com>

* Maintenance Window: Added new fields, enums, APIs and helper classes.

Extended the data model and Action API to support maintenance schedule.
Also provided helper classes to parse cron expression and calculate
maintenance window based on the schedule.

- DOWNLOADED status added to Action interface for controller to record
action status.

- Extra fields and APIs are added to Action to set schedule, duration
and time zone of maintenance window.

- Maintenance schedule can be defined using: a cron expression (e.g. "0
30 10-13 ? * WED,FRI" for 30 minutes past the hour, between 10:00 AM
and 01:59 PM, only on Wednesday and Friday), a duration (e.g. "00:30:00"
for 30 minutes) and the time zone (e.g. "+02:00" for CET summer time or
"+00:00" for UTC) relative to which maintenance window start time is
calculated.

- Extra APIs added to check if a maintenance schedule is defined or
lapsed and if a maintenance window is available based on the schedule.

- Added database fields to store the schedule, duration and timezone of
maintenance window.

- Added helper classes to parse and calculate the maintenance window
schedule.

- Added exception handling classes to handle invalid maintenance window
schedule.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com>
Signed-off-by: Raju HS <raju.hs@siemens.com>

* Maintenance Window: Extended JSON model for REST APIs.

Extended the JSON model to support defining and communicating the
maintenance window information using the REST APIs.

- Additional JSON objects are defined to extend request and response
bodies.

- When requesting a distribution set assignment to a target, the
maintenance schedule information can be specified. Example below
specifies a maintenance schedule at 11:00 PM, only on Saturday, only in
2017, for 30 minutes. Maintenance window start time is then calculated
relative to the time zone specified, in this case CET summer time.
$ curl 'http://127.0.0.1:8080/rest/v1/targets/2/assignedDS' -i -X POST
-H 'Content-Type: application/json;charset=UTF-8' -d '{
    "forcetime" : "0",
    "id" : "1",
    "type" : "forced",
    "maintenanceWindow": {
        "schedule": "0 0 23 ? * SAT 2017",
        "duration": "00:30:00",
        "timezone": "+02:00"
    }
}'

- When device requests the action information it gets to know if there
is a 'maintenance schedule' for this action or not based on presence of
maintenanceWindow field in the response. The value of maintenanceWindow
is either 'available' (i.e. the maintenance window is now available as
per defined schedule and the update can progress) or 'unavailable'
(implying that maintenance window is not available now and update should
not be attempted). If there is no 'maintenance schedule' defined, the
field is null or not present.
$ curl
'http://127.0.0.1:8080/default/controller/v1/2/deploymentBase/1?c=411629670'
-i -H 'Accept: application/hal+json'
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 1665
{
    "id": "1",
    "deployment": {
        "download": "forced",
        "update": "forced",
        "chunks": [ {
            "part": "os",
            "version": "1",
            "name": "1",
            "artifacts" : [ {
                "filename" : "binary.tgz",
                "hashes" : {
                    "sha1" : "8b71973e835cd0718827238b1cf89f0079e44dae",
                    "md5" : "a90218782025c48e09ba0436cf30d029"
                },
                "size" : 5,
               "_links" : {
                    "download" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz"
                    },
                    "md5sum" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM"
                    },
                    "download-http" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz"
                    },
                    "md5sum-http" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM"
                    }
                }
            } ]
        } ],
        "maintenanceWindow": "available"
    }
}

Signed-off-by: Christian Storm <christian.storm@siemens.com>
Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com>
Signed-off-by: Raju HS <raju.hs@siemens.com>

* Maintenance Window: Added additional UI elements.

Added additional UI elements to specify maintenance window schedule in
hawkBit UI while assigning distribution set(s) to target(s).

- Added UI control to hawkBit UI when distribution set assignment is
confirmed.

- Also added required theme updates and resource strings.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com>
Signed-off-by: Raju HS <raju.hs@siemens.com>

* Maintenance Window: Modified DDI and Mgmt APIs for maintenance window.

Modified controller management and deployment management to handle
maintenance window schedule in Management API and DDI API.

- Modified REST endpoints to accept and respond with maintenance window
information.

$ curl 'http://127.0.0.1:8080/rest/v1/targets/2/assignedDS' -i -X POST
-H 'Content-Type: application/json;charset=UTF-8' -d '{
    "forcetime" : "0",
    "id" : "1",
    "type" : "forced",
    "maintenanceWindow": {
        "schedule": "0 0 23 ? * SAT 2017",
        "duration": "00:30:00",
        "timezone": "+02:00"
    }
}'

- Check for availability of a maintenance window based on the schedule.

- Device gets go-ahead to install by change in ETAG and 'update' status
to 'forced' when it polls during an available maintenance window.

$ curl
'http://127.0.0.1:8080/default/controller/v1/2/deploymentBase/1?c=411659461'
-i -H 'Accept: application/hal+json'
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 1665
{
    "id": "1",
    "deployment": {
        "download": "forced",
        "update": "forced",
        "chunks": [ {
            "part": "os",
            "version": "1",
            "name": "1",
            "artifacts" : [ {
                "filename" : "binary.tgz",
                "hashes" : {
                    "sha1" : "8b71973e835cd0718827238b1cf89f0079e44dae",
                    "md5" : "a90218782025c48e09ba0436cf30d029"
                },
                "size" : 5,
                "_links" : {
                    "download" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz"
                    },
                    "md5sum" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM"
                    },
                    "download-http" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz"
                    },
                    "md5sum-http" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM"
                    }
                }
            } ]
        } ],
        "maintenanceWindow": "available"
    }
}

- In case the current available maintenance window lapses, the device is
again sent 'update' status as 'skip'. The device may choose then to
abort the update and restart during next available window.

$ curl
'http://127.0.0.1:8080/default/controller/v1/2/deploymentBase/1?c=411659455'
-i -H 'Accept: application/hal+json'
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 1665
{
    "id": "1",
    "deployment": {
        "download": "forced",
        "update": "skip",
        "chunks": [ {
            "part": "os",
            "version": "1",
            "name": "1",
            "artifacts" : [ {
                "filename" : "binary.tgz",
                "hashes" : {
                    "sha1" : "8b71973e835cd0718827238b1cf89f0079e44dae",
                    "md5" : "a90218782025c48e09ba0436cf30d029"
                },
                "size" : 5,
                "_links" : {
                    "download" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz"
                    },
                    "md5sum" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM"
                    },
                    "download-http" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz"
                    },
                    "md5sum-http" : {
                        "href" :
"http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM"
                    }
                }
            } ]
        } ],
        "maintenanceWindow": "unavailable"
    }
}

- In case the entire maintenance schedule lapses, before device is able
to send the completed status, the action is canceled.

$ curl 'http://127.0.0.1:8080/default/controller/v1/2' -i -H 'Accept:
application/hal+json'
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 340
{
    "config": {
        "polling": {
        "sleep": "00:05:00"
        }
    },
    "_links": {
        "cancelAction": {
            "href":
"http://127.0.0.1:8080/default/controller/v1/2/cancelAction/1"
        },
        "configData": {
            "href":
"http://127.0.0.1:8080/default/controller/v1/2/configData"
        }
    }
}

Signed-off-by: Christian Storm <christian.storm@siemens.com>
Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com>
Signed-off-by: Raju HS <raju.hs@siemens.com>
2018-03-06 16:17:31 +01:00
Michael Hirsch
c64a2e7ecc Feature add missing entity events (#640)
* introduce CRD event interfaces and add missing events for entities

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>

* extend EntityIdEvent by TenantAwareEvent

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>

* add tests for additional events and skip test preperation events

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>

* add missing expected events to tests

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>

* add target filter query CUD events

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>

* fix order imports

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>

* fix javadoc link

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>

* add neccessary EventType mapping for serialization

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
2018-02-26 12:33:41 +01:00
Kai Zimmermann
7d0bf3a162 Target poll DB performance improvements (#613)
* Async update on last target query.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* 10 seconds

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Completed batch and optimzed schema.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Cleanup and test.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* readibility.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Batch update.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Sonar issue fixed.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2017-12-18 13:50:25 +01:00
Kai Zimmermann
80d9f1b8fc Software module metadata available to targets (in DMF and DDI) (#608)
* Software module metadata can be configure as target visible.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Added metadata to DDI.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Managed by UI.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Complete DMF integration and started UI.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Add DMF tests and completed UI.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Add RSQL test. Fix sonar issues.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Add JavaDocs. foreachtenant robustness.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Review feedback included.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Updated DMF docs.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* targetVisible optional in builder.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix typos.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix checkbox ID.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* DB optimization.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix component ID of sm metadat details tab.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2017-12-16 17:17:54 +01:00
Cedric Hombourger
c3035231e2 Add an "App(s) only" distribution set (#614)
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
2017-12-16 11:31:46 +01:00
Kai Zimmermann
5a6fc37a15 Remove DMF API dependency from security integration (#604)
* Dmf security token out of API.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Allow to override dispatching routines.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* TargetAssign event is bulk ready.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Completed Javadoc.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* readibility and fix serialization bug.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix sonar issue.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Simplify artifact management usage.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2017-12-07 15:55:09 +01:00
Kai Zimmermann
3d32d1d1c3 TargetPollEvent optional (#580)
* TargetPollEvent can be disabled.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fixed test.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Central filter introduced.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix sonar issue.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Add property to standard runtime.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Add property to standard runtime.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2017-09-26 14:29:55 +02:00
Kai Zimmermann
edae83a1b5 Complete repository refactoring - method renaming (#575)
* Split Tag management

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Repo method naming schame applied.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* findAll returns slice instead of page.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Complete javadoc.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Allow null values again.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Readability improvements.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Forgot a method.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fixed broken completed filter.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2017-09-22 08:22:41 +02:00
Michael Hirsch
4c529dd755 fix generating schema in beforeTestClass instead constructor (#558)
Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
2017-07-10 14:55:18 +02:00