You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/04/25 16:46:06 UTC

[40/51] [abbrv] git commit: updated refs/heads/marvin_refactor to dbcfc66

CLOUDSTACK-1573 listNics response update for not showing vlan to normal user


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1f97b528
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1f97b528
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1f97b528

Branch: refs/heads/marvin_refactor
Commit: 1f97b528c5fb73e8165b63ad5098e7191914aa59
Parents: 08f6a24
Author: Jayapal <ja...@citrix.com>
Authored: Thu Apr 25 12:35:04 2013 +0530
Committer: Murali Reddy <mu...@citrix.com>
Committed: Thu Apr 25 14:48:41 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiResponseHelper.java |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1f97b528/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 894ec8d..c181495 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -3659,7 +3659,10 @@ public class ApiResponseHelper implements ResponseGenerator {
 
     public NicResponse createNicResponse(Nic result) {
         NicResponse response = new NicResponse();
+        NetworkVO network = _entityMgr.findById(NetworkVO.class, result.getNetworkId());
+
         response.setId(result.getUuid());
+        response.setNetworkid(network.getUuid());
         response.setIpaddress(result.getIp4Address());
 
         if (result.getSecondaryIp()) {
@@ -3677,18 +3680,11 @@ public class ApiResponseHelper implements ResponseGenerator {
         }
 
         response.setGateway(result.getGateway());
-        response.setId(result.getUuid());
-        response.setGateway(result.getGateway());
         response.setNetmask(result.getNetmask());
         response.setMacAddress(result.getMacAddress());
-        if (result.getBroadcastUri() != null) {
-            response.setBroadcastUri(result.getBroadcastUri().toString());
-        }
-        if (result.getIsolationUri() != null) {
-            response.setIsolationUri(result.getIsolationUri().toString());
-        }
+
         if (result.getIp6Address() != null) {
-            response.setId(result.getIp6Address());
+            response.setIp6Address(result.getIp6Address());
         }
 
         response.setIsDefault(result.isDefaultNic());