Search in sources :

Example 1 with FileSystemQueryParams

use of com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams 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;
}
Also used : FileSystemQueryParams(com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams) Query(com.emc.nas.vnxfile.xmlapi.Query) InputStream(java.io.InputStream) AspectSelection(com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams.AspectSelection) FileSystemAlias(com.emc.nas.vnxfile.xmlapi.FileSystemAlias) JAXBException(javax.xml.bind.JAXBException)

Example 2 with FileSystemQueryParams

use of com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams 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;
}
Also used : FileSystemQueryParams(com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams) Query(com.emc.nas.vnxfile.xmlapi.Query) InputStream(java.io.InputStream) AspectSelection(com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams.AspectSelection) FileSystemAlias(com.emc.nas.vnxfile.xmlapi.FileSystemAlias) JAXBException(javax.xml.bind.JAXBException)

Example 3 with FileSystemQueryParams

use of com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams in project coprhd-controller by CoprHD.

the class VNXFileArgsCreator method fetchFileSystemInfo.

/**
 * Create Filesystem information input XML request and returns stream after marshalling.
 *
 * @param argument
 * @param keyMap
 * @param index
 * @return
 * @throws VNXFilePluginException
 */
public InputStream fetchFileSystemInfo(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);
        query.getQueryRequestChoice().add(fsQueryParam);
        iStream = _vnxFileInputRequestBuilder.getQueryParamPacket(fsQueryParam, true);
    } catch (JAXBException jaxbException) {
        throw new VNXFilePluginException("Exception occurred while generating input xml for fileSystem info", jaxbException.getCause());
    }
    return iStream;
}
Also used : FileSystemQueryParams(com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams) Query(com.emc.nas.vnxfile.xmlapi.Query) InputStream(java.io.InputStream) AspectSelection(com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams.AspectSelection) JAXBException(javax.xml.bind.JAXBException)

Example 4 with FileSystemQueryParams

use of com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams in project coprhd-controller by CoprHD.

the class VNXFileArgsCreator method fetchFileSystemCheckPointInfo.

/**
 * Creates File System checkpoint input XML request and returns stream after marshalling.
 *
 * @param argument
 * @param keyMap
 * @param index
 * @return the stream
 * @throws VNXFilePluginException
 */
public InputStream fetchFileSystemCheckPointInfo(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.setFileSystemCheckpointInfos(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;
}
Also used : FileSystemQueryParams(com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams) Query(com.emc.nas.vnxfile.xmlapi.Query) InputStream(java.io.InputStream) AspectSelection(com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams.AspectSelection) FileSystemAlias(com.emc.nas.vnxfile.xmlapi.FileSystemAlias) JAXBException(javax.xml.bind.JAXBException)

Example 5 with FileSystemQueryParams

use of com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams in project coprhd-controller by CoprHD.

the class VNXFileArgsCreator method fetchFileSystemInfoWithSize.

/**
 * 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 fetchFileSystemInfoWithSize(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);
        query.getQueryRequestChoice().add(fsQueryParam);
        iStream = _vnxFileInputRequestBuilder.getQueryParamPacket(fsQueryParam, true);
    } catch (JAXBException jaxbException) {
        throw new VNXFilePluginException("Exception occurred while generating input xml for fileSystem info", jaxbException.getCause());
    }
    return iStream;
}
Also used : FileSystemQueryParams(com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams) Query(com.emc.nas.vnxfile.xmlapi.Query) InputStream(java.io.InputStream) AspectSelection(com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams.AspectSelection) JAXBException(javax.xml.bind.JAXBException)

Aggregations

FileSystemQueryParams (com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams)5 AspectSelection (com.emc.nas.vnxfile.xmlapi.FileSystemQueryParams.AspectSelection)5 Query (com.emc.nas.vnxfile.xmlapi.Query)5 InputStream (java.io.InputStream)5 JAXBException (javax.xml.bind.JAXBException)5 FileSystemAlias (com.emc.nas.vnxfile.xmlapi.FileSystemAlias)3