Add support for dynamic rollout group template (#1752)
1. Add support in REST and Mgmt API for dynamic group template 2. If present - groups follows the pattern of this template, otherwise - the last static group 3. This allows to create pure dynamic rollout with 0 static groups - auto assignment equivalent with groups Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtDynamicRolloutGroupTemplate;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtRolloutGroup;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
@@ -87,6 +88,10 @@ public class MgmtRolloutRestRequestBodyPost extends AbstractMgmtRolloutCondition
|
||||
@Schema(example = "true")
|
||||
private boolean dynamic;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Template for dynamic groups (only if dynamic flag is true)")
|
||||
private MgmtDynamicRolloutGroupTemplate dynamicGroupTemplate;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = """
|
||||
(Available with user consent flow active) If the confirmation is required for this rollout. Value will be used
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Copyright (c) 2024 Contributors to the Eclipse Foundation
|
||||
*
|
||||
* This program and the accompanying materials are made
|
||||
* available under the terms of the Eclipse Public License 2.0
|
||||
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.rolloutgroup;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
/**
|
||||
* Model for defining the Attributes of a Rollout Group
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtDynamicRolloutGroupTemplate {
|
||||
|
||||
@Schema(description = "The name suffix of the dynamic groups", example = "-dynamic")
|
||||
private String nameSuffix;
|
||||
|
||||
@Schema(description = "Count of targets a dynamic group shall include", example = "20")
|
||||
private Long targetCount;
|
||||
}
|
||||
Reference in New Issue
Block a user