cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sate...@apache.org
Subject [07/25] git commit: updated refs/heads/vmware-disk-controllers to e8a54f4
Date Tue, 06 Jan 2015 15:33:21 GMT
CLOUDSTACK-8063: list secondary Ips information on non-default nics in VM response


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

Branch: refs/heads/vmware-disk-controllers
Commit: 93429443d50eabd5c6e73a412b8935120e13c42d
Parents: 48aa7e1
Author: Wei Zhou <w.zhou@tech.leaseweb.com>
Authored: Mon Jan 5 11:22:14 2015 +0100
Committer: Wei Zhou <w.zhou@tech.leaseweb.com>
Committed: Mon Jan 5 11:22:14 2015 +0100

----------------------------------------------------------------------
 .../src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java  | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93429443/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
index 8ea142a..890b4bc 100644
--- a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
@@ -358,6 +358,18 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO,
Long> implem
                 nicResponse.setType(uvo.getGuestType().toString());
             }
             nicResponse.setIsDefault(uvo.isDefaultNic());
+            List<NicSecondaryIpVO> secondaryIps = ApiDBUtils.findNicSecondaryIps(uvo.getNicId());
+            if (secondaryIps != null) {
+                List<NicSecondaryIpResponse> ipList = new ArrayList<NicSecondaryIpResponse>();
+                for (NicSecondaryIpVO ip : secondaryIps) {
+                    NicSecondaryIpResponse ipRes = new NicSecondaryIpResponse();
+                    ipRes.setId(ip.getUuid());
+                    ipRes.setIpAddr(ip.getIp4Address());
+                    ipList.add(ipRes);
+                }
+                nicResponse.setSecondaryIps(ipList);
+            }
+
             nicResponse.setObjectName("nic");
             userVmData.addNic(nicResponse);
         }


Mime
View raw message