public DetectResults isServiceDetected(InetAddress address, WSManEndpoint endpoint) { // Issue the "Identify" request final WSManClient client = m_factory.getClient(endpoint); Identity identity = null; final Map<String, String> attributes = new HashMap<>(); try { identity = client.identify(); LOG.info("Identify succeeded for address {} with product vendor '{}' and product version '{}'.", address, identity.getProductVendor(), identity.getProductVersion()); attributes.put(UPDATE_ASSETS, Boolean.toString(m_updateAssets)); attributes.put(PRODUCT_VENDOR, identity.getProductVendor()); attributes.put(PRODUCT_VERSION, identity.getProductVersion()); } catch (WSManException e) { LOG.info("Identify failed for address {} with endpoint {}.", address, endpoint, e); } return new DetectResultsImpl(identity != null, attributes); }
public DetectResults isServiceDetected(InetAddress address, WSManEndpoint endpoint) { // Issue the "Identify" request final WSManClient client = m_factory.getClient(endpoint); Identity identity = null; final Map<String, String> attributes = new HashMap<>(); try { identity = client.identify(); LOG.info("Identify succeeded for address {} with product vendor '{}' and product version '{}'.", address, identity.getProductVendor(), identity.getProductVersion()); attributes.put(UPDATE_ASSETS, Boolean.toString(m_updateAssets)); attributes.put(PRODUCT_VENDOR, identity.getProductVendor()); attributes.put(PRODUCT_VERSION, identity.getProductVersion()); } catch (WSManException e) { LOG.info("Identify failed for address {} with endpoint {}.", address, endpoint, e); } return new DetectResultsImpl(identity != null, attributes); }