Alena, Additionally, there's a bit of discontinuity between VpcProvider, NetworkElement, and Network.Service for me. Could you help me here. This is going to be confusing...
Basically, for each Network.Service there is a corresponding interface that extends NetworkElement. VpcProvider also extends NetworkElement and seems as though there should be a corresponding Network.Service for Vpc. If you were to add a Network.Service("Vpc") then it would seem logical to me that when you are doing startVpc/shutdownVpc/applyStaticRoutes/applyVpcPrivateGateway/deleteVpcPrivateGateway you would look in vpc_service_map for the provider that provides "Vpc." Now if you were to do that, what value is vpc_service_map? Sorry, all the provider to service to capability to vpc/network/offering mappings are hard to follow and keep in my head. Another weird thing is that for applyStaticRoutes you look for a provider of StaticNat but then once you find it you call VpcProvider.applyStaticRoutes. Why the check for StaticNat? Darren On Thu, Sep 26, 2013 at 11:02 AM, Alena Prokharchyk <alena.prokharc...@citrix.com> wrote: > They should, Darren. "vpcservicemap" was added just in this release, and > only shutdown/start use it. We should fix it for > applyStaticRoutes/applyVpcPrivateGateway/deleteVpcPrivateGateway. I will > file a Jira ticket for myself to fix it. > > -Alena. > > From: Darren Shepherd <darren.s.sheph...@gmail.com> > Reply-To: "dev@cloudstack.apache.org" <dev@cloudstack.apache.org> > Date: Thursday, September 26, 2013 10:52 AM > To: "dev@cloudstack.apache.org" <dev@cloudstack.apache.org> > Subject: VpcProvider doesn't really seems extensible > > I'm looking to add a new VpcProvider, but it seems the code is > essentially hard coded to using the Provider.VPCVirtualRouter in > getVpcElements(). I could just add a setVpcElements() and inject my > own implementation, but I think it will run into some problems > (haven't tried, just reading the code) > > Both shutdownVpc and startVpc both do the intersection of providers > supported by the VPC and getVpcElements(), so in theory only the > elements/providers applied to the VPC should get executed if you were > to have multiple VpcProviders. > > applyStaticRoutes(), applyVpcPrivateGateway(), and > deleteVpcPrivateGateway() don't do the similar check and instead just > call of all getVpcElements(). Am I missing something here, shouldn't > those methods all check vpc_service_map? > > Darren >