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


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java:
##########
@@ -1421,13 +1438,18 @@ public String getContent() {
                 netBuilder.append(_dpdkExtraLines);
             }
 
-            if (_netType != GuestNetType.VHOSTUSER) {
+            if (_netType != GuestNetType.VHOSTUSER && _netType != 
GuestNetType.USER) {
                 netBuilder.append("<link state='" + (_linkStateUp ? "up" : 
"down") +"'/>\n");
             }
 
             if (_slot  != null) {
                 netBuilder.append(String.format("<address type='pci' 
domain='0x0000' bus='0x00' slot='0x%02x' function='0x0'/>\n", _slot));
             }
+
+            if (StringUtils.isNotBlank(_userIp4Network) && _userIp4Prefix != 
null) {
+                netBuilder.append(String.format("<ip family='ipv4' 
address='%s' prefix='%s'/>\n", _userIp4Network, _userIp4Prefix));

Review Comment:
   It is not serious @mlsorensen , just a trivial warning and i am just 
mentioning it without a request for change. We only run this on Linux AFAIK. If 
you want to bother go ahead, we could also create a ticket to change all 
occurrences of `\n` to `%n` in `String.format()` occurrences. But I know I can 
be over-pedantic in these matters so I tend to not push for these formalities.



-- 
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