Updated Branches:
  refs/heads/4.1 5142de448 -> 60fe5fd92

CLOUDSTACK-2083 router never comes to running state when addNicToVirtualMachine 
api is called with network id which is only allocated


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

Branch: refs/heads/4.1
Commit: 60fe5fd923ba305c75bb808f2fa041969f4cd927
Parents: 5142de4
Author: Mice Xia <mice_...@tcloudcomputing.com>
Authored: Fri Apr 19 10:45:43 2013 +0800
Committer: Marcus Sorensen <mar...@betterservers.com>
Committed: Mon Jul 8 23:35:54 2013 -0600

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkManagerImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/60fe5fd9/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java 
b/server/src/com/cloud/network/NetworkManagerImpl.java
index 68de7a1..c508a48 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -3494,8 +3494,8 @@ public class NetworkManagerImpl extends ManagerBase 
implements NetworkManager, L
                 
                 //2) prepare nic
                 if (prepare) {
-                    NetworkVO networkVO = 
_networksDao.findById(network.getId());
-                    nic = prepareNic(vmProfile, dest, context, nic.getId(), 
networkVO);
+                    Pair<NetworkGuru, NetworkVO> implemented = 
implementNetwork(nic.getNetworkId(), dest, context);
+                    nic = prepareNic(vmProfile, dest, context, nic.getId(), 
implemented.second());
                     s_logger.debug("Nic is prepared successfully for vm " + vm 
+ " in network " + network);
                 }
                 

Reply via email to