List<Property> hostModels = response.get("result").asPropertyList();
List<Host> records = new LinkedList<Host>();
for(Property hostModel : hostModels)
{
Host record = factory.host().as();
record.setName(hostModel.getName());
// controller
ModelNode hostValues = hostModel.getValue();
boolean isController = hostValues.get("domain-controller").hasDefined("local");
record.setController(isController);
records.add(record);
}
callback.onSuccess(records);
}