cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/2] git commit: updated refs/heads/4.3 to e5761cc
Date Tue, 02 Dec 2014 09:53:16 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 b9d9c2b7f -> e5761cc85


CLOUDSTACK-5812: pass podId information when request for secondary ip address in Basic zone
guest network

(cherry picked from commit 4dcc5671d17bd96feacda0c1999bf1e9a64f530e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/components-api/src/com/cloud/network/IpAddressManager.java
	server/src/com/cloud/network/IpAddressManagerImpl.java
	server/src/com/cloud/network/NetworkServiceImpl.java


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

Branch: refs/heads/4.3
Commit: 90d6c01e4078e0d00b9e26498e5d9a85aad8de4a
Parents: b9d9c2b
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Mon Jan 6 17:22:17 2014 -0800
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Tue Dec 2 15:03:52 2014 +0530

----------------------------------------------------------------------
 .../components-api/src/com/cloud/network/IpAddressManager.java | 3 +--
 server/src/com/cloud/network/IpAddressManagerImpl.java         | 4 ++--
 server/src/com/cloud/network/NetworkServiceImpl.java           | 6 +++---
 3 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90d6c01e/engine/components-api/src/com/cloud/network/IpAddressManager.java
----------------------------------------------------------------------
diff --git a/engine/components-api/src/com/cloud/network/IpAddressManager.java b/engine/components-api/src/com/cloud/network/IpAddressManager.java
index 512c50b..43f071e 100644
--- a/engine/components-api/src/com/cloud/network/IpAddressManager.java
+++ b/engine/components-api/src/com/cloud/network/IpAddressManager.java
@@ -182,6 +182,5 @@ public interface IpAddressManager {
 
     public String allocateGuestIP(Account ipOwner, boolean isSystem, long zoneId, Long networkId,
String requestedIp) throws InsufficientAddressCapacityException;
 
-    String allocatePublicIpForGuestNic(Long networkId, DataCenter dc, Pod pod, Account caller,
String requestedIp) throws InsufficientAddressCapacityException;
-
+    String allocatePublicIpForGuestNic(Network network, Long podId, Account ipOwner, String
requestedIp) throws InsufficientAddressCapacityException;
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90d6c01e/server/src/com/cloud/network/IpAddressManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/IpAddressManagerImpl.java b/server/src/com/cloud/network/IpAddressManagerImpl.java
index f4bff58..9cde0bd 100644
--- a/server/src/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/com/cloud/network/IpAddressManagerImpl.java
@@ -1949,8 +1949,8 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
     }
 
     @Override
-    public String allocatePublicIpForGuestNic(Long networkId, DataCenter dc, Pod pod, Account
owner, String requestedIp) throws InsufficientAddressCapacityException {
-        PublicIp ip = assignPublicIpAddress(dc.getId(), null, owner, VlanType.DirectAttached,
networkId, requestedIp, false);
+    public String allocatePublicIpForGuestNic(Network network, Long podId, Account owner,
String requestedIp) throws InsufficientAddressCapacityException {
+        PublicIp ip = assignPublicIpAddress(network.getDataCenterId(), podId, owner, VlanType.DirectAttached,
network.getId(), requestedIp, false);
         if (ip == null) {
             s_logger.debug("There is no free public ip address");
             return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90d6c01e/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index 767d2b1..9bc92b9 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -693,15 +693,15 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService
{
             VMInstanceVO vmi = (VMInstanceVO)vm;
             Long podId = vmi.getPodIdToDeployIn();
             if (podId == null) {
-                throw new InvalidParameterValueException("vm pod id is null");
+                throw new InvalidParameterValueException("vm pod id is null; can't decide
the range for ip allocation");
             }
             Pod pod = _hostPodDao.findById(podId);
             if (pod == null) {
-                throw new InvalidParameterValueException("vm pod is null");
+                throw new InvalidParameterValueException("vm pod is null; can't decide the
range for ip allocation");
             }
 
             try {
-                ipaddr = _ipAddrMgr.allocatePublicIpForGuestNic(networkId, dc, pod, caller,
requestedIp);
+                ipaddr = _ipAddrMgr.allocatePublicIpForGuestNic(network, podId, ipOwner,
requestedIp);
                 if (ipaddr == null) {
                     throw new InvalidParameterValueException("Allocating ip to guest nic
" + nicId + " failed");
                 }


Mime
View raw message