* added UI EntityNotFound error details extractor
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* changed Target count label to not rely on grid data change events but rather on EntityModified UI events to decide how to react dependand on the event type
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* added current view check on entity modified events
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* unsubscribe/resubscribe event listeners on view leave/enter, reselect grid entities on view enter
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* fixed target grid count reset on initial load and after view change
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* re-evaluate filters on Deployment View enter
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* added on view enter logic for rest of the views
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* introduced event listener aware layout and view, adapted code accordingly
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* fixed bulk upload
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* added missing docs
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* adapted software module deselection upon master entity change
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* fixed npe in case master support is not present (Artifact View)
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* restructured amqp assignDistributionSetMultipleTimes test
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
* added waiting for the messages to be dispached by test
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@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>
* 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>
* 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>
-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>
* Introduce different types of Multi Action Event to distinguish between an Assignment and a Cancel.
* Minimize the payload for the multiAction assignment and cancel event. Write tests for the MultiActionCancelEvent.
* Remove unused action status.
* Move list of actionIds to MultiActionEvent and declare it as abstract.
* Remove unused imports.
Signed-off-by: Michael Herdt <Michael.Herdt2@bosch-si.com>
* Reduce log output for entity not found in AmqpAuthenticationMessageHandler
Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
* Adapt tests for reduced log message
Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
* Suppress sonar warning + change log level for EntityNotFound
Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
* 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>
* 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>
* 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>
* excluded EntityAlreadyExists exceptions from requeuing
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* moved the catch clause closer to the thrown exception
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* reverted AmqpMessageHandlerServiceIntegrationTest package change
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* reduced scope of method variable
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* removed instantiation of exceptions
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* Add remote event test for the new MultiActionEvent
* Improve test descriptions
* Improve sendMultiActionRequestMessages
* Moved action filtering to the database query level (#12)
* Use @ExpectedEvents instead of EventHandlerStubs
* Removed @Param from 'existsByTargetControllerIdAndStatusAndActiveIsTrue'
* Reverted metadata initialization
* Fix hawkBit bot findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* Increase target name to 128 and target controller id to 256
* Fix test failures by using constant NamedEntity.NAME_MAX_SIZE + 1
* Use constant NamedEntity.NAME_MAX_SIZE + 1 for mgmt-resource tests
* Add db migration scripts to increase the controllerId and name limit
* Fix review issues
* Use correct constant field for junit tests
* Change Hawkbit documentation url of application-<db>.properties
* Add new line at the end of db migration scripts
* Update assertion description
* Revert copyright years to its creator year
* Add DDI-, AMQP- and controller management-tests
Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch-si.com>
* First draft of new assignment logic
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Enhancements of System Configuration view
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Drag&drop enhancements for multiple distribution set assignments
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Misc fixes
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* test that previous assignments are not canceled
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* add description and expected events to test
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* extend TenantConfigurationManagement by NullPointerException proof
getConfigurationValue method
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Hide "Required Migration Step" if Multi Assignments is enabled
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Make fields transient
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Add IDs for Required Migration Step elements
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Save work in progress
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Added new DMF message DmfMultiActionRequest
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* DMF enhancements to send out MultiActionRequest messages
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Minor changes
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Multi Assignment support for cancellations
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* fix permission problems and immutable lists
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* add message dispatcher tests for outgoing multiassignment messages, fix
old tests
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Implement Multi-Assignment support for rollout groups
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Minor changes
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Refactoring
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Register new deployment event with protobuff framework
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Allow same DS to be assigned multiple times
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix assignment with pending cancellations
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Reduce repository /DB calls
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Revert latest perf fix (causing a regression)
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* test if a rollout sends multiaction messages in multiassignment mode
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Minor changes
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Do not close new action if DS is already assigned (if multi-assign on)
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* add test that starts and finishes multiple rollouts in multiassignt mode
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* add javadoc to test method
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Prevent Multi-Assignments from being disabled via Repo Config UI
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Add link to Provisioning State Machine
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* test that Multiassignment can not be disabled via mgmt-api
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* refactor AmqpMessageHandlerService code
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Prevent Multi-Assignments feature from being disabled via Mgmt REST API
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* add license header, remove unused instance variables
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* fix tenantConfigurationManagement mock in test
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* return empty list instead of null
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* add ddi test for multiassignment, fix old test
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Prevent autoclose from being modified if Multi-Assignments is enabled
# WARNING: head commit changed in the meantime
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Add test for autoClose /multiAssign
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Javadoc improvements
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* change test method that waits for dmf messages to be dispatched
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* clean up code
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Fix UI-related PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings, Sonar issues, and test failures
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review 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 PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* fixed typo in method name
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* Added recover method to handle EntityAlreadyExistsException
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* Added tests
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* Apply suggestions from code review
Use thenThrow(Exception.class) instead of (new Exception())
Co-Authored-By: a-sayyed <ahmed.sayed@bosch-si.com>
* Apply suggestions from code review
use final modifier
Co-Authored-By: a-sayyed <ahmed.sayed@bosch-si.com>
* Adapted review findings
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* Adapted review findings
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* added logs for EntityAlreadyExistsException case
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* 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>