Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BDE4A17916 for ; Wed, 4 Feb 2015 20:52:10 +0000 (UTC) Received: (qmail 91178 invoked by uid 500); 4 Feb 2015 20:52:11 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 91136 invoked by uid 500); 4 Feb 2015 20:52:11 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 91127 invoked by uid 99); 4 Feb 2015 20:52:11 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2015 20:52:11 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 821EDE03E8; Wed, 4 Feb 2015 20:52:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dahn@apache.org To: commits@cloudstack.apache.org Date: Wed, 04 Feb 2015 20:52:11 -0000 Message-Id: <98c98b0ef79b4ff999518d9fae75c33b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: updated refs/heads/master to a2ddabd Repository: cloudstack Updated Branches: refs/heads/master 6cd2b5379 -> a2ddabde0 CLOUDSTACK-8197 create MinVRVersion config item Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b586439c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b586439c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b586439c Branch: refs/heads/master Commit: b586439c9f20539c914693c5baef8d90877a34a3 Parents: 552f2ae Author: Daan Hoogland Authored: Tue Feb 3 13:18:15 2015 +0100 Committer: Daan Hoogland Committed: Tue Feb 3 13:18:15 2015 +0100 ---------------------------------------------------------------------- .../com/cloud/network/VirtualNetworkApplianceService.java | 2 -- .../orchestration/service/NetworkOrchestrationService.java | 7 ++++++- .../engine/orchestration/NetworkOrchestrator.java | 9 ++++++--- .../src/com/cloud/agent/manager/MockVmManagerImpl.java | 5 ++--- .../com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java | 9 ++++----- server/src/com/cloud/network/router/NetworkHelperImpl.java | 6 +++--- 6 files changed, 21 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b586439c/api/src/com/cloud/network/VirtualNetworkApplianceService.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/network/VirtualNetworkApplianceService.java b/api/src/com/cloud/network/VirtualNetworkApplianceService.java index 2984e3f..815ae4d 100644 --- a/api/src/com/cloud/network/VirtualNetworkApplianceService.java +++ b/api/src/com/cloud/network/VirtualNetworkApplianceService.java @@ -68,6 +68,4 @@ public interface VirtualNetworkApplianceService { VirtualRouter findRouter(long routerId); List upgradeRouterTemplate(UpgradeRouterTemplateCmd cmd); - - public static final String MinVRVersion = "4.5.0"; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b586439c/engine/api/src/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java ---------------------------------------------------------------------- diff --git a/engine/api/src/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java b/engine/api/src/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java index 5412ee4..b71aa96 100644 --- a/engine/api/src/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java +++ b/engine/api/src/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java @@ -22,6 +22,7 @@ import java.util.Map; import org.apache.cloudstack.acl.ControlledEntity.ACLType; import org.apache.cloudstack.framework.config.ConfigKey; +import org.apache.cloudstack.framework.config.ConfigKey.Scope; import com.cloud.deploy.DataCenterDeployment; import com.cloud.deploy.DeployDestination; @@ -62,9 +63,13 @@ public interface NetworkOrchestrationService { static final String NetworkLockTimeoutCK = "network.lock.timeout"; static final String GuestDomainSuffixCK = "guest.domain.suffix"; static final String NetworkThrottlingRateCK = "network.throttling.rate"; + static final String MinVRVersionCK = "minreq.sysvmtemplate.version"; + + static final ConfigKey MinVRVersion = new ConfigKey(String.class, MinVRVersionCK, "Advanced", "4.6.0", + "What version should the Virtual Routers report", true, ConfigKey.Scope.Zone, null); static final ConfigKey NetworkLockTimeout = new ConfigKey(Integer.class, NetworkLockTimeoutCK, "Network", "600", - "Lock wait timeout (seconds) while implementing network", true); + "Lock wait timeout (seconds) while implementing network", true, Scope.Global, null); static final ConfigKey GuestDomainSuffix = new ConfigKey(String.class, GuestDomainSuffixCK, "Network", "cloud.internal", "Default domain name for vms inside virtualized networks fronted by router", true, ConfigKey.Scope.Zone, null); static final ConfigKey NetworkThrottlingRate = new ConfigKey("Network", Integer.class, NetworkThrottlingRateCK, "200", http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b586439c/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java ---------------------------------------------------------------------- diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index 0c7b3ed..ead4682 100644 --- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -38,6 +38,7 @@ import javax.inject.Inject; import javax.naming.ConfigurationException; import com.cloud.network.Networks; + import org.apache.log4j.Logger; import org.apache.cloudstack.acl.ControlledEntity.ACLType; import org.apache.cloudstack.context.CallContext; @@ -47,6 +48,7 @@ import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationSe import org.apache.cloudstack.framework.config.ConfigDepot; import org.apache.cloudstack.framework.config.ConfigKey; import org.apache.cloudstack.framework.config.Configurable; +import org.apache.cloudstack.framework.config.ConfigKey.Scope; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.framework.messagebus.MessageBus; import org.apache.cloudstack.framework.messagebus.PublishScope; @@ -3327,12 +3329,13 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra } public static final ConfigKey NetworkGcWait = new ConfigKey(Integer.class, "network.gc.wait", "Advanced", "600", - "Time (in seconds) to wait before shutting down a network that's not in used", false); + "Time (in seconds) to wait before shutting down a network that's not in used", false, Scope.Global, null); public static final ConfigKey NetworkGcInterval = new ConfigKey(Integer.class, "network.gc.interval", "Advanced", "600", - "Seconds to wait before checking for networks to shutdown", true); + "Seconds to wait before checking for networks to shutdown", true, Scope.Global, null); @Override public ConfigKey[] getConfigKeys() { - return new ConfigKey[] {NetworkGcWait, NetworkGcInterval, NetworkLockTimeout, GuestDomainSuffix, NetworkThrottlingRate}; + return new ConfigKey[] {NetworkGcWait, NetworkGcInterval, NetworkLockTimeout, GuestDomainSuffix, NetworkThrottlingRate, MinVRVersion}; } + } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b586439c/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java index 00cd108..f77e12b 100644 --- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java +++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java @@ -26,8 +26,7 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; -import com.cloud.network.VirtualNetworkApplianceService; - +import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; @@ -551,7 +550,7 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager { @Override public GetDomRVersionAnswer getDomRVersion(GetDomRVersionCmd cmd) { - String template_version = "CloudStack Release "+ VirtualNetworkApplianceService.MinVRVersion.toString(); + String template_version = "CloudStack Release "+ NetworkOrchestrationService.MinVRVersion.defaultValue(); return new GetDomRVersionAnswer(cmd, null, template_version, UUID.randomUUID().toString()); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b586439c/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java index b054b0e..6f7ef43 100644 --- a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java @@ -22,18 +22,17 @@ import java.util.List; import javax.ejb.Local; import javax.inject.Inject; -import org.apache.log4j.Logger; -import org.springframework.stereotype.Component; - import org.apache.cloudstack.api.response.DomainRouterResponse; import org.apache.cloudstack.api.response.NicResponse; +import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; import com.cloud.api.ApiResponseHelper; import com.cloud.api.query.vo.DomainRouterJoinVO; import com.cloud.maint.Version; import com.cloud.network.Networks.TrafficType; -import com.cloud.network.VirtualNetworkApplianceService; import com.cloud.network.router.VirtualRouter; import com.cloud.network.router.VirtualRouter.Role; import com.cloud.user.Account; @@ -83,7 +82,7 @@ public class DomainRouterJoinDaoImpl extends GenericDaoBase= 0; + return Version.compare(trimmedVersion, NetworkOrchestrationService.MinVRVersion.valueIn(dcid)) >= 0; } protected DomainRouterVO start(DomainRouterVO router, final User user, final Account caller, final Map params, final DeploymentPlan planToDeploy)