Management API: Expose forceTime and startAt fields in rollout representation (#1336)

* Expose forceTime and startAt fields in rollout representation in Mgmt API
* Change "forceTime" to "forcetime"
* Add checks when making a POST request in the tests
* Change forced to timeforced in tests and extend validity check
* Pass aforcetime and startat arguments as test checks
* remove unused import

Signed-off-by: Stanislav Trailov <stanislav.trailov@bosch.io>
This commit is contained in:
Stanislav Trailov
2023-03-27 11:52:55 +03:00
committed by GitHub
parent 5baf65c1f0
commit 85feeba681
6 changed files with 182 additions and 95 deletions

View File

@@ -84,6 +84,7 @@ final class MgmtRolloutMapper {
body.setTotalTargets(rollout.getTotalTargets());
body.setDeleted(rollout.isDeleted());
body.setType(MgmtRestModelMapper.convertActionType(rollout.getActionType()));
body.setForcetime(rollout.getForcedTime());
rollout.getWeight().ifPresent(body::setWeight);
if (withDetails) {
@@ -92,6 +93,7 @@ final class MgmtRolloutMapper {
rollout.getTotalTargetCountStatus().getTotalTargetCountByStatus(status));
}
body.setTotalGroups(rollout.getRolloutGroupsCreated());
body.setStartAt(rollout.getStartAt());
body.add(linkTo(methodOn(MgmtRolloutRestApi.class).start(rollout.getId())).withRel("start"));
body.add(linkTo(methodOn(MgmtRolloutRestApi.class).pause(rollout.getId())).withRel("pause"));