rolloutPlan.get("rollback-across-groups").set(plan.isRollbackAcrossGroups());
ModelNode series = rolloutPlan.get("in-series");
for (Set<ServerGroupDeploymentPlan> concurrent : plan.getServerGroupDeploymentPlans()) {
if (concurrent.size() == 1) {
ModelNode single = new ModelNode();
ServerGroupDeploymentPlan sgdp = concurrent.iterator().next();
single.get("server-group", sgdp.getServerGroupName()).set(createServerGroupPlan(sgdp));
series.add(single);
}
else {
ModelNode multiple = new ModelNode();
for (ServerGroupDeploymentPlan sgdp : concurrent) {
multiple.get("concurrent-groups", sgdp.getServerGroupName()).set(createServerGroupPlan(sgdp));
}
series.add(multiple);
}
}
}