incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject git commit: refs/heads/vpc-pointfix-on-4.0 - SBP-2418: Use a provider list for VPC checks instead of a fixed configuration. This allows more providers to implement VPC services
Date Thu, 28 Feb 2013 08:37:06 GMT
Updated Branches:
  refs/heads/vpc-pointfix-on-4.0 [created] 0b9bfc6ec


SBP-2418: Use a provider list for VPC checks instead of a fixed
configuration. This allows more providers to implement VPC services

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

Branch: refs/heads/vpc-pointfix-on-4.0
Commit: 0b9bfc6ece5922c208c6d8fd67867ff475f41db3
Parents: 4d90876
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Thu Feb 28 09:36:55 2013 +0100
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Thu Feb 28 09:36:55 2013 +0100

----------------------------------------------------------------------
 .../src/com/cloud/network/vpc/VpcManagerImpl.java  |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0b9bfc6e/server/src/com/cloud/network/vpc/VpcManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcManagerImpl.java b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
index 675ae59..7a32656 100644
--- a/server/src/com/cloud/network/vpc/VpcManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
@@ -168,6 +168,7 @@ public class VpcManagerImpl implements VpcManager, Manager{
     private final ScheduledExecutorService _executor = Executors.newScheduledThreadPool(1,
new NamedThreadFactory("VpcChecker"));
     private VpcProvider vpcElement = null;
     private final List<Service> nonSupportedServices = Arrays.asList(Service.SecurityGroup,
Service.Firewall);
+    private final List<Provider> supportedProviders = Arrays.asList(Provider.VPCVirtualRouter,
Provider.NiciraNvp);
  
     String _name;
     int _cleanupInterval;
@@ -994,9 +995,9 @@ public class VpcManagerImpl implements VpcManager, Manager{
         //1) in current release, only vpc provider is supported by Vpc offering
         List<Provider> providers = _ntwkMgr.getNtwkOffDistinctProviders(guestNtwkOff.getId());
         for (Provider provider : providers) {
-            if (provider != Provider.VPCVirtualRouter) {
-                throw new InvalidParameterValueException("Only provider of type " + Provider.VPCVirtualRouter.getName()

-                        + " is supported for network offering that can be used in VPC");
+            if (!supportedProviders.contains(provider) ) {
+                throw new InvalidParameterValueException("Provider of type " + provider.getName()

+                        + " is not supported for network offerings that can be used in VPC");
             }
         }
         


Mime
View raw message