incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [5/32] git commit: Update the router status after start network
Date Thu, 27 Dec 2012 21:48:17 GMT
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/ui-plugins
Commit: 96c7bbeb86fa0bf2cca720a11da74ba7f19bc0a3
Parents: 5eba489
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Wed Nov 14 14:23:47 2012 -0800
Committer: Sheng Yang <sheng.yang@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) {


Mime
View raw message