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


##########
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:
   sonar advice , i think it makes sense, even though we are pretty sure we run 
on linux ;)
   ```suggestion
                   netBuilder.append(String.format("<ip family='ipv4' 
address='%s' prefix='%s'/>%n", _userIp4Network, _userIp4Prefix));
   ```



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