You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2013/02/28 09:37:06 UTC

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

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 <ht...@schubergphilis.com>
Authored: Thu Feb 28 09:36:55 2013 +0100
Committer: Hugo Trippaers <ht...@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");
             }
         }
         


RE: 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

Posted by Hugo Trippaers <HT...@schubergphilis.com>.
Hey Kishan,

I just pushed in the fix in review 8701. Together with your fixes in commit 836ce6c1 this should allow VPC's to be used together with SDN (Nicira and BigSwitch).

Can you backport your fixes to 4.1? This would make the VPC feature usable for folks using SDN.

Cheers,

Hugo

> -----Original Message-----
> From: Kishan Kavala [mailto:Kishan.Kavala@citrix.com]
> Sent: Thursday, February 28, 2013 10:25 AM
> To: 'cloudstack-dev@incubator.apache.org'
> Cc: 'hugo@apache.org'
> Subject: RE: 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
> 
> Hugo,
>  I added some code to master branch to allow providers other than
> VPCVirtualRouter.
> 
> Commit : 836ce6c11ad6a11db2c4564620e46bf5e17f8189
> 
> This might be similar to what you are trying to do.
> 
> Btw, what is SBP-2418?
> 
> ~kishan
> 
> > -----Original Message-----
> > From: hugo@apache.org [mailto:hugo@apache.org]
> > Sent: Thursday, 28 February 2013 2:07 PM
> > To: cloudstack-commits@incubator.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
> >
> > 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 <ht...@schubergphilis.com>
> > Authored: Thu Feb 28 09:36:55 2013 +0100
> > Committer: Hugo Trippaers <ht...@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/VpcManager
> > Impl.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");
> >              }
> >          }
> >


RE: 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

Posted by Kishan Kavala <Ki...@citrix.com>.
Hugo,
 I added some code to master branch to allow providers other than VPCVirtualRouter.

Commit : 836ce6c11ad6a11db2c4564620e46bf5e17f8189

This might be similar to what you are trying to do.

Btw, what is SBP-2418?

~kishan

> -----Original Message-----
> From: hugo@apache.org [mailto:hugo@apache.org]
> Sent: Thursday, 28 February 2013 2:07 PM
> To: cloudstack-commits@incubator.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
> 
> 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 <ht...@schubergphilis.com>
> Authored: Thu Feb 28 09:36:55 2013 +0100
> Committer: Hugo Trippaers <ht...@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/VpcManager
> Impl.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");
>              }
>          }
>