DaanHoogland commented on code in PR #6358:
URL: https://github.com/apache/cloudstack/pull/6358#discussion_r1002935154


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java:
##########
@@ -196,6 +198,18 @@ public boolean parseDomainXML(String domXML) {
                 diskDefs.add(def);
             }
 
+            NodeList memBalloons = devices.getElementsByTagName("memballoon");
+            if ((memBalloons != null) && (memBalloons.getLength() != 0)) {
+                Element memBalloon = (Element)memBalloons.item(0);
+                String model = memBalloon.getAttribute("model");
+                MemBalloonDef def = new MemBalloonDef();
+                if (model.equalsIgnoreCase("virtio")) {
+                    String statsPeriod = getAttrValue("stats", "period", 
memBalloon);
+                    def.defVirtioMemBalloon(statsPeriod);
+                }
+                memBalloonDef = def;
+            }
+

Review Comment:
   can this go in a separate method, please?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to