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>
This commit is contained in:
committed by
Kai Zimmermann
parent
e700acc312
commit
607cf92a9e
@@ -387,7 +387,7 @@ public abstract class JsonBuilder {
|
||||
|
||||
public static String distributionSetUpdateValidFieldsOnly(final DistributionSet set) throws JSONException {
|
||||
|
||||
final List<JSONObject> modules = set.getModules().stream()
|
||||
set.getModules().stream()
|
||||
.map(module -> new JSONObject().put("id", module.getId())).collect(Collectors.toList());
|
||||
|
||||
return new JSONObject().put("name", set.getName()).put("description", set.getDescription())
|
||||
@@ -535,13 +535,21 @@ public abstract class JsonBuilder {
|
||||
|
||||
public static String configData(final String id, final Map<String, String> attributes, final String execution)
|
||||
throws JSONException {
|
||||
return new JSONObject().put("id", id).put("time", "20140511T121314")
|
||||
return configData(id, attributes, execution, null);
|
||||
}
|
||||
|
||||
public static String configData(final String id, final Map<String, String> attributes, final String execution,
|
||||
final String mode) throws JSONException {
|
||||
final JSONObject json = new JSONObject().put("id", id).put("time", "20140511T121314")
|
||||
.put("status",
|
||||
new JSONObject().put("execution", execution)
|
||||
.put("result", new JSONObject().put("finished", "success"))
|
||||
.put("details", new ArrayList<String>()))
|
||||
.put("data", attributes).toString();
|
||||
|
||||
.put("data", attributes);
|
||||
if (mode != null) {
|
||||
json.put("mode", mode);
|
||||
}
|
||||
return json.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user