Commit 48dc8185 authored by Anton Beloglazov's avatar Anton Beloglazov

Fixed HostTest

parent da7a2d31
...@@ -197,6 +197,9 @@ public class Vm { ...@@ -197,6 +197,9 @@ public class Vm {
* @return the current requested bw * @return the current requested bw
*/ */
public long getCurrentRequestedBw() { public long getCurrentRequestedBw() {
if (isBeingInstantiated()) {
return getBw();
}
return (long) (getCloudletScheduler().getCurrentRequestedUtilizationOfBw() * getBw()); return (long) (getCloudletScheduler().getCurrentRequestedUtilizationOfBw() * getBw());
} }
...@@ -206,6 +209,9 @@ public class Vm { ...@@ -206,6 +209,9 @@ public class Vm {
* @return the current requested ram * @return the current requested ram
*/ */
public int getCurrentRequestedRam() { public int getCurrentRequestedRam() {
if (isBeingInstantiated()) {
return getRam();
}
return (int) (getCloudletScheduler().getCurrentRequestedUtilizationOfRam() * getRam()); return (int) (getCloudletScheduler().getCurrentRequestedUtilizationOfRam() * getRam());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment