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>
This commit is contained in:
committed by
Dominic Schabel
parent
f16f986eed
commit
1ac40a7a95
@@ -138,7 +138,7 @@ public class RootControllerDocumentationTest extends AbstractApiRestDocumentatio
|
||||
|
||||
final Target target = targetManagement.create(entityFactory.target().create().controllerId(CONTROLLER_ID));
|
||||
final Long actionId = deploymentManagement
|
||||
.assignDistributionSet(set.getId(), Arrays.asList(target.getTargetWithActionType())).getActions()
|
||||
.assignDistributionSet(set.getId(), Arrays.asList(target.getTargetWithActionType())).getActionIds()
|
||||
.get(0);
|
||||
final Action cancelAction = deploymentManagement.cancelAction(actionId);
|
||||
|
||||
@@ -171,7 +171,7 @@ public class RootControllerDocumentationTest extends AbstractApiRestDocumentatio
|
||||
|
||||
final Target target = targetManagement.create(entityFactory.target().create().controllerId(CONTROLLER_ID));
|
||||
final Long actionId = deploymentManagement
|
||||
.assignDistributionSet(set.getId(), Arrays.asList(target.getTargetWithActionType())).getActions()
|
||||
.assignDistributionSet(set.getId(), Arrays.asList(target.getTargetWithActionType())).getActionIds()
|
||||
.get(0);
|
||||
final Action cancelAction = deploymentManagement.cancelAction(actionId);
|
||||
|
||||
@@ -265,7 +265,7 @@ public class RootControllerDocumentationTest extends AbstractApiRestDocumentatio
|
||||
|
||||
final Target target = targetManagement.create(entityFactory.target().create().controllerId(CONTROLLER_ID));
|
||||
final Long actionId = assignDistributionSetWithMaintenanceWindow(set.getId(), target.getControllerId(),
|
||||
getTestSchedule(-5), getTestDuration(10), getTestTimeZone()).getActions().get(0);
|
||||
getTestSchedule(-5), getTestDuration(10), getTestTimeZone()).getActionIds().get(0);
|
||||
|
||||
controllerManagement.addInformationalActionStatus(
|
||||
entityFactory.actionStatus().create(actionId).message("Started download").status(Status.DOWNLOAD));
|
||||
@@ -347,7 +347,7 @@ public class RootControllerDocumentationTest extends AbstractApiRestDocumentatio
|
||||
|
||||
final Target target = targetManagement.create(entityFactory.target().create().controllerId(CONTROLLER_ID));
|
||||
final Long actionId = assignDistributionSetWithMaintenanceWindow(set.getId(), target.getControllerId(),
|
||||
getTestSchedule(2), getTestDuration(1), getTestTimeZone()).getActions().get(0);
|
||||
getTestSchedule(2), getTestDuration(1), getTestTimeZone()).getActionIds().get(0);
|
||||
|
||||
mockMvc.perform(get(
|
||||
DdiRestConstants.BASE_V1_REQUEST_MAPPING + "/{controllerId}/" + DdiRestConstants.DEPLOYMENT_BASE_ACTION
|
||||
@@ -388,7 +388,7 @@ public class RootControllerDocumentationTest extends AbstractApiRestDocumentatio
|
||||
|
||||
final Target target = targetManagement.create(entityFactory.target().create().controllerId(CONTROLLER_ID));
|
||||
final Long actionId = deploymentManagement
|
||||
.assignDistributionSet(set.getId(), Arrays.asList(target.getTargetWithActionType())).getActions()
|
||||
.assignDistributionSet(set.getId(), Arrays.asList(target.getTargetWithActionType())).getActionIds()
|
||||
.get(0);
|
||||
|
||||
mockMvc.perform(post(DdiRestConstants.BASE_V1_REQUEST_MAPPING + "/{controllerId}/"
|
||||
|
||||
@@ -397,7 +397,7 @@ public class TargetResourceDocumentationTest extends AbstractApiRestDocumentatio
|
||||
final DistributionSet set = testdataFactory.createDistributionSet();
|
||||
final Long actionId = deploymentManagement
|
||||
.assignDistributionSet(set.getId(), ActionType.SOFT, 0, Arrays.asList(target.getControllerId()))
|
||||
.getActions().get(0);
|
||||
.getActionIds().get(0);
|
||||
assertThat(deploymentManagement.findAction(actionId).get().getActionType()).isEqualTo(ActionType.SOFT);
|
||||
|
||||
final Map<String, Object> body = new HashMap<>();
|
||||
|
||||
@@ -88,6 +88,8 @@ public class TenantResourceDocumentationTest extends AbstractApiRestDocumentatio
|
||||
"the list of action status that should be taken into account for the cleanup.");
|
||||
CONFIG_ITEM_DESCRIPTIONS.put(TenantConfigurationKey.ACTION_CLEANUP_ACTION_EXPIRY,
|
||||
"the expiry time in milliseconds that needs to elapse before an action may be cleaned up.");
|
||||
CONFIG_ITEM_DESCRIPTIONS.put(TenantConfigurationKey.MULTI_ASSIGNMENTS_ENABLED,
|
||||
"if multiple distribution sets can be assigned to the same targets.");
|
||||
}
|
||||
|
||||
@Autowired
|
||||
|
||||
Reference in New Issue
Block a user