// read the controllers
Map<ControllerId, Controller> controllerMap = new HashMap<ControllerId, Controller>();
ControllerId leaderId = null;
if (leader != null) {
leaderId = ControllerId.from(leader.getId());
controllerMap.put(leaderId, new Controller(leaderId, leader, true));
}
// read the constraints
Map<ConstraintType, ClusterConstraints> clusterConstraintMap =
new HashMap<ConstraintType, ClusterConstraints>();