Search in sources :

Example 1 with DeleteFileSystem

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

the class VNXFileArgsCreator method deleteFileSystem.

public InputStream deleteFileSystem(final Argument argument, final Map<String, Object> keyMap, int index) throws VNXFilePluginException {
    _logger.info("ArgsCreator: Deleting VNX File System {}", keyMap.get(VNXFileConstants.FILESYSTEM_ID));
    InputStream iStream = null;
    try {
        Task task = new Task();
        DeleteFileSystem delFS = new DeleteFileSystem();
        String fsId = (String) keyMap.get(VNXFileConstants.FILESYSTEM_ID);
        if (isInValid(fsId)) {
            throw new VNXFilePluginException("Prior command did not execute successfully", VNXFilePluginException.ERRORCODE_ILLEGALARGUMENTEXCEPTION);
        }
        _logger.info("deleting file system id: {}", fsId);
        delFS.setFileSystem(fsId);
        task.setDeleteFileSystem(delFS);
        iStream = _vnxFileInputRequestBuilder.getTaskParamPacket(task);
    } catch (JAXBException jaxbException) {
        throw new VNXFilePluginException("Exception occurred while generating input xml for delete file system", jaxbException.getCause());
    }
    return iStream;
}
Also used : Task(com.emc.nas.vnxfile.xmlapi.Task) InputStream(java.io.InputStream) JAXBException(javax.xml.bind.JAXBException) DeleteFileSystem(com.emc.nas.vnxfile.xmlapi.DeleteFileSystem)

Aggregations

DeleteFileSystem (com.emc.nas.vnxfile.xmlapi.DeleteFileSystem)1 Task (com.emc.nas.vnxfile.xmlapi.Task)1 InputStream (java.io.InputStream)1 JAXBException (javax.xml.bind.JAXBException)1