<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks for the responses Nachi! I combined them into one message. See @PCM inline…<div><br></div><div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>PCM (Paul Michali)</div><div><br></div><div>MAIL <a href="mailto:pcm@cisco.com">pcm@cisco.com</a></div><div>IRC pcm_ (<a href="http://irc.freenode.net">irc.freenode.net</a>)</div><div>TW @pmichali</div></span>
</div>
<br><div><div>On Oct 11, 2013, at 5:40 PM, Nachi Ueno <<a href="mailto:nachi@ntti3.com">nachi@ntti3.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Paul<br><br>2013/10/11 Paul Michali <<a href="mailto:pcm@cisco.com">pcm@cisco.com</a>>:<br><blockquote type="cite">Hi folks,<br><br>I have a bunch of questions for you on VPNaaS in specific, and services in<br>general...<br><br>Nachi,<br><br>1) You hd a bug fix to do service provider framework support for VPN<br>(41827). It was held for Icehouse. Is that pretty much a working patch?<br>2) When are you planning on reopening the review?<br></blockquote><br>I'm not sure it will work without rebase.<br>I'll rebase, and test it again in next week.<br></blockquote><div><br></div>@PCM Thanks! I did pull new Neutron code and then patched in the code and it seems to be working fine, BTW.</div><div><br></div><div><br><blockquote type="cite"><br><blockquote type="cite"><br>Anyone,<br><br>I see that there is an agent.py file for VPN that has a main() and it starts<br>up an L3 agent, specifying the VPNAgent class (in same file).<br><br>3) How does this file get invoked? IOW how does the main() get invoked?<br></blockquote><br>we should use neutron-vpn-agent command to run vpn-agent.<br>This command invoke vpn agent class.<br>It is defined setup.cnf<br><br><a href="https://github.com/openstack/neutron/blob/master/setup.cfg#L98">https://github.com/openstack/neutron/blob/master/setup.cfg#L98</a><br><br><blockquote type="cite">4) I take it we can specify multiple device drivers in the config file for<br>the agent?<br></blockquote><br>Yes.<br><br><blockquote type="cite"><br>Currently, for the reference device driver, the hierarchy is currently<br>DeviceDriver [ABC] -> IPsecDriver [Swan based logic] -> OpenSwanDriver [one<br>function, OpenSwan specific]. The ABC has a specific set of APIs. Wondering<br>how to incorporate provider based device drivers.<br></blockquote><br>It is designed when we know only one swan based driver.<br>so It won't fit with another device drivers.<br>if so, You can also extend or modify DeviceDriver also.<br><br><blockquote type="cite">5) Should I push up more general methods from IPsecDriver to DeviceDriver,<br>so that they can be reused by other providers?<br></blockquote><br>That's woud be great<br><br><blockquote type="cite">6) Should I push down the swan based methods from DeviceDriver to<br>IPsecDriver and maybe name it SwanDeviceDriver?<br></blockquote><br>yes<br><br><blockquote type="cite"><br>I see that vpnaas.py is an extension for VPN that defines attributes and the<br>base plugin functions.<br><br>7) If a provider as additional attributes (can't think of any yet), how can<br>the attribute be extended, only for that provider (or is that the wrong way<br>to handle this)?<br></blockquote><br>You can extend existing extension.<br></blockquote><div><br></div>@PCM Would like more info on how to do that. Any examples? Would the attribute be static, always available (versus, only being available when a certain provider is selected)?</div><div><br></div><div><br><blockquote type="cite"><br><blockquote type="cite">For VPN, there are several attributes, each with varying ranges of values<br>allowed. This is reflected in the CLI help messages, the database (e.g.<br>enums), and is validated (some) in the client code and in the VPN service.<br></blockquote><br>Chaining existing attributes may be challenging on client side.<br>But let's discuss this with a concrete example.<br><br><blockquote type="cite">8) How do we provide different limits/allowed values for attributes, for a<br>specific provider (e.g. let's say the provider supports or doesn't support<br>an encryption method, or doesn't support IKE v1 or v2)?<br></blockquote><br>Driver can throw unsupported exception. ( It is not defined yet)<br></blockquote><div><br></div>@PCM Yeah, I was figuring at execution time we could reject the selection, but I'm wondering if we can be proactive and not show the option in the help and maybe validate it at the client side. The other side of this (and probably worse) is if a provider supports more options than the reference VPN. The new value would be hidden from the help, and we have the added value that the database is not set up to allow the value (say an emu is being used).</div><div><br></div><div>I have an example, and that is of a provider (yet) not supporting (via programatic interface) IKE v2. Not sure if this is a good example though, as, for VPN, it seems like the IKE and IPSec policies, are they not associated with the provider, right? If that is the case, then how do we handle the case where a provider has a limitation (in this case) or more capabilities than the reference VPN?</div><div><br></div><div> </div><div><blockquote type="cite"><br><blockquote type="cite">9) Should the code be changed not to do any client validation, and to have<br>generic help, so that different values could be provided, or is there a way<br>to customize this based on provider?<br></blockquote><br>That's could be one way.<br><br><blockquote type="cite">10) If customized, is it possible to reflect the difference in allowed<br>values in the help strings (and client validation)?<br></blockquote><br>May be, server side can tell the client "hey I'm supporting this set of values"<br>Then client can use it as the help string.<br># This change may need bp.<br></blockquote><div><br></div>@PCM That was what I was thinking… having an API that the client can use to determine the server's capabilities. Was thinking of that for a summit session, but not sure how the community feels about doing something like that, and whether the complexity is worth the effort. Mark? Kyle?</div><div><br></div><div>I had similar thoughts about that info be using for the attribute values, to handle the case where a provider handles more or less than what the reference version handles. Granted, there are complications, like the IKE and IPSec policies, which don't seem to be related to the provider. </div><div><br></div><div>Obviously, this architecture issue applies to other service providers.</div><div><br></div><div><br></div><div><blockquote type="cite"><br><blockquote type="cite">11) How do we handle the variation in the database (e.g. when enums<br>specifying a fixed set of values)? Do we need to change the database to be<br>more generic (strings and ints) or do we somehow extend the database?<br></blockquote><br>more than one driver will use same DB.<br>so I'm +1 for generic db structure if it is really needed.<br></blockquote><div><br></div>@PCM Yeah, I see the <b><u>potential</u></b> problem (as providers add support, enums could pose problems). But, I don't have a case of it <b>right now</b>, so it is likely a case of YAGNI(you aren't gonna need it), and we should deal with it, when it happens. I just hope I don't see it next week :)</div><div><br></div><div><br></div><div><br><blockquote type="cite"><br><blockquote type="cite">I was wondering in general how providers can customize service features,<br>based on their capabilities (better or worse than reference). I could create<br>a Summit session topic on this, but wanted to know if this is something that<br>has already been addressed or if a different architectural approach has<br>already been defined.<br></blockquote><br>AFIK, That's new challenge.<br>I think LB team and FW team is facing same issue.<br>For the RPC, I see there is an IPSEC_DRIVER_TOPIC and IPSEC_AGENT_TOPIC,</blockquote><blockquote type="cite"><blockquote type="cite">each of which gets the host appended to the end.<br><br>12) For a provider, I'm assuming I'd create a provider specific topic name?<br></blockquote><br>Yes.<br><br><blockquote type="cite">13) Is there any convention to the naming of the topics?<br><svc>_<provider>_<type>.<host>?<br></blockquote><br>It is not discussed yet, but your example makes sense.<br><br><blockquote type="cite">14) Is it just be, or is it just a bit misleading with the agent topic name?<br>Seems like the RPCs are all between the service and device drivers.<br><br>In Icehouse, we're talking about other protocols for VPN, like SSL-VPN,<br>MPLS/BGP.<br></blockquote><br>I'm not sure I get this question.<br></blockquote><div><br></div>@PCM Sorry. I wasn't real clear. What I see is a service driver and a device driver. For RPCs sent from the service driver to the device driver, it looks like it uses IPSEC_AGENT_TOPIC, and RPCs from the device driver to the service driver use the IPSEC_DRIVER_TOPIC. I see the VPNAgent creating all the device drivers, but other than that, I don't seem to see the "agent" involved in any interactions. So, seeing the IPSEC_AGENT_TOPIC, seemed misleading/confusing to me. I guess I was thinking more of these being service and device topics. Maybe I'm missing something?</div><div><br></div><div><br><blockquote type="cite">IMO, each driver will use unique topic, then we can handle multiple protocols.<br><br><blockquote type="cite">15) Has anyone thought about the class naming for the service/device<br>drivers, and the RPC topics, or will it be a totally separate hierarchy?<br><br><br>On the underlying provider device, there could be a case where a mapping is<br>needed. For example, the VPN connection UUID may need to be mapped to a<br>Tunnel number.<br></blockquote><br>What's this tunnel number?<br></blockquote><div><br></div>@PCM For a Cisco router, the VPN connection would (for example) occur over a tunnel. On the device the tunnels are numbered, so you may have tunnel1, tunnel2, etc. These tunnels would correspond to the OpenStack VPN connections, which are identified by UUIDs. </div><div><br><blockquote type="cite"><br><blockquote type="cite">16) Is there any precedence for persisting this type of information in<br>OpenStack?<br></blockquote><br>I think we have not.<br></blockquote><div><br></div><div>@PCM Because of the tunnel/UUID difference, I'm thinking mapping is needed and some persistence of that mapping (or some complicated syncing of information). I was hoping there was some other case where this type of mapping is needed.</div><div><br></div><div><br></div><blockquote type="cite"><br><blockquote type="cite">17) Would the device driver send that back up to the plugin, or is there<br>some way to persist at the driver level?<br><br>I'm probably going to use a REST API in the device driver to talk to the<br>provider process (in a VM).<br></blockquote><br>You mean data persistence?<br></blockquote><div><br></div>@PCM No, in Q#17, I'm talking about the mapping of tunnels to VPN connection UUIDs. If the mapping is needed, I can see hacky ways to deal with it, other than persisting, but was hoping there is a way to persist that mapping and how it could be done.</div><div><br></div><div><br><blockquote type="cite">IMO, each driver should handle it if the data is driver specific.<br>Also, you can add new resource extension for a driver.<br></blockquote><div><br></div>@PCM Can you elaborate on the "resource extension"? I'm looking for how to persist some configuration information in OpenStack, for the device.</div><div><br></div><div><br><blockquote type="cite"><br><blockquote type="cite">18) Are there any libraries in Neutron for REST API client that I can use<br>(versus rolling my own)?<br></blockquote><br>python-neutronclient is the client library. It's not only for CLI :P<br></blockquote><div><br></div>@PCM Not talking about the client API. I'm talking about the API that will be used by the device driver to talk to the device. For the VPN reference this is config files and commands that are invoked, but for the provider I'm thinking of using the REST API that the device provides (versus NETCONF). Wondering if there is something that is commonly used, or do I just use the Request/urllib2/httplib2 package for this?</div><div><br></div><div><br></div><div>Thanks!</div><div><br></div><div>PCM</div><div><br></div><div><br></div><div><blockquote type="cite"><br>Best<br>Nachi<br></blockquote></div><br></div></body></html>