use of com.emc.nas.vnxfile.xmlapi.Query in project coprhd-controller by CoprHD.
the class VNXFileArgsCreator method fetchDataMoverInfo.
public InputStream fetchDataMoverInfo(final Argument argument, final Map<String, Object> keyMap, int index) throws VNXFilePluginException {
_logger.info("Creating data mover info query");
InputStream iStream = null;
try {
Query query = new Query();
MoverQueryParams moverQuery = new MoverQueryParams();
MoverQueryParams.AspectSelection selection = new MoverQueryParams.AspectSelection();
selection.setMovers(true);
moverQuery.setAspectSelection(selection);
query.getQueryRequestChoice().add(moverQuery);
iStream = _vnxFileInputRequestBuilder.getQueryParamPacket(moverQuery, false);
} catch (JAXBException jaxbException) {
throw new VNXFilePluginException("Exception occurred while generating input xml for datamover info", jaxbException.getCause());
}
return iStream;
}
use of com.emc.nas.vnxfile.xmlapi.Query in project coprhd-controller by CoprHD.
the class VNXFileArgsCreator method fetchStoragePoolInfo.
/**
* Create VNX Information input request xml and return its stream after
* marshalling.
*
* @param argument
* @param keyMap
* @param index
* @return
* @throws VNXFilePluginException
*/
public InputStream fetchStoragePoolInfo(final Argument argument, final Map<String, Object> keyMap, int index) throws VNXFilePluginException {
_logger.info("Creating VNX StorgePool Query");
InputStream iStream = null;
try {
Query query = new Query();
StoragePoolQueryParams spParams = new StoragePoolQueryParams();
query.getQueryRequestChoice().add(spParams);
iStream = _vnxFileInputRequestBuilder.getQueryParamPacket(spParams, 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 fetchSelectedFileSystemInfoWithoutSize.
/**
* Create Filesystem information input XML request and returns stream after marshalling.
*
* @param argument
* @param keyMap
* @param index
* @return
* @throws VNXFilePluginException
*/
public InputStream fetchSelectedFileSystemInfoWithoutSize(final Argument argument, final Map<String, Object> keyMap, int index) throws VNXFilePluginException {
_logger.info("Creating filesystem info query");
InputStream iStream = null;
try {
Query query = new Query();
FileSystemQueryParams fsQueryParam = new FileSystemQueryParams();
AspectSelection selection = new AspectSelection();
selection.setFileSystems(true);
fsQueryParam.setAspectSelection(selection);
FileSystemAlias fsAlias = new FileSystemAlias();
fsAlias.setName((String) keyMap.get(VNXFileConstants.FILESYSTEM_NAME));
_logger.info("Querying mount info for file system {}", fsAlias.getName());
fsQueryParam.setAlias(fsAlias);
query.getQueryRequestChoice().add(fsQueryParam);
iStream = _vnxFileInputRequestBuilder.getQueryParamPacket(fsQueryParam, 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 fetchCifsServerInfo.
/**
* Create CIFS Config XML request and return stream after marhalling.
*
* @param argument
* @param keyMap
* @param index
* @throws com.emc.storageos.plugins.metering.vnxfile.VNXFilePluginException
*/
public InputStream fetchCifsServerInfo(final Argument argument, final Map<String, Object> keyMap, // final Boolean moverOrVdm,
int index) throws VNXFilePluginException {
_logger.info("Creating CIFS Server info Query");
InputStream iStream = null;
try {
_logger.info("Creating CIFS Server info Query for Mover {} {} isVDM? {}", (String) keyMap.get(VNXFileConstants.MOVER_ID) + ":" + (String) keyMap.get(VNXFileConstants.DATAMOVER_NAME), keyMap.get(VNXFileConstants.ISVDM));
MoverOrVdmRef mover = new MoverOrVdmRef();
mover.setMover((String) keyMap.get(VNXFileConstants.MOVER_ID));
mover.setMoverIdIsVdm(Boolean.valueOf((String) keyMap.get(VNXFileConstants.ISVDM)));
CifsServerQueryParams cifsQuery = new CifsServerQueryParams();
cifsQuery.setMoverOrVdm(mover);
Query query = new Query();
query.getQueryRequestChoice().add(cifsQuery);
iStream = _vnxFileInputRequestBuilder.getQueryParamPacket(cifsQuery, false);
} catch (JAXBException jaxbException) {
throw new VNXFilePluginException("Exception occurred while generating input xml for file export info", jaxbException.getCause());
}
return iStream;
}
use of com.emc.nas.vnxfile.xmlapi.Query in project coprhd-controller by CoprHD.
the class VNXFileArgsCreator method fetchSelectedFileSystemInfo.
/**
* Create Filesystem information and FileSystem capcacity input XML request and returns stream after marshalling.
*
* @param argument
* @param keyMap
* @param index
* @return
* @throws VNXFilePluginException
*/
public InputStream fetchSelectedFileSystemInfo(final Argument argument, final Map<String, Object> keyMap, int index) throws VNXFilePluginException {
_logger.info("Creating filesystem info query");
InputStream iStream = null;
try {
Query query = new Query();
FileSystemQueryParams fsQueryParam = new FileSystemQueryParams();
AspectSelection selection = new AspectSelection();
selection.setFileSystems(true);
selection.setFileSystemCapacityInfos(true);
fsQueryParam.setAspectSelection(selection);
FileSystemAlias fsAlias = new FileSystemAlias();
fsAlias.setName((String) keyMap.get(VNXFileConstants.FILESYSTEM_NAME));
fsQueryParam.setAlias(fsAlias);
query.getQueryRequestChoice().add(fsQueryParam);
iStream = _vnxFileInputRequestBuilder.getQueryParamPacket(fsQueryParam, false);
} catch (JAXBException jaxbException) {
throw new VNXFilePluginException("Exception occurred while generating input xml for fileSystem info", jaxbException.getCause());
}
return iStream;
}
Aggregations