You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2012/12/24 01:57:38 UTC

[20/50] [abbrv] git commit: Update the router status after start network

Update the router status after start network

Start network can possible start the router as well. If it's already started by
start network, then we won't need to start it again.


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

Branch: refs/heads/api_refactoring
Commit: 96c7bbeb86fa0bf2cca720a11da74ba7f19bc0a3
Parents: 5eba489
Author: Sheng Yang <sh...@citrix.com>
Authored: Wed Nov 14 14:23:47 2012 -0800
Committer: Sheng Yang <sh...@citrix.com>
Committed: Fri Dec 21 15:22:07 2012 -0800

----------------------------------------------------------------------
 .../router/VirtualNetworkApplianceManagerImpl.java |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/96c7bbeb/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index a91eda6..966c32d 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -2690,6 +2690,12 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
             }
         }
 
+        //After start network, check if it's already running
+        router = _routerDao.findById(routerId);
+        if (router.getState() == State.Running) {
+            return router;
+        }
+
         UserVO user = _userDao.findById(UserContext.current().getCallerUserId());
         Map<Param, Object> params = new HashMap<Param, Object>();
         if (reprogramNetwork) {