* 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>
* 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>
* explicitly return an optional entity by an event
Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
* fix assertions in tests
Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
* 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>
* 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>
* Introduce custom base repository factory bean
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Simplify ordered DS service call by using specs
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Annotate getBaseRepoType interface as FunctionalInterface
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Use CustomBaseRepositoryFactory instead of static BaseClass
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Fix license headers
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Add ordered specification back
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Adapted code to allow '.' inside of metadata key and attribute names
Signed-off-by: Markus Block <markus.block@bosch-si.com>
* added handling of corner cases
Signed-off-by: Markus Block <markus.block@bosch-si.com>
* Adapted metadata and attribute tests to check that dot is allowed
Signed-off-by: Markus Block <markus.block@bosch-si.com>
* fixed documentation
Signed-off-by: Markus Block <markus.block@bosch-si.com>
* Allow usage of dot in key names for every map attribute, e.g. also for
metadata in distribution set
Signed-off-by: Markus Block <markus.block@bosch-si.com>
* fixed typo
Signed-off-by: Markus Block <markus.block@bosch-si.com>
* adapted test key to ensure a dot can be used
Signed-off-by: Markus Block <markus.block@bosch-si.com>
* fixed typo
Signed-off-by: Markus Block <markus.block@bosch-si.com>
* add assign/unassign type endpoints to target api docs
Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
* fix target type creation for api rest docs test
Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
* fix review comments: rename tests
Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
* adapt test to avoid failing when translated
Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
* 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>
* 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>
* Add additional specifications to cover use cases of queries
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Replace reading target queries by spec, use empty spec in default repo calls
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Use correct NonNull annotation
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Added default exists based on spec count to TargetRepository
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Replace NoCountPagingRepository by enhanced BaseRepository
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Add missed withoutcount call in distributionsettype find all
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Add missing overrides to NoCountRepository implementation
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Remove need of repository by referencing base class directly in configuration
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Interpret /parse RSQL expressions case insensitive
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
* Add unit test verifying that RSQL expressions are case insensitive
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
* Throw the TargetAssignDistributionSetEvent even if there are actions in CANCELING state present. Filter the actions on the receiver side. In this case at the DMF.
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* Fix deploymentManagementTest
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* Add debug logs and fix tests to verify correct DMF message behaviour
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* Extend test case for the DMF in case the cancel is confirmed by the device
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* Remove unsued import
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* Fix review findings by filtering the list of targets first before querying the database for distribution set and software module.
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* flip list verification logic
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* Refactor amqp tests
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* Removed unnecessary DB queries when editing/validating RSQL query in Target Filter Management (#1023)
Added valid TargetFields to RSQL validation when editing Target Filter.
Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
* Corrected visit OrNode implementation.
Changed isValid to receive FieldNameProvider as parameter
Reduced code duplication by moving commonly used utility methods to AbstractFieldNameRSQLVisitor from ValidationRSQLVisitor abd JpqQueryRSQLVisitor
Refactored and extended Unit Tests.
Minor corrections and typos.
Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
* Added Maven entry for devolo 2020 copyright header.
Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
* Fix failing unit tests
* # WARNING: head commit changed in the meantime
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
* Fix Sonar findings.
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
* Cleanup
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
* Fix PR review findings
* Fix invalid queries in unit tests
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
* Added test case to create filter with invalid query via Mgmt REST API
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
Co-authored-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
* initial proposal for injectible target data provider
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* improved selection of first entity in grid
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* introduced constructor to explicitely set DataCommunicator for a Grid
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* made data communicator for target grid injectable
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* adapted size page request to load only one entity for getting total elements, fixed grid duplicates in case lastModified property is the same for targets and rollouts
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* DeleteSupport rethrows the exception to be intercepted by error handlers
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* minor grid refactoring
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* adapted docu for base data providers
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* added custom filter data provider, made filter effectively immutable by cloning before data refresh
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* grid returns size directly from data provider instead of data communicator
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* restructured data provider/communicator dependency injection, added injectable data supplier for target filter view grid
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* do not remove confirmation dialog window from UI explicitely
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* fixed sonar, added docs
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* Fix test name in order to get executed by surefire
Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>
* Fix expected group amount for outer query
Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>
* Refactor AutoAssignExecutor to improve the extensibility.
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* introduce protected getters
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* Refactor auto assign executor. Create deployment requests based on list of controllerIds.
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* Fix review findings
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* Surround consumer with a try catch block to continue assignment process for other filter. Execute assignment in user context.
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* 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>
* download soft deleted artifact throws binary gone exception
Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
* add test and update documentation
Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
* fix javadoc
Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
* test soft deleted artifact has no download link
Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
* Introduce new events that are triggered when changes are made to the tenant configuration.
* Add new events to EventTypes
* Fix DeploymentManagement tests.
* Fix AmqpMessageDispatcherServiceIntegration tests.
* Fix DdiRootControlle test.
* Remove unused imports.
* TenantConfigUpdatedEvent should implement EntityUpdatedEvent
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
* Use the forEachTenant method to generate the report for each tenant.
* add a test to verify the functionality of getSystemUsageStatisticsWithTenants
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>