Search in sources :

Example 1 with UserAccountQueryParams

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

Aggregations

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