Merge branch '3.0.x' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 3.0.x

This commit is contained in:
Devdeep Singh 2012-05-23 19:01:22 +05:30
commit dabccbd085
1 changed files with 3 additions and 2 deletions

View File

@ -2017,8 +2017,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
Long bytesSent = 0L;
Long bytesRcvd = 0L;
if (VirtualMachineName.isValidRouterName(cmd.getVmName())) {
if (cmd.getPrivateRouterIpAddress() != null) {
if (VirtualMachineName.isValidRouterName(cmd.getVmName())) {
//Private IP is 0.0.0.0 for Direct Network virtual router and network usage is not metered for Direct network from Virtual Router
if (cmd.getPrivateRouterIpAddress() != null && !"0.0.0.0".equals(cmd.getPrivateRouterIpAddress())) {
long[] stats = getNetworkStats(cmd.getPrivateRouterIpAddress());
bytesSent = stats[0];
bytesRcvd = stats[1];