sureshanaparti commented on code in PR #10645:
URL: https://github.com/apache/cloudstack/pull/10645#discussion_r2266365487


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/VifDriverBase.java:
##########
@@ -78,4 +80,13 @@ protected LibvirtVMDef.InterfaceDef.NicModel 
getGuestNicModel(String platformEmu
     public boolean isExistingBridge(String bridgeName) {
         return false;
     }
+
+    protected static int getNetworkRateKbps(NicTO nic) {
+        if (nic.getNetworkRateMbps() != null && 
nic.getNetworkRateMbps().intValue() != -1) {
+            return nic.getNetworkRateMbps().intValue() * bitsPerMbpsToKbps;
+        }
+        else {

Review Comment:
   ```suggestion
           return 0;
   ```



##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/VifDriverBase.java:
##########
@@ -78,4 +80,13 @@ protected LibvirtVMDef.InterfaceDef.NicModel 
getGuestNicModel(String platformEmu
     public boolean isExistingBridge(String bridgeName) {
         return false;
     }
+
+    protected static int getNetworkRateKbps(NicTO nic) {
+        if (nic.getNetworkRateMbps() != null && 
nic.getNetworkRateMbps().intValue() != -1) {
+            return nic.getNetworkRateMbps().intValue() * bitsPerMbpsToKbps;
+        }
+        else {
+          return 0;

Review Comment:
   ```suggestion
   ```



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

Reply via email to