}
} catch (final UnknownHostException e) {
LOG.appWarning("parseHostInfo: cannot parse: net-info: " + line);
}
} else if (BRIDGE_INFO_DELIM.equals(type)) {
newBridges.add(new StringValue(line));
} else if ("disk-info".equals(type)) {
final Optional<BlockDevice> blockDevice = createBlockDevice(line);
if (!blockDevice.isPresent()) {
continue;
}
final String bdName = blockDevice.get().getName();
if (bdName != null) {
final Matcher drbdM = DRBD_DEV_FILE_PATTERN.matcher(bdName);
if (drbdM.matches()) {
if (drbdBlockDevices.containsKey(bdName)) {
drbdBlockDevices.get(bdName).updateFrom(blockDevice.get());
} else {
newDrbdBlockDevices.put(bdName, blockDevice.get());
}
} else {
newBlockDevices.put(bdName, blockDevice.get());
if (blockDevice.get().getVolumeGroup() == null
&& bdName.length() > 5 && bdName.indexOf('/', 5) < 0) {
final Matcher m = BLOCK_DEV_FILE_PATTERN.matcher(bdName);
if (m.matches()) {
newBlockDevices.remove(m.group(1));
}
}
}
}
final String vg = blockDevice.get().getVolumeGroup();
if (vg != null) {
Set<String> logicalVolumes = newVolumeGroupsLVS.get(vg);
if (logicalVolumes == null) {
logicalVolumes = new HashSet<String>();
newVolumeGroupsLVS.put(vg, logicalVolumes);
}
final String lv = blockDevice.get().getLogicalVolume();
if (lv != null) {
logicalVolumes.add(lv);
}
}
if (blockDevice.get().isPhysicalVolume()) {
newPhysicalVolumes.add(blockDevice.get());
}
} else if (DISK_SPACE_DELIM.equals(type)) {
final Matcher dsM = USED_DISK_SPACE_PATTERN.matcher(line);
if (dsM.matches()) {
final String bdName = dsM.group(1);
final String used = dsM.group(2);
diskSpaces.put(bdName, used);
}
} else if ("vg-info".equals(type)) {
final String[] vgi = line.split("\\s+");
if (vgi.length == 2) {
newVolumeGroups.put(vgi[0], Long.parseLong(vgi[1]));
} else {
LOG.appWarning("parseHostInfo: could not parse volume info: " + line);
}
} else if ("filesystems-info".equals(type)) {
newFileSystems.add(line);
} else if ("crypto-info".equals(type)) {
newCryptoModules.add(line);
} else if ("qemu-keymaps-info".equals(type)) {
newQemuKeymaps.add(new StringValue(line));
} else if ("cpu-map-model-info".equals(type)) {
newCpuMapModels.add(new StringValue(line));
} else if ("cpu-map-vendor-info".equals(type)) {
newCpuMapVendors.add(new StringValue(line));
} else if ("mount-points-info".equals(type)) {
newMountPoints.add(line);
} else if ("gui-info".equals(type)) {
parseGuiInfo(line);
} else if ("installation-info".equals(type)) {