Copilot commented on code in PR #11245: URL: https://github.com/apache/cloudstack/pull/11245#discussion_r2231028420
########## plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java: ########## @@ -252,6 +252,14 @@ public LibvirtVMDef.InterfaceDef plug(NicTO nic, String guestOsType, String nicA intf.defBridgeNet(_bridges.get("private"), null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter)); } else if (nic.getType() == Networks.TrafficType.Storage) { String storageBrName = nic.getName() == null ? _bridges.get("private") : nic.getName(); + if (nic.getBroadcastType() == Networks.BroadcastDomainType.Storage) { + vNetId = Networks.BroadcastDomainType.getValue(nic.getBroadcastUri()); + protocol = Networks.BroadcastDomainType.Vlan.scheme(); + } + if (isValidProtocolAndVnetId(vNetId, protocol)) { + s_logger.debug("creating a vNet dev and bridge for public traffic per traffic label {}" + trafficLabel); Review Comment: The debug message incorrectly refers to 'public traffic' when this code is handling storage traffic. It should say 'storage traffic' instead. ```suggestion s_logger.debug("creating a vNet dev and bridge for storage traffic per traffic label {}" + trafficLabel); ``` ########## plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java: ########## @@ -252,6 +252,14 @@ public LibvirtVMDef.InterfaceDef plug(NicTO nic, String guestOsType, String nicA intf.defBridgeNet(_bridges.get("private"), null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter)); } else if (nic.getType() == Networks.TrafficType.Storage) { String storageBrName = nic.getName() == null ? _bridges.get("private") : nic.getName(); + if (nic.getBroadcastType() == Networks.BroadcastDomainType.Storage) { + vNetId = Networks.BroadcastDomainType.getValue(nic.getBroadcastUri()); + protocol = Networks.BroadcastDomainType.Vlan.scheme(); + } + if (isValidProtocolAndVnetId(vNetId, protocol)) { + s_logger.debug("creating a vNet dev and bridge for public traffic per traffic label {}" + trafficLabel); Review Comment: String concatenation is used incorrectly with a placeholder '{}'. Either use String.format() or replace '{}' with '%s' for proper formatting, or use simple concatenation without the placeholder. ```suggestion s_logger.debug("creating a vNet dev and bridge for public traffic per traffic label {}", trafficLabel); ``` -- 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: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org