You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2015/01/06 16:33:21 UTC
[07/25] git commit: updated refs/heads/vmware-disk-controllers to
e8a54f4
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....@tech.leaseweb.com>
Authored: Mon Jan 5 11:22:14 2015 +0100
Committer: Wei Zhou <w....@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);
}