30d5df59bd648c98af84fe32ff76415544f50bea
216 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1921fbf607 |
Decouple auto assign check (#1000)
* Introduce auto assign executer interface to override check method. * Add copyright header. * Move documentation to interface. Annotate the AutoAssignExecutor as FunctionalInterface. * Rename method to match interface name Signed-off-by: Michael Herdt <Michael.Herdt2@bosch-si.com> |
||
|
|
9f3ff40658 |
Migrated Hawkbit UI to Vaadin 8 (#980)
* Migrated Hawkbit UI to Vaadin 8
* fixed tag assignment messages
* disable rollout buttons instead of hinding them in Rollout Grid
* fix mssql db error
* small improvements to remove duplications while creating labels and distribution set type combo
* upgraded Vaadin to 8.11.1, upgraded jsoup to 1.11.2 (used by Vaadin 8.11.1), fixed selection in Metadata window, moved Rollout Window components to separate components package
* moved DS/SM type combobox creation to FormComponentBuilder, fixed add to collection error in SoftwareModuleDetails, changed save entity icons to harddrive, common refactoring
* removed duplications between breadcrumb grid headers (RolloutGroupGridHeader, RolloutGroupTargetGridHeader, TargetFilterDetailsGridHeader)
* replace proxy type in proxy objects with simple type info
* made all text fileds lazy (the timeout is 500ms), fixed add rollout window error on getting the bean from layout to controller
* removed duplications between ds to tag and target to tag assignment supports, extracted assignment notification from HawkbitCommonUtils
* fixed search input with caption overlap
* refactored layout visibility and resize listeners
* fixed approval strategy, adapted rollout advanced group ids to always increase
* Combine created and modified column creation
* remove Column<?, ?> variables
* fix confirmation dialog line breaks
* fix grids in details and filters
* fix column creation for upload grids
* add default ExpandRatio, fix rollouts and target filter
* add default addColumn method and fix action grids
* update deployment and rollout grid and grid css
* fix grid column widths
* refactored approval layout
* adapted approval layout
* refactored advanced rollout group layout
* refactored advanced group definitions to use proxy bean
* fixed copy rollout window enable save button
* third draft of Rollout Window validation: added UNKNOWN validation status, validate all layouts after validation listener is added
* second draft of Rollout Window Validation
* first Rollout Window Validation draft for enable/disable save button
* fixed custom target filter de-selection on delete, re-selection on update, reset edit/delete crud menu mode on custom filter tab selection
* added error threshold validation on total target and number of groups change
* added random ids to Proxy identifiable entities without defined ids
* add universal check box generator
* adapted Update and Approve Rollout Window Layout
* adapted setting and getting bean values for Add and Copy Rollout layouts
* fix setting ConfirmationDialog ID
* refactor ConfirmationDialog to use a CommonDialogWindow internally
* fix rollout group definition input width
* remove code duplication in UI grid column creation
* refactored rollout group pie chart and legend by extracing them to their own class VisualGroupDefinitionLayout
* remove code duplication on link creation
* moved creation of AutoStartOptionGroupLayout to FormComponentBuilder
* extracted RolloutFormLayout and SimpleGroupsLayout together with corresponding proxy beans from AddRolloutWindowLayout, adapted code accordingly
* move TimeforcedIcon generation to StatusIconBuilder
* move code to StatusIconBuilder
* use objects to build labels from entity states
* use generic method to generate status icon labels
* moved AdvancedGroupRow from DefineGroupsLayout to separate class
* remove code duplication on icon creation
* removed Optionals from Data Providers
* fixed remaining parts of xss vulnarable components (tags/types)
* added description to key-value details pairs, moved the logic of paginated database access to HawkbitCommonUtils
* further adapted xss atack posibilities
* adapted details header and key-value details
* adapted MetaData header
* adapted Artifact and Action History Grid headers
* adapted artifact download
* adapted already assigned notification and rollout approval permission check
* removed tenant and username cookies from hawkbit login
* adapted attributes sorting by key
* adapted controller attributes details
* removed grid ResizeSupport (can be introduced later if needed)
* refactored grids to not use resizeSupport but rather removing all columns and re-adding them after max/min state transition
* fixed selection of added items
* moved restoreState to AbstractGrid
* unified Ds grids on Distribution and Deployment Views
* moved filter support and drag and drop support to AbstractGrid
* removed stale Sm grid id for Upload view
* removed duplication between SwModuleGrid and SoftwareModuleGrid
* removed unneccessary status icons css properties
* added grid MasterEntitySupport, adapted grids
* fixed tags/types filter deselection after deletion
* fixed deletion success notification, added artifact uploads count check to software module table
* unified target/ds/sm grid headers
* unified DS and SM grid headers and details
* added Delete Support to Rollout, adapted deletion permissions
* introduced EntityResizeSupport, upgraded vaadin version to 8.10.4
* unified ds and sm type filter components
* removed duplications between Target and Ds tag filters
* removed duplication for #buildActionButton
* initial iteration of removing duplications between grids
* added GridActionsVisibilityListener
* added layout visibility listener to filter and rollout views
* unified LayoutResizeListener and LayoutVisibilityListener
* extracted ShowEntityFormLayoutListener
* refactored grid filter listeners
* refactored target filter listeners, introduced filter support
* added GenericEventListener, further unified listeners
* partially unified LayoutViewAware event listeners, added PinningChangedListener, TagFilterListener and TypeFilterListener
* fixed sql exception in case NO_TAG is selected without any additional tags active
* unified entity modified listeners, adapted tag token modified update
* fixed Upload View drop area enable on SM select
* unified selection listeners
* unified search listeners
* added common SearchFilterListener, added temporare EntityModifiedMasterAwareSupport for EntityModifiedListener, fixed Rollout View change after rollout deletion/modification, adapted state restore
* refactored entity modified and selection listeners together with support classes
* added maintenance window and created/modified at tooltips in Action History Window, added id to Bulk Upload popup window and main popup layout, fixed duplicated DS error during DS edit/update
* substituted ShowEntityDetailsEventPayload with SelectionChangedEventPayload in Rollout View for consistency with other Views, unified rollout ui state class
* added builder to EntityModifiedListener, adapted code
* refactored sm type modification of ds type
* fix removing sm type from ds type via ui
* refresh rollout group targets table on group-updated-event
* moved grid label icon creation to SpUiComponent builder
* fixed edit tag/type with invalid colour
* added range validator(0-100) to trigger threshold
* fixed rollout auto start option updates, fixed rollout grid search state restore, extended SPDateTimeUtil
* Rollout Window Form fixes
* small partial fix for error threshold percent/count validation and value change
* fixed time forced empty datetime in Rollouts Update Window
* added workaround for target/ds tags drag and drop due to the missing selection support
* fixed ds unpinning after deletion and completion state change
* added reason to bulk upload failed notification
* fixed target add/update window form name id, introduced separate layout listeners for entity modified events and selection/master changed events, extended grid selection support, refactored corresponding grids, layouts and listeners
* fixed required messages in the from builder, changed asyncExecutor to ui executor for file streaming, fixed auto-assignment for layout
* fixed drag and drop registration for non-selection grid model, small restore state refactoring
* fixed action remote events tests, adapted crudMenu/resize/search header supports to use mode-{mode} classes instead of ids modification
* changed id of metadata popup grid to 'metadata.window.table.id' and details grid to '{typePrefix}.metadata.details.table.id', fixed tag/type cell text wrapping, tooltip shows full tag/type name, removed checkboxes from Distributions Set Type Software module selection grids
* added tooltip to Rollout/RolloutGroup status bar, small bug fixes for Rollout Window target filter and approval
* fixed edit permission validation in DetailsHeader
* unbind distributionsview javascript from vaadin theme
* small refactoring of form component builder, assignment and rollout layout
* remove ds combobox code duplication, fix assig and autoassign popup
* add BoundComponent class, fix assignment popup
* remove duplicates for name, version description and actiontype fields
* removed code duplication, fix assign- and autoassign-popup
* adapted Action history eventing, changed entity modified parent event propagation
* added id to DS details modules grid
* started adapting Action History View
* adapted filter by ds drop area restore
* align drop styling with previous
* fix filter target table by assigned ds
* small refactoring of Deployment View and System config View layouts
* adapted DS tag layout
* fixed incompelete DS deselection and unpinning
* added filter to RemoteEventListener in order to ignore remote events, added select entity on add to grids
* fixed DS modules details, explained why session scope is used for bulk upload
* adapted bulk upload window to be lazy loaded, fixed restore by usinng session scope
* fixed user cell text selection in grid, drop hint highlighting
* fixed undo for iot-update-server config option
* fixed parsing in DurationField and refactored system config view
* removed unused variable from DurationField
* refactored config option view
* fixed polling option value in config option view
* fixed token refresh value in config option view
* added binder auth config option
* added binder to save config option
* added binder for auto cleanup option
* upgraded vaadin to 8.10.0, removed dd package together with CustomAcceptCriteria extension, removed CustomAcceptCriteria tests, removed all vaadin v7 dependencies, removed compatibility server and client
* added selection by pressing key up/down, refactored range selection handler and connector, drag and drop support drop style listener, removed unneccessary styles for selection extension
* show drop hint
* fix h2 cast error
* make unselected row dragable
* add support for selection using Shift and CTRL
* remove grid checkboxes, fix selection and drag and drop
* moved bulk upload classes to own package, started implementing bulk upload window builder
* further adaptations of bulk upload
* started adapting bulk upload
* partially removed stale classes/methods, vaadin v7 imports
* completeted pinning refactoring
* further pinning refactoring, added restore to distributions grid in deployment view
* started adapting pinning of target and distribution set
* further remote eventing refactoring, small styling adaptations
* added 'maximize' and 'minimize' ids to max/min grid icons
* removed event containers, adapting the delayed event bus push strategy, event provider and remote events listener
* small eventing refactoring
* adapted tag filter eventing, removed old event classes
* adapted selection eventing, fixed color styling for grid selection, added countByAssignedId to softwaremodulemanagement
* adapted type filter eventing
* adapted search filter eventing
* adapted actions visibility change eventing in filter layouts
* adapted layout eventing in Deployment View
* adapted layout eventing in Distributions View
* adapted layout eventing in Upload View
* adapted entity modified eventing
* adapted rollout eventing
* fix rollout view and window styling
* handle rollouts view remote events
* adapted eventing in Rollouts View
* fixed Target Filter session state management in Edit Form mode
* adapted target filter query add/update layout to use form layout
* started adapting tags assignment
* removed AbstractNotificationView
* added row border in grids
* fixed restoreState in Target Filters and Target Grid, refatored eventing in Deployment View
* Added event listener for DsSetType
* added confirmation window id for deletion support, added id for action type radio group, reworked restore state, small changes in Deployment view
* started adapting ds grid, ds tags, action history and Deployment View layout
* started adapting target grid
* reworked Target Filter View and event handling
* fixed Target Details error, started adapting Target Grid Layout
* refactored Date time parser
* fixed Date time parser
* fixed formatting
* fixed errors in auto close option
* fixed errors in auto cleanup option
* fixed errors in Polling view option
* adapted filter management view and selection listener behaviour
* cleanup, fix vaadin query to spring pageable convertion
* adapted target tag filter layout
* started adapting Deployment view
* fixed software modules details grid rendering under Distribution Set Details
* adapted artifact details grid popup window for Software Module details
* adapted auto assignment details grid for DS
* added get by ids to target tag management, adapted tag details layout for distribution set tag and target tag
* package structure refactoring
* started adapting software module details tab within distribution set details layout
* excluded javax.validation because of a reference to an old sources file
* fixed system config view misconfiguration
* fixed ids formating, added UI access call for updating entities through listeners
* refactored sm and ds types saving in proxy sm and ds entities
* fixed software module to distribution set assignment and software module dataprovider in Distributions View
* adapted add/update notification for software module and distribution set to show name and version, fixed search text field id
* adapted software module color highlighting in Distributions View
* adapted login ui
* started adapting Distributions View
* unified filter buttons click behaviour, added restore clicked filter to Upload View
* removed duplications in filter headers
* removed duplication in filter type/tag layouts
* added sm and ds type remote events matchers for listener
* adapted metadata details grid, update eventing fo details layout in Upload View
* adapted entity deletion eventing and selection on restore state for Upload View
* adapted file upload events handling, introduced RemoteEventsListener for the complete UI
* adapted Details Header to render two separate labels for caption prefix (entity type) and entity name to prevent xss attack
* upgraded vaadin to version 8.9.3, adapted upload artifact view and corresponding eventing further
* change visibility of components instead of removing them in Upload View
* adapted metadata popup window for target, distribution set and software module
* first iteration of adapting metadata window layout: created meta data dataproviders and window grids for target, ds and sm
* adapted auto assign window layout
* further refactoring of Target filter view and layouts
* adapted software module add/update window layout
* adapted distribution set add/update window layout
* refactored window layouts
* fixed software module add/update layout, adapted target add/update layout
* added validation of empty distribution set type software module types and mandatory property change
* further refactoring of distribution set type add/update window
* adapted distribution set type add/update window
* adapted software module type add/update window layout
* adapted tag layouts and color picker structure
* adapted target and ds tag add/update windows, refactored color picker
* added ds and sm type event containers
* refactored local eventing and remote events handling, mainly only for distributions view
* fixed ui alignment on the right side of the page
* Finalized upload view migration
* Fixed upload layout not enabled problem
* Migrated Upload view. Some small glitches still open.
* moved details headers to layouts
* added callback to update last selected entity in UI state after each grid selection, unified all details layouts
* further refactoring of Target Details
* added selected event publishing to selection support, refactored target details
* started unifying details layouts and adding details support classes
* unified grid layouts
* unified Target Filter Header
* fixed glitches in UI regarding Headers, dapted eventing for crud menu and close header supports
* unified types and tags headers
* unified more headers
* adapted TargetTableHeader to use AbstractGridHeader with Header Support classes, renamed to TargetGridHeader, removed unsused css properties
* added CrudMenuHeaderSupport, refactored AbstractGridHeader
* added AddHeaderSupport, BulkUploadHeaderSupport, CloseHeaderSupport, FilterButtonsHeaderSupport, ResizeHeaderSupport, SearchHeaderSupport, refactored ConfigMenuBar behaviour in MultipleTargetFilter
* started unifying headers
* extracted BulkUpload from AbstractTableHeader to TargetTableHeader
* removed header row for tags and types grids, adapted margin/padding for some layouts, modified css properties for borders, updated vaadin version to 8.8.6, vaadin-spring to 3.2.1
* added javax servlet api maven dependency to hawkbit-autoconfigure, because gwt-user is not used anymore, fixed a couple of runtime errors, hawkbit starts :)
* adapted TargetTableHeader drag and drop in order to filter targets by Distribution Sets, adapted gwt modules to inherit from compatibility Vaadin7WidgetSet, upgraded DistributionBar addon to be compatible with vaadin 8
* added NO TAG button to Target Tag and Distribution Tag layouts
* adapted Distribution Set Types and Software Module Types layouts
* adapted Target Tags layout, Distribution Set Tags Layout, added corresponding drag and drop supports
* migrated from Table to Grid in TargetFilterQueryButtons, adapted click listeners
* adapted twin columns layout for creating/updating Distribution Set Type
* adapted MetaData Details classes
* adapted AbstractMetadataPopupLayout and all children classes, refactored DeleteSupport
* adapted Grid in UploadProgressInfoWindow
* adapted software module details, target filter query details, removed custom combobox for autoassignment, adapted layouts and details
* removed obsolete classes, adapted layouts as needed, removed Custom Renderers because components are used directly within the grids
* added ArtifactDetailsGrid for Upload View, modified Artifact Layout to be consistent with Action History Layout in Deployment View, adapted Views and Layouts
* added SoftwareModuleGrid to Upload View
* migrated SwModuleTable to SwModuleGrid
* migrated Distribution Set Table from Distributions View to Grid, refactored drag and drop
* refactored target grid in Create/Update Filter View
* refactored tag classes to use TagData where possible
* migrated CreateOrupdateFilterTable to grid
* adapted tag token classes
* adapted Layouts, chaned Base Ui Event to except Proxy Entities
* adapted TargetFilterGrid
* Migrated TargetFilterTable to grid
* Removed vaadin Tokenfield dependency
* removed ConfirmationTab, using Component ConfirmationDialog instead; adapted MaintenanceWindowLayout, introduced AssignmentWindowLayout together with corresponding ComponentBuilder and Controller; added Drag and Drop support with differen Assignments support, adapted TargetGrid and DistributionGrid correspondingly; removed TargetAssignmentOperations utility class
* second version of PinSupport
* added DeleteSupport for target and distribution set items deletion
* first draft of PinSupport for pinning targets and distribution setes
* added first draft of Management Distribution Set Grid, adapted the corresponding data provider, adapted AbstractBaseViewFilter (should be checked)
* first draft of Target Grid, refactored Selection support to include multi-selection mode
* extracted single selection support, resize support and master details support from AbstractGrid, added filter type to AbstractGrid so the dataproviders are filterable by default, adapted some data providers to use filters, refactored master-details scenario for action history/status/msg layouts
* Adapted AbstractGrid for resize support, adapted ActionHistoryGrid, ActionStatusGrid, ActionStatusMsgGrid
* added rollout window specific classes (layouts, controllers, component builders)
* changed Rollout/Group/Target List Grids to use vaadin 8 concepts, added temp utility classes
* added ArtifactDataProvider and corresponding ProxyArtifact, SoftwareModuleArtifactsStateDataProvider, SoftwareModuleDistributionsStateDataProvider, TargetFilterStateDataProvider, TargetManagementStateDataProvider, TargetTagDataProvider and corresponding mappers
* added parent Type model class for DistributionSetType and SoftwareModuleType and corresponding ProxyType, added ActionDataProvider, ActionStatusDataProvider, ActionStatusMsgDataProvider, DistributionSetTagDataProvider, DistributionSetTypeDataProvider, SoftwareModuleTypeDataProvider and corresponding mappers
* extended data providers with filter, implemented multiple distribution set data providers for sifferent ui state (views), added target tag data provider, adapted Proxy Tag
* added data providers, mappers and proxy classes for fetching entities from backend and mapping them to ui proxy entities
* removed setImmediate on classes
* fixed usage of option group layouts, removed all setImmediate calls
* removed flexibleoptiongroup dependency and adapted the Option Group Layouts to use the default RadioButtonGroup
* adapted Vaadin Security and fixed Notifications
* Migrated vaadin 7 sources with the Vaadin migration tool to vaadin 8 compatibility mode
* fixed some minor sonar issues
* fixed license headers
* fixed dynamic stylesheet js license header
* adapted java docs parameters description, removed unused event classes
* fixed icon styles, made action icons a little bigger
* fixed download artifact action icon column header, fixed styling for the target filter query add/update layout, made it more responsive instead of hardcoding pixel values
* fixed Notification rendering regarding word wrap
* fixed restore behaviour with the invalid target filter query in Filter View
* replaced List collection with Set for better performance during DS pinning, tag assignment, target status filtering and rollout add/update window validation, ignored irrelevant sonar issues
* disable crud menu button on no CUD permissions, disable Rollout Group Button on missing permissions, removed Target Metadata details tab on missing repository read permissions, removed Autoassignment DS details tab on missing target read permissions, added UIEventPermissionChecker/HawkbitEventPermissionChecker to verify if current user has the required permissions in order to receive push events/notifications
* disable Autoassignment link in case of missing read repository permissions, disable TFQ save button in case of missing update target permissions
* adapted ordering of columns in maximized state
* limited selection in grids to 1000 entities, removed shift+ctrl selection behaviour (due to complex logic for preserving and limiting selection) disable edit/copy rollout on creation, small naming changes and java docs improvements
* added java docs to notification class
* fixed restoration of the default filter value for grids
* added caption to Delete column in grids, made target filter grid columns hidable, stoped propagation of select all event in order to not select the text on the page
* removed com.google.gwt.gwtmockito test dependency
* renamed RemoteEventsListener to HawkbitEntityEventListener to better describe the use-case for the listener
* changed Guava cache to Caffeine cache for EntityModified UI events
* removed obsolete HawkbitErrorNotificationMessage, UINotification is used instead
* added stacked notifications custom extension
* removed unused JUnitParams dependency
* fixed license header for ParallelNotificationConnector
* set ui mode back to production
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
|
||
|
|
cf7add7aaa |
add method to get a single action by externalRef (#942)
* add method to get a single action by externalRef * adding junit test for ControllerManagement::getActionByExternalRef * fixing sonarQube findings * improve assert statement Signed-off-by: Ravindranath Sandeep <Sandeep.Ravindranath@bosch-si.com> |
||
|
|
5feb5873c4 |
Feature mgmtapi add sha256 to softwaremodules (#918)
* Add sha256 hash to softwaremodules in mgmt api Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Adapt rest docs Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Edit comments Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Add proper license header Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> |
||
|
|
e731585c45 |
Explain the toggle behavior in JavaDoc better. (#911)
Signed-off-by: Michael Herdt <Michael.Herdt2@bosch-si.com> |
||
|
|
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> |
||
|
|
09f2d8a481 |
Fix upload quota check and provide better error message (#893)
* Adjusted upload quota check to include file size and show proper error message Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Fixed failing upload quota tests Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Moved quota check to stream, fixed review findings Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Added missing license header to QuotaInputStream Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Reworked uploadLock, ensured error messages may be translated, review fixes Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Added local artifactrepo to gitignore Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Fixed sonar issues and assignment quota message Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * PR review fixes Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Split quota exceptions, PR fixes Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Removed left over conversion method in quota helper Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Made conversion helper class final Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> |
||
|
|
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> |
||
|
|
193603282a |
Introduce new DMF message THING_REMOVED (#891)
* Introduce new DMF message THING_REMOVED Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch-si.com> * rename test to its original name Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch-si.com> * API documentation adapted; constant defined for duplicated string Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch-si.com> * Resolve review comments; Replace try/catch blocks in exceptions testing Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch-si.com> * Re-add finally block in test cases Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch-si.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
bde3548846 |
DDI supports sha256 (#869)
* Add SHA256 file hash to ddi GET outputs Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Integrate review findings for SHA256 changes Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Renamed hashes to base16hases in store() parameters Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Added missing javadoc according to sonarqube findings Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> |
||
|
|
fba6cf9787 |
External ref for actions and status-update events (#830)
* Add feature to listen to rollout status update * With this feature, extensions can update back the status of a given rollout using an event(containing distributionSetId and targetId). * In future, AmqpMessageHandlerService can make use of this feature and de-couple its own implementation from performing status update of an action. * Implement ActionStatusUpdateHandlerService using actionId * Extend actions to support externalRef * Update the action status using externalRef. * Update securityContext to support running a callable under specific authorities. * Fixing the review comments * Increase length of externalRef to 128 chars * Remove actionStatusUpdateEvent and the handler service * Use 256 chars for externalRef * Increment the version for migration script * Another feature had use v1_12_12 in a recent PR. So incrementing the version. * Create length limit for externalRef and add it to index * Externalref will be much longer than 256 chars if controllerId is as long as 256 chars * Adding tests for verifying externalRef in controllerManagement * Improve test to consider multiple externalRefs * Fix issue in migration script for mssql server * Fix documentation Signed-off-by: Ravindranath Sandeep (INST-IOT/ESW-Imb) <Sandeep.Ravindranath@bosch-si.com> |
||
|
|
749218098f |
Fixed typos in server error codes and messages (#867)
* fixed typos in server error codes and messages Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com> * reverted changes of server error message keys Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com> |
||
|
|
f6c0edffa5 |
Increase target name to 128 and target controller id to 256 (#849)
* 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> |
||
|
|
34fc7a7012 |
Add fix for Download-Only deployment type on DDI-API (#848)
Signed-off-by: Jeroen Laverman <jeroen.laverman@bosch-si.com> |
||
|
|
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> |
||
|
|
509693d0ae |
Sonar issue fixed
Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com> |
||
|
|
1ac40a7a95 |
Support for Multi-Assignments (#833)
* 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> |
||
|
|
9884452ad4 |
Fix for endless loop when an exception of type EntityAlreadyExistsException is thrown in the context of the retryable findOrRegisterTargetIfItDoesNotExist method (#828)
* 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> |
||
|
|
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> |
||
|
|
664c467920 |
Feature soft autoassignment (#789)
* Repository layer and database migration * Changed target filter management to update auto assignment action type together with distribution set, extended mgmt API, adapted auto assign checker/scheduler, changed auto assign distribution set select table to combobox, added filter functionality (needs refactoring) * Refactored auto assignment dialog window, added soft/forced option group, restructured action type option group layout * Added forced icon to target filter table autoassignment cell for the forced auto assign actions * First working draft of distribution set select combobox for auto assignment window * Optimised filtering queries, added alphabetical sorting on distribution set name and version * Refactoring of distribution bean query for lazy loading * Distribution set combobox refactoring and comments * Added verification of auto assign distribution set validity (completed, not deleted), exdended target filter query fields with auto assign action type field, added rsql filter tests, added repository layer tests * Added mgmt API tests * Changed target filter rest docu tests to include auto-assignment type * Updated hawkbit docs with auto-assignment description * Added debouncing to key and value input fields of metadata popup layout to get rid of unnecessary value change events, removed redundant set value call in common dialog window, minimizing the repaint components calls * Fixed sonar findings * Reverted changes of common dialog window validaton, setting the value of the field explicitly as before, until we rethink the whole concept of validaton mechanism * Fixed review findings * Removed rsql filtering by filter auto-assign action type, due to missing conversion of disallowed timeforced action type * Small fix regarding usage of page request * Updated sql script version for flyway * Extended tests for soft deleted distribution sets for auto-assignment and filter string within distribution set specification builder Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> |
||
|
|
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> |
||
|
|
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. |
||
|
|
d52a720480 |
Spring Boot 2.0 (#721)
* Migration to Boot 2.0. Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com> |
||
|
|
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> |
||
|
|
a2c1e5f132 |
Transaction handling refactoring (#771)
* unified new transaction handling in jpa repositories, extended Deployment Management and Action Repository Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * moved Deployment Helper to utilities package Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * removed superfluous utility method from Deployment Helper Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * refactored distribution set to target assignment, fixed PR review findings Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * fixed PR review findings Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * added additional validation of active flag and current status fields for action status update repository method Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * fixed timing issue in amqp message handler integration test, when validating target attributes update Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> |
||
|
|
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> |
||
|
|
be348030b2 |
Feature target metadata ui (#765)
* add metadata tab and popup to target UI Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> * send event to update UI Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> * send event on target meta data delete and update Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> * display selected element name in details layout and metadata popup of UI Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> * add comments to explain manual event publishing Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> * remove option to hide metadata button in details layout Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> * fix typos and refactor Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> * fix typos Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> * fix wrong method call Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> |
||
|
|
d4c1e82090 |
Feature do not temp store uploaded files (#763)
* Upload artefacts directly without creating a temp file * Remove redundant code that checks if user tries to update a directory * Handle UI upload exceptions, use Spring thread pool * Clean up code * Fix review findings * Fix Sonar findings Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> |
||
|
|
0cf4f8e8b9 |
Feature target metadata (#757)
* Defined the model for target matadata and the corresponding repository layer/management * Added target metadata quotas incl enforcement * Extended Target Mgmt REST API to allow for metadata CRUD operations * Added migration scripts for each database * Added back reference to target metadata in JpaTarget * Added tests for target management, Mgmt REST API, target metadata RSQL, and REST documentation * Updated asciidocs for target rest documentation * Fix Allure imports and annotations * Fix review findings Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> |
||
|
|
d09ca7be05 |
Migrate to Allure 2 (#749)
Add allure 2.7.0 dependency; change class references of Description, Features, Stories Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> |
||
|
|
086408e8f8 |
Feature Max Artifact Storage quota (#739)
* Enforcement of artifact storage quota * Added REST integration tests for artifact upload * Fix test config * Fix failing test cases * Fix PR review findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> |
||
|
|
5fe86954b0 |
Fix handle invalid controller attributes (#740)
* Move controller attribute validation from DMF to Repository Rational: Constraint validation on key & value of a map is currently not supported by EclipseLink Maven Plugin. Therefore, this check has to be done by hawkBit. The check is required for both APIs (DMF + DDI). * add tests for attribute validation * update tests Signed-off-by: Jeroen Laverman <jeroen.laverman@bosch-si.com> * Review findings Signed-off-by: Jeroen Laverman <jeroen.laverman@bosch-si.com> * * Add custom exception for invalid target attributes * Add integration tests for DDI and DMF Signed-off-by: Jeroen Laverman <jeroen.laverman@bosch-si.com> * * rename exception Signed-off-by: Jeroen Laverman <jeroen.laverman@bosch-si.com> * * rename test steps Signed-off-by: Jeroen Laverman <jeroen.laverman@bosch-si.com> * Fix value size Signed-off-by: Jeroen Laverman <jeroen.laverman@bosch-si.com> * Ensure constraints are validated correctly Signed-off-by: Jeroen Laverman <jeroen.laverman@bosch-si.com> * Introduce review findings Signed-off-by: Jeroen Laverman <jeroen.laverman@bosch-si.com> * fix sonar finding Signed-off-by: Jeroen Laverman <jeroen.laverman@bosch-si.com> |
||
|
|
19caff6e46 |
Feature action cleanup (#704)
* Initial commit * Tenant configuration enhancements * Update REST documentation * Enhance System Configuration view in UI * Add unit tests * Fix delete query for H2 * Improve test coverage * Fix Sonar findings * Fix Hawkbit bot findings * Fix PR review findings * Fix peer review findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> |
||
|
|
7bd6b41b72 |
Remove hard-coded Strings to allow internationalization (#706)
* Use i18n and add text in messages.properties for all hardcoded strings Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com> * Fix sonar issues Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com> * Provide constants for message keys Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com> * Remove hard-coded Strings of HawkbitCommonUtil Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com> * Fix PR findings Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com> * Add Java Doc Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com> |
||
|
|
f5f51bfc2c |
Remove footer, expand layout and move functions to other elements (#689)
* Remove process and discard upload buttons; change upload process to only have one upload status window that is displayed immediately when an upload is triggered. * Separation of FileTransferHandler: FileTransferHandler was split into 3 parts. One common part remains in the abstract super class. The other pieces were moved to the upload-specific and the streaming-specific subclasses. * Fix upload process: Fix status visualization in progress window. Move repository transfer to the file upload handler so it can report if the complete upload process succeeded or failed. * Prevent file upload if no software module or more than one is selected. * Added Unit Tests and fixed Sonar findings. * Move upload button from the buttom to the right side of the drag and drop area. * Remove minimize and resize buttons in progress dialog. Remove unused code. * Code cleanup and layout adaptions: Remove unnecessary code and fix layout problems when showing the upload button on the right side of the drag and drop area. * Removed abort functionality for user because of Vaadin bug https://github.com/vaadin/framework/issues/10545 * Fixed Vaadin upload bug by subclassing Upload and overriding necessary methods. * Disable drag-and-drop area in case no OR more than one software module selected. * Enhance /adapt unit tests * Enhance /adapt UI tests Signed-off-by: Markus Block <markus.block@bosch-si.com> * First draw, insert delete button in entity tables * Add shortcuts to cancel/confirm buttons in confirmation dialog * First draw, target/distribution assignment * Entity assignments for tables * Fix table row mark correctly when assigning entities * Mark the right entity in table when deleting an entity * Refactor code for distribution tags on deployment view * Target Tags can be managed with Menu Bar * Refactor classes for managing tags and types for all entities * Disable fields correctly when updating/deleting tags and types * Remove delete and action buttons in the bottom * Delete Metadata column in tables * Redesign tables for tags and types. Show action icon for update/delete * Correct CSS for menubar for tag/type actions * Add confirmation window when deleting tag or type * Remove unused code. Fix style for target tag config menu bar * New abstract classes for target/ds tags * Reorganize package structure tags, set ids for tags * Add total targets count in target table, add close icon for menubar * Add total target label and remove footer styles * MenuBar is displayed when update/delete action is cancelled, finished, or update/delete modus is left * Insert EventHandling for show menuBar/CancelButton * Delete drag & drop criteria where not needed anymore * Fix mandatory field check in DistributionTypeLayout * Fix notification message * Move upload button into drop area * Enhance /adapt unit tests * Enhance /adapt UI tests Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com> |
||
|
|
bafce18db6 |
Change length of createdBy and lastModifiedBy property to 64 characters (#699)
* Change length of createdBy and lastModifiedBy property to 64 characters * Change length of approval_decided_by property to 64 characters * Use one update statement for one DB table for MySQL * Fix migration skript for rollout approval Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com> |
||
|
|
ecfe774e53 |
Target attributes update can be (re-)triggered by management API (#690)
* extend Management API with attribute `requestAttributes` * introduce new DMF Event Topic `REQUEST_ATTRIBUTES_UPDATE` * enhance REST documentation by new functionality * add tests for: * Management API * Amqp Message Dispatcher Service * Repository (Target Management) Signed-off-by: Jeroen Jan Laverman (INST/ESY3) <jeroen.laverman@bosch-si.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
cb63ac88b8 |
Correctly configure tenant config length. (#680)
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> |
||
|
|
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> |
||
|
|
4c28c4d905 |
Fix optimize ui maintenance window (#668)
* Optimize maintenance window UI Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com> * Refactor Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com> * Add new downloaded status to UI. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Changed Accordion to Tabsheet for better visualization of action types and maintanance window. Signed-off-by: Markus Block <markus.block@bosch-si.com> * Refined UI for maintenance window, refactoring Added ENTER shortcut for save button in dialog windows Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * Extended validation for maintenance window, refactored the maintenance window helper class Added text change listeners for the schedule and duration text fields in order to activate "save all" button Added client Locale identification for cron expression translation Moved maintenance window validation from TargetWithActionType constructor to saveAll method of assignment tab Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * Added SupressWarnings annotation for exception handling cases Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * Fixed Sonar issue: added private constructor to Maintenance schedule helper class Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * Sonar Issue: make utility class Maintenance Schedule final Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * Added Maintenance Window validation to Distribution Set and Target Management API Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * Added unit tests for MaintenanceScheduleHelper class Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * Added the license header to MaintenanceScheduleHelperTest class Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * Small changes after PR review Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * Added Id for Maintenance Window layout for UI Tests Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> |
||
|
|
607cf92a9e |
Feature Reset Target Attributes (#664)
* Enhance DDI putConfigData REST entry point with update mode Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * ControllerManagement unit tests for new target attribute update modes Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Added DdiRootControllerRestApi test for new update mode Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Enhance DMF UPDATE_ATTRIBUTES message with update mode Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Enhance DMF integration tests Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Enhance DMF integration tests Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Fix DMF integration tests * Fix failing tests Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Fix Sonar findings Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Javadoc improvements Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Fix codacy 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 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> |
||
|
|
e700acc312 |
Fix DistributionSet type should not be updatable (#659)
* DistributionSet type is no longer changable for an existing distribution set in the ui. Signed-off-by: Markus Block <markus.block@bosch-si.com> * Removed field "type" from a distribution update. Signed-off-by: Markus Block <markus.block@bosch-si.com> * Incorporated review comments. Signed-off-by: Markus Block <markus.block@bosch-si.com> |
||
|
|
a8cd650375 |
DDI improvements and Maintenance Window states in UI (#658)
* Add DDI status and tests. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Add new downloaded status to UI. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Reduce message noise. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix sonar issue. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> |
||
|
|
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> |
||
|
|
b4414438b0 |
Fix sonar issues and add DMF tests for maintenance window feature (#655)
* Fix sonar issues. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * POM cleanup and more sonar issues fixed. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Remove unneeded JavaDocs. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * More sonar issues. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * More issues. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Adapt maintenance window to naming. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Add DMF tests. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Readibility. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Typos fixed. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> |
||
|
|
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> |