From 03138dee07ec38ad9e62a9a3a95c18264f7c56f0 Mon Sep 17 00:00:00 2001 From: Alena Prokharchyk Date: Mon, 9 Jul 2012 10:10:53 -0700 Subject: [PATCH] listPublicIpAddresses api: don't set associatedWithNetworkId if corresponding field is null in the DB --- server/src/com/cloud/api/ApiResponseHelper.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index aeb9eb2f14b..c94434d73be 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -793,14 +793,8 @@ public class ApiResponseHelper implements ResponseGenerator { ipResponse.setAssociatedNetworkId(ipAddr.getAssociatedWithNetworkId()); ipResponse.setVpcId(ipAddr.getVpcId()); - // Network id the ip is associated withif associated networkId is null, try to get this information from vlan - Long associatedNetworkId = ipAddr.getAssociatedWithNetworkId(); + // Network id the ip is associated with (if associated networkId is null, try to get this information from vlan) Long vlanNetworkId = ApiDBUtils.getVlanNetworkId(ipAddr.getVlanId()); - if (associatedNetworkId == null) { - associatedNetworkId = vlanNetworkId; - } - - ipResponse.setAssociatedNetworkId(associatedNetworkId); // Network id the ip belongs to Long networkId;