use of com.emc.storageos.model.block.NamedVolumeGroupsList in project coprhd-controller by CoprHD.
the class VolumeGroupService method getChildrenVolumeGroups.
/**
* Get the list of child volume groups
*
* @param id
* @brief List the child volume groups
* @return
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Path("/{id}/volume-groups")
public NamedVolumeGroupsList getChildrenVolumeGroups(@PathParam("id") URI id) {
ArgValidator.checkFieldUriType(id, VolumeGroup.class, "id");
VolumeGroup volumeGroup = _dbClient.queryObject(VolumeGroup.class, id);
NamedVolumeGroupsList result = new NamedVolumeGroupsList();
List<VolumeGroup> volumeGroups = getVolumeGroupChildren(_dbClient, volumeGroup);
for (VolumeGroup group : volumeGroups) {
result.getVolumeGroups().add(toNamedRelatedResource(group));
}
return result;
}
Aggregations