use of com.emc.nas.vnxfile.xmlapi.Query in project coprhd-controller by CoprHD.
the class VNXFileArgsCreator method fetchCheckpointInfo.
/**
* create checkpoint information query and returns its stream after marshalling.
*
* @param argument
* @param keyMap
* @param index
* @return
* @throws VNXFilePluginException
*/
public InputStream fetchCheckpointInfo(final Argument argument, final Map<String, Object> keyMap, int index) throws VNXFilePluginException {
_logger.info("Creating checkpoint info query");
InputStream iStream = null;
try {
Query query = new Query();
CheckpointQueryParams ckptParams = new CheckpointQueryParams();
query.getQueryRequestChoice().add(ckptParams);
iStream = _vnxFileInputRequestBuilder.getQueryParamPacket(ckptParams, false);
} catch (JAXBException jaxbException) {
throw new VNXFilePluginException("Exception occurred while generating input xml for celerra system info", jaxbException.getCause());
}
return iStream;
}
use of com.emc.nas.vnxfile.xmlapi.Query in project coprhd-controller by CoprHD.
the class VNXFileArgsCreator method fetchMountFSInfo.
/**
* create Mount query and returns its stream after marshalling.
*
* @param argument
* @param keyMap
* @param index
* @return
* @throws VNXFilePluginException
*/
public InputStream fetchMountFSInfo(final Argument argument, final Map<String, Object> keyMap, int index) throws VNXFilePluginException {
_logger.info("VNX File System Mount info query");
InputStream iStream = null;
try {
Query query = new Query();
MountQueryParams mountQueryParams = new MountQueryParams();
query.getQueryRequestChoice().add(mountQueryParams);
iStream = _vnxFileInputRequestBuilder.getQueryParamPacket(mountQueryParams, false);
} catch (JAXBException jaxbException) {
throw new VNXFilePluginException("Exception occurred while generating input xml for celerra system info", jaxbException.getCause());
}
return iStream;
}
use of com.emc.nas.vnxfile.xmlapi.Query in project coprhd-controller by CoprHD.
the class VNXFileArgsCreator method fetchVdmInfo.
public InputStream fetchVdmInfo(final Argument argument, final Map<String, Object> keyMap, int index) throws VNXFilePluginException {
_logger.info("Creating VDM info query");
InputStream iStream = null;
try {
Query query = new Query();
VdmQueryParams vdmQuery = new VdmQueryParams();
query.getQueryRequestChoice().add(vdmQuery);
iStream = _vnxFileInputRequestBuilder.getQueryParamPacket(vdmQuery, false);
} catch (JAXBException jaxbException) {
throw new VNXFilePluginException("Exception occurred while generating input xml for VDM info", jaxbException.getCause());
}
return iStream;
}
use of com.emc.nas.vnxfile.xmlapi.Query 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;
}
use of com.emc.nas.vnxfile.xmlapi.Query in project coprhd-controller by CoprHD.
the class VNXFileArgsCreator method fetchUserAccounts.
/**
* Performs a query for the user accounts on the specified data mover.
*
* @param argument
* @param keyMap
* @param index
* @return iStream
* @throws VNXFilePluginException
*/
public InputStream fetchUserAccounts(final Argument argument, final Map<String, Object> keyMap, int index) throws VNXFilePluginException {
_logger.info("Creating User Accounts Query");
InputStream iStream = null;
try {
String dataMover = (String) keyMap.get(VNXFileConstants.DATAMOVER_ID);
_logger.info("using data mover {}", dataMover);
Query query = new Query();
UserAccountQueryParams userQuery = new UserAccountQueryParams();
userQuery.setMover(dataMover);
query.getQueryRequestChoice().add(userQuery);
iStream = _vnxFileInputRequestBuilder.getQueryExParamPacket(userQuery);
} catch (JAXBException jaxbException) {
throw new VNXFilePluginException("Exception occurred while generating input xml for user account info", jaxbException.getCause());
}
return iStream;
}
Aggregations