feat: allow a target to set offline assigned distribution set (#1620)

* feat: allow a target to set offline assigned distribution set

Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>

* refacto: apply @avgustinmm recommendation

* docs: Mark update offline API as experimental

---------

Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
This commit is contained in:
Florian BEZANNIER
2024-08-01 10:51:31 +02:00
committed by GitHub
parent aa8ab69c1f
commit 0013750f78
10 changed files with 235 additions and 3 deletions

View File

@@ -527,4 +527,22 @@ public interface ControllerManagement {
*/
@PreAuthorize(SpringEvalExpressions.IS_CONTROLLER)
void deactivateAutoConfirmation(@NotEmpty String controllerId);
/**
* Updates distributionSet installed version (experimental)
*
* @param distributionName
* installed
* @param version
* installed
*
* @return updated {@link Target}
*
* @throws EntityNotFoundException
* if target that has to be updated could not be found
* @throws java.util.NoSuchElementException
* if DistributionSetAssignmentResult list is empty
*/
@PreAuthorize(SpringEvalExpressions.IS_CONTROLLER)
boolean updateOfflineAssignedVersion(@NotEmpty String controllerId, String distributionName, String version);
}

View File

@@ -165,6 +165,9 @@ public interface DeploymentManagement {
* target and multiassignment is disabled
*/
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
List<DistributionSetAssignmentResult> offlineAssignedDistributionSets(Collection<Entry<String, Long>> assignments, String initiatedBy);
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
List<DistributionSetAssignmentResult> offlineAssignedDistributionSets(Collection<Entry<String, Long>> assignments);
/**