use of com.emc.nas.vnxfile.xmlapi.TreeQuotaQueryParams in project coprhd-controller by CoprHD.
the class VNXFileArgsCreator method fetchQuotaDirInfo.
/**
* Create Quota Tree information input XML request and returns stream after marshalling.
*
* @param argument
* @param keyMap
* @param index
* @return
* @throws VNXFilePluginException
*/
public InputStream fetchQuotaDirInfo(final Argument argument, final Map<String, Object> keyMap, int index) throws VNXFilePluginException {
_logger.info("Creating quota tree info query");
InputStream iStream = null;
try {
Query query = new Query();
// Verify that the prior command quota create/update executed properly.
verifyPreviousResults(keyMap);
TreeQuotaQueryParams queryParam = new TreeQuotaQueryParams();
TreeQuotaQueryParams.AspectSelection selection = new TreeQuotaQueryParams.AspectSelection();
selection.setTreeQuotas(true);
queryParam.setAspectSelection(selection);
// Set the parent file system.
String fsId = (String) keyMap.get(VNXFileConstants.FILESYSTEM_ID);
_logger.info("fetchQuotaDirectories for file system id {}", fsId);
if (!isInValid(fsId)) {
queryParam.setFileSystem(fsId);
}
query.getQueryRequestChoice().add(queryParam);
iStream = _vnxFileInputRequestBuilder.getQueryParamPacket(queryParam, false);
} catch (JAXBException jaxbException) {
throw new VNXFilePluginException("Exception occurred while generating input xml for fileSystem info", jaxbException.getCause());
}
return iStream;
}
Aggregations