cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject git commit: updated refs/heads/4.1 to 4aea133
Date Wed, 10 Apr 2013 13:03:32 GMT
Updated Branches:
  refs/heads/4.1 d6f4eaa23 -> 4aea133fe


Make the VpcManager check a list of supported providers


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

Branch: refs/heads/4.1
Commit: 4aea133fef91a470f76f0ba278c7b74d0d2f6971
Parents: d6f4eaa
Author: Hugo Trippaers <trippie@gmail.com>
Authored: Tue Jan 29 08:29:25 2013 +0100
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Wed Apr 10 13:58:24 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/cloudstack/blob/4aea133f/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 fda3c48..a09ddee 100644
--- a/server/src/com/cloud/network/vpc/VpcManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
@@ -178,6 +178,7 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager{
     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);
  
     int _cleanupInterval;
     int _maxNetworks;
@@ -994,9 +995,9 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager{
         //1) in current release, only vpc provider is supported by Vpc offering
         List<Provider> providers = _ntwkModel.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