use of org.ovirt.engine.api.model.GlusterBricks in project ovirt-engine by oVirt.
the class BackendGlusterBricksResource method resolveCreatedList.
@SuppressWarnings("unchecked")
protected GlusterBricks resolveCreatedList(ActionReturnValue result, EntityIdResolver<Guid> entityResolver) {
try {
GlusterBricks bricks = new GlusterBricks();
for (Guid id : (List<Guid>) result.getActionReturnValue()) {
GlusterBrickEntity created = entityResolver.resolve(id);
bricks.getGlusterBricks().add(addLinks(populate(map(created), created)));
}
return bricks;
} catch (Exception e) {
// we tolerate a failure in the entity resolution
// as the substantive action (entity creation) has
// already succeeded
e.printStackTrace();
return null;
}
}
Aggregations