Hi Youcef,<div><br></div><div>Please see my comments inline.<br><br><div class="gmail_quote">On Wed, Nov 28, 2012 at 2:14 AM, Youcef Laribi <span dir="ltr"><<a href="mailto:Youcef.Laribi@eu.citrix.com" target="_blank">Youcef.Laribi@eu.citrix.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Changing the subject line (was: Progress on lbaas-plugin-api-crud)…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Eugene,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Let’s make sure we agree on the assumptions:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">LBaaS Plugin has a set of drivers (vendor-specific). Drivers run in the LBaaS agent process.</span></p>
</div></blockquote><div>Agreed. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Each driver (provider in Salvatore’s terminology) is registered against a service type (yes, service type can include LB drivers, firewall drivers, etc.).</span></p>
</div></blockquote><div>Agreed. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">There can be several LBaaS drivers registered against the same service type (e.g. “high-performance LB” service type).</span></p>
</div></blockquote><div>That probably needs to be clarified in more detail, but it does make sense. As far as I understand there is exactly 1 driver per service type, but there could be several service types referencing the same driver (like you mentioned, "high-perf-lb", "low-cost-lb", etc)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If these assumptions are incorrect or need to be clarified further, let’s start by doing this first </span><span style="font-size:11.0pt;font-family:Wingdings;color:#1f497d">J</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Now, let’s imagine we have a component in the system whose job is to pick a driver/provider (device type) and a device </span></p>
</div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">(device id) given a certain service type. We will call this component the “placement component” (it’s not necessarily a separate process like the scheduler, and can be part of the plugin, the agent or the driver, it doesn’t matter for this discussion at this stage).</span></p>
</div></blockquote><div>I'd still prefer to call it a scheduler even though it will be a part of our plugin or separate component. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The Placement Component needs to choose a device that can load-balance traffic coming from network A (where the VIP is) to VMs residing on Network B (pool’s network). In order to do this, the Placement Component needs to be aware of the capabilities of each driver/provider and can follow a certain strategy of device allocation that might take into account some of the following constraints. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> - Some device types are physical appliances, others are virtual appliances running on Nova. The driver might prefer one or the other if both satisfy the service type.</span></p>
</div></blockquote><div>Agreed.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> - Some device types have a fixed number of devices (e.g. physical appliances), while other devices can be created at will whenever needed (e.g. HA-Proxy VMs).</span></p>
</div></blockquote><div>Agreed.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> - Some device types can host a high number of VIPs, others can host a smaller number.</span></p>
</div></blockquote><div>Agreed. Typically such factors are accounted during scheduling process.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> - Given a choice between multiple device types that satisfy the same service type, preference could be given to a device that is already wired to network A and network B. </span></p>
</div></blockquote><div>Not sure that this is necessary, but that could be an option.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> - Given a choice between several equivalent devices (possibly of different device types), the least loaded one is chosen.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> - A placement policy could be to group all VIPs belonging to the same tenant on the same device whenever possible.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> - A placement policy could be to group all VIPs belonging to the same network on the same device.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">All these are legitimate placement strategies/algorithms, and our placement component might be very basic or very sophisticated, but we can hide this from the rest of the system. </span></p>
</div></blockquote><div>Nova has different scheduling drivers for this. We can use same approach as well.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Now let's assume that Placement component working through some combination of these rules, has finally chosen a driver/provider (e.g. HA-Proxy) and a specific device (HA-Proxy device 1) or it decided to create a new device in a driver (spawned new HA-Proxy VM, which is now HA-Proxy device 2). Now it needs to wire the chosen device to Quantum Network A and Network B (if it's not already wired to these networks). This requires the Placement Component to call Quantum to do the wiring (we need to figure out the interface between the 2). If the device is a Nova VM, then this is easy as it's done like for any other VM. If the device is physical then this depends on the L2 switch technology used in the Quantum service (VLAN, Linux-Bridge, etc.): the physical device (or a proxy of it) needs to run a Quantum L2 agent in order to wire the device correctly.</span></p>
</div></blockquote><div>Agreed. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">After all this is done, the device is ready to be configured with a VIP. The Placement Component can return the driver, device_id (and possibly other config data, like the address chosen for the VIP) to the LBaaS plugin, which proceeds to call the LBaaS agent in order to create the VIP on this device.</span></p>
</div></blockquote><div>Agreed. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"> </p></div></blockquote>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If we can understand what are the tasks of the “placement component” and the interactions this component needs to have with other components, then it’s easier to figure out where it should run.</span></p>
</div></blockquote><div>Recently we discussed an idea of separate plugin performing device management and scheduling which will be a utility plugin for other service plugins (not only lbaas). </div><div>I think we'll need at least some simple form of this component within our lbaas efforts.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Youcef<u></u><u></u></span></p>
<p class="MsoNormal"><a name="13b43f263571a822__MailEndCompose"></a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Eugene Nikanorov [mailto:<a href="mailto:enikanorov@mirantis.com" target="_blank">enikanorov@mirantis.com</a>] <br>
<b>Sent:</b> Monday, November 26, 2012 10:11 PM<br><b>To:</b> OpenStack Development Mailing List<br><b>Subject:</b> Re: [openstack-dev] [Quantum][LBaaS] Progress on lbaas-plugin-api-crud<u></u><u></u></span></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">Hi Youcef,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Driver doesn't "choose" device-specific info, driver is device-specific itself. <u></u><u></u></p>
</div><div><p class="MsoNormal">When we send request to the agent, we need to specify which device to use.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">So once the user have chosen device type via service_type on VIP creation, Quantum not only should associate VIP with device type, but also it should choose particular instance of that device type to deploy the VIP.<u></u><u></u></p>
</div><div><p class="MsoNormal">The process of choosing the instance is called scheduling. Unlike nova it's unreasonable for LBaaS to have separate scheduler service, thus it makes sense to have them built in the plugin.<u></u><u></u></p>
</div><div><p class="MsoNormal">I think we should not do this on agent since it doesn't have (and should not have) device database.<u></u><u></u></p></div><div><p class="MsoNormal">Not should it access quantum's database directly.<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">So overall workflow will look like the following:<u></u><u></u></p></div><div><p class="MsoNormal">1. Add a device (type, physical info) to device registry (this is a part of Provider API. Call to Quantum made by cloud provider in case of shared devices, or by tenant in case of private VM balancers) <u></u><u></u></p>
</div><div><p class="MsoNormal">2. Create a VIP, specifying service type (=device type) (call by tenant), <u></u><u></u></p></div><div><p class="MsoNormal">3. Choose device of specified type, associate the VIP with the device (made by Quantum/Plugin)<u></u><u></u></p>
</div><div><p class="MsoNormal">4. Send message with (logical VIP info, device_type, physical device info) to LBaaS Agent (made by Quantum/Plugin)<u></u><u></u></p></div><div><p class="MsoNormal">5. Communicate with particular device using driver according to device_type (LBaaS Agent)<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Any CRUD request processed by Agent should be supplied by device type and device parameters.<u></u><u></u></p></div><div><p class="MsoNormal">
<u></u> <u></u></p></div><div><p class="MsoNormal">You may think of alternative approach where device registry is held by the Agent or even driver, but this approach has the next disadvantages:<u></u><u></u></p></div><div>
<p class="MsoNormal">- Scheduling goes to Agent or Driver and thus Agent/Driver should store VIP-device association while VIP is a "foreign" object for the Agent/Driver.<u></u><u></u></p></div><div><p class="MsoNormal">
- If we go with multiple agents for large deployments, we'll need to sync their device databases<u></u><u></u></p></div><div><p class="MsoNormal">- Device locking will be complicated.<u></u><u></u></p></div><div><p class="MsoNormal">
- If Agents will have non-intersecting sets of devices in their registries than scheduling will be complicated or not possible.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">
Please share you thoughts on this.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks,<u></u><u></u></p></div><div><p class="MsoNormal">Eugene.<u></u><u></u></p></div>
<div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal">On Tue, Nov 27, 2012 at 3:38 AM, Youcef Laribi <<a href="mailto:Youcef.Laribi@eu.citrix.com" target="_blank">Youcef.Laribi@eu.citrix.com</a>> wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Eugene, Leon,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Could we have the LBaaS plugin choose the “driver” based on service_type info, and then it’s the driver which choose the “device”? The driver can obviously have its own DB model where it stores device-specific info.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Youcef</span><u></u><u></u></p>
<p class="MsoNormal"><a name="13b43f263571a822_13b3f18ceb7e728b__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></a><u></u><u></u></p><p class="MsoNormal">
<b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Dan Wendlandt [mailto:<a href="mailto:dan@nicira.com" target="_blank">dan@nicira.com</a>] <br>
<b>Sent:</b> Monday, November 26, 2012 9:13 AM<br><b>To:</b> Leon Cui<br><b>Cc:</b> OpenStack Development Mailing List; Salvatore Orlando<br><b>Subject:</b> Re: [openstack-dev] </span><span lang="ZH-CN" style="font-size:10.0pt">答复</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">: </span><span lang="ZH-CN" style="font-size:10.0pt">答复</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">: </span><span lang="ZH-CN" style="font-size:10.0pt">答复</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">: </span><span lang="ZH-CN" style="font-size:10.0pt">答复</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">: </span><span lang="ZH-CN" style="font-size:10.0pt">答复</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">: Progress on lbaas-plugin-api-crud</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal" style="margin-bottom:12.0pt"> <u></u><u></u></p><div><div><p class="MsoNormal">On Mon, Nov 26, 2012 at 9:03 AM, Leon Cui <<a href="mailto:lcui@vmware.com" target="_blank">lcui@vmware.com</a>> wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Eugene,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">When did you change get merged into master? I did rebase on last Friday which supposed to be your latest code, but anyway I’m planning to do it again today. </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks for your reminder that I need to include device mgmt. into DB model. Need to look at Salvatore’s change on ServiceType.</span><u></u><u></u></p>
</div></div><div><p class="MsoNormal"> <u></u><u></u></p></div></div><div><p class="MsoNormal">It seems to me that each LB plugin should be able to define its own DB models for "device mgmt" (e.g., device address/credentials/etc.), as different plugins may have different strategies for how they manage devices. The usual model is that plugins can define additional models/tables to manage entities that are specific to that plugin. This is similar to how we didn't back the notion of a "vlan" into the DB model for "core plugins", since not all plugins will use vlans. If you don't go down this route, you end up with a messy DB model as everyone keeps adding columns for items that only a particular plugin needs to track. <u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Dan<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks</span><u></u><u></u></p>
<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Leon</span><u></u><u></u></p><p class="MsoNormal"><b><span lang="ZH-CN" style="font-size:10.0pt">发件人</span></b><b><span style="font-size:10.0pt">:</span></b><span style="font-size:10.0pt"> Eugene Nikanorov [mailto:<a href="mailto:enikanorov@mirantis.com" target="_blank">enikanorov@mirantis.com</a>] <br>
<b><span lang="ZH-CN">发送时间</span>:</b> 2012<span lang="ZH-CN">年</span>11<span lang="ZH-CN">月</span>26<span lang="ZH-CN">日</span> 4:29</span><u></u><u></u></p><div><p class="MsoNormal"><br><b><span lang="ZH-CN">收件人</span>:</b> Leon Cui<br>
<b><span lang="ZH-CN">抄送</span>:</b> Ilya Shakhat; Sachin Thakkar; Oleg Bondarev; Salvatore Orlando; Dan Wendlandt<u></u><u></u></p></div><p class="MsoNormal"><b><span lang="ZH-CN">主题</span>:</b> Re: <span lang="ZH-CN">答复</span>: <span lang="ZH-CN">答复</span>: <span lang="ZH-CN">答复</span>: <span lang="ZH-CN">答复</span>: Progress on lbaas-plugin-api-crud<u></u><u></u></p>
<div><div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Hi Leon,<u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Thanks for sending me the patch.<u></u><u></u></p>
</div><div><p class="MsoNormal">I've looked at it briefly, there is one major thing I was able to identify:<u></u><u></u></p></div><div><p class="MsoNormal">In order to couple things together (plugin, agent, drivers), we need to add device management at least to DB model.<u></u><u></u></p>
</div><div><p class="MsoNormal">In particular, each vip should have a reference to the device (which has a type and address/credentials). <u></u><u></u></p></div><div><p class="MsoNormal">This information is passed in each agent notification message.<u></u><u></u></p>
</div><div><p class="MsoNormal">This part is missing in current design blueprints but i think we need to add it before we put the code on review.<u></u><u></u></p></div><div><p class="MsoNormal">Probably it will also depend on Salvatore's ServiceTypes part.<u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Also I see that your patch is based on some of my outdated patches. <u></u><u></u></p></div><div><p class="MsoNormal">My code was recently merged into the master so you can rebase on master using only Oleg's patch.<u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Thanks,<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt">Eugene.<u></u><u></u></p><div><p class="MsoNormal">On Fri, Nov 23, 2012 at 2:40 PM, Leon Cui <<a href="mailto:lcui@vmware.com" target="_blank">lcui@vmware.com</a>> wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Eugene,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I’m still waiting for approval as openstack contributor. For now I simply attached the patch file that you might want to take a look first. Once I got the approval, I’ll try to post the view asap.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Leon</span><u></u><u></u></p><p class="MsoNormal"><b><span lang="ZH-CN" style="font-size:10.0pt">发件人</span></b><b><span style="font-size:10.0pt">:</span></b><span style="font-size:10.0pt"> Eugene Nikanorov [mailto:<a href="mailto:enikanorov@mirantis.com" target="_blank">enikanorov@mirantis.com</a>] <br>
<b><span lang="ZH-CN">发送时间</span>:</b> 2012<span lang="ZH-CN">年</span>11<span lang="ZH-CN">月</span>20<span lang="ZH-CN">日</span> 22:57<br><b><span lang="ZH-CN">收件人</span>:</b> Leon Cui<br><b><span lang="ZH-CN">抄送</span>:</b> Ilya Shakhat; Sachin Thakkar; Oleg Bondarev; Salvatore Orlando; Dan Wendlandt<br>
<b><span lang="ZH-CN">主题</span>:</b> Re: <span lang="ZH-CN">答复</span>: <span lang="ZH-CN">答复</span>: <span lang="ZH-CN">答复</span>: Progress on lbaas-plugin-api-crud</span><u></u><u></u></p><div><div><p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Leon,<u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">I'll take agent and rpc parts.<u></u><u></u></p></div><div><p class="MsoNormal">I have registered <a href="https://blueprints.launchpad.net/quantum/+spec/lbaas-agent-and-rpc" target="_blank">https://blueprints.launchpad.net/quantum/+spec/lbaas-agent-and-rpc</a> to track this.<u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Thanks,<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt">Eugene.<u></u><u></u></p><div><p class="MsoNormal">On Tue, Nov 20, 2012 at 2:16 PM, Leon Cui <<a href="mailto:lcui@vmware.com" target="_blank">lcui@vmware.com</a>> wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Eugene,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks for your suggestion. It looks good to me. I’ll work out the UT first, and then align the class model to the diagram as you suggested.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Leon</span><u></u><u></u></p><p class="MsoNormal"><b><span lang="ZH-CN" style="font-size:10.0pt">发件人</span></b><b><span style="font-size:10.0pt">:</span></b><span style="font-size:10.0pt"> Eugene Nikanorov [mailto:<a href="mailto:enikanorov@mirantis.com" target="_blank">enikanorov@mirantis.com</a>] <br>
<b><span lang="ZH-CN">发送时间</span>:</b> 2012<span lang="ZH-CN">年</span>11<span lang="ZH-CN">月</span>20<span lang="ZH-CN">日</span> 17:32</span><u></u><u></u></p><div><p class="MsoNormal"><br><b><span lang="ZH-CN">收件人</span>:</b> Leon Cui<br>
<b><span lang="ZH-CN">抄送</span>:</b> Ilya Shakhat; Sachin Thakkar; Oleg Bondarev; Salvatore Orlando<u></u><u></u></p></div><p class="MsoNormal"><b><span lang="ZH-CN">主题</span>:</b> Re: <span lang="ZH-CN">答复</span>: <span lang="ZH-CN">答复</span>: Progress on lbaas-plugin-api-crud<u></u><u></u></p>
<div><div><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222;background:white">replying to all...</span><u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222;background:white">Leon,</span><u></u><u></u></p>
<div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> </span><u></u><u></u></p></div><div><p class="MsoNormal" style="background:white">
<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">I think </span><span style="font-size:11.5pt;font-family:"Calibri","sans-serif";color:#222222">tests/unit/test_db_plugin.py is right code to refer when writing unit tests for db code. The only thing is that unit tests written in test_db_plugin.py are a bit generic, e.g. the backend plugin is specified in particular plugin's UTs which inherit from QuantumDbPluginV2TestCase. I think UTs for balancer plugin may be more specific, testing </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">LoadbalancerPluginDb class.</span><u></u><u></u></p>
</div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> </span><u></u><u></u></p></div><div><p class="MsoNormal" style="background:white">
<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">Since you need dababase utility methods from QuantumDbPluginV2 then it's LoadbalancerPluginDb which should inherit from such QuantumDBBase (or whatever you call it), so overall diagram will look like:</span><u></u><u></u></p>
</div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> </span><u></u><u></u></p></div><div><div><p class="MsoNormal" style="background:white">
<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">ServicePluginBase</span><u></u><u></u></p></div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> |</span><u></u><u></u></p>
</div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">LoadBalancerPluginBase </span><u></u><u></u></p></div><div><p class="MsoNormal" style="background:white">
<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> |</span><u></u><u></u></p></div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> | QuantumDBBase </span><u></u><u></u></p>
</div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> | |</span><u></u><u></u></p>
</div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">LoadBalancerPlugin <---------- LoadBalancerPluginDb</span><u></u><u></u></p>
</div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> </span><u></u><u></u></p></div><div><p class="MsoNormal" style="background:white">
<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">Thanks,</span><u></u><u></u></p></div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">Eugene.</span><u></u><u></u></p>
</div></div><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal">On Tue, Nov 20, 2012 at 1:04 PM, Leon Cui <<a href="mailto:lcui@vmware.com" target="_blank">lcui@vmware.com</a>> wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Eugene,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks for your suggestion. Please see my comments inline.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">One more question: I’m writing the unit test, mainly to verify the database functionalities for LB CRUD. Do you think tests/unit/test_db_plugin.py is the right test code that I should refer to? Any good suggestions on this front?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Leon</span><u></u><u></u></p><p class="MsoNormal"><b><span lang="ZH-CN" style="font-size:10.0pt">发件人</span></b><b><span style="font-size:10.0pt">:</span></b><span style="font-size:10.0pt"> Eugene Nikanorov [mailto:<a href="mailto:enikanorov@mirantis.com" target="_blank">enikanorov@mirantis.com</a>] <br>
<b><span lang="ZH-CN">发送时间</span>:</b> 2012<span lang="ZH-CN">年</span>11<span lang="ZH-CN">月</span>20<span lang="ZH-CN">日</span> 16:44<br><b><span lang="ZH-CN">收件人</span>:</b> Leon Cui<br><b><span lang="ZH-CN">抄送</span>:</b> Ilya Shakhat; Sachin Thakkar; Oleg Bondarev; Salvatore Orlando<br>
<b><span lang="ZH-CN">主题</span>:</b> Re: <span lang="ZH-CN">答复</span>: Progress on lbaas-plugin-api-crud</span><u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Hi Leon,<u></u><u></u></p>
<div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">A few thoughts on your diagram.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Please consider the following:<u></u><u></u></p>
</div></div><div><div><p class="MsoNormal">1) If you want something from QuantumDbPluginV2 and you feel it may be common plugin functionality - you need to extract it to a separate class, something like QuantumPluginBase, and inherit QuantumDBPluginV2 from this class, ServicePluginBase should inherit from that class as well.<u></u><u></u></p>
</div><p class="MsoNormal"><span style="color:#1f497d">[Leon] I need some dababase utility methods from QuantumDbPluginV2. Abstract to a separate class could be a good idea. But I<span lang="ZH-CN">’</span>m not sure if it<span lang="ZH-CN">’</span>s a good idea to let ServicePluginBase to inherit from this class. ServicePluginBase is an abstract class for service plugin service (quantum manager) to use. </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p></div><div><div><p class="MsoNormal">2) LoadBalancerPluginBase imho should inherit from ServicePluginBase<u></u><u></u></p></div><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">[Leon] Why it needs to inherit from ServicePluginBase? LoadBalancerPluginBase defines the loadbalancer extension APIs. I think we just make sure LoadbalancerPlugin inherits from both classes as below:</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">ServicePluginBase QuantumPluginDbBase LoadbalancerPluginBase</span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1f497d"> | | |</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> ----------------------------------------------</span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1f497d"> |</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> LoadbalancerPlugin ------ LoadbalancerPluginDb</span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">LoadbalancerPlugin will contain the LoadbalancerPluginDb instance for database access.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
</div><div><div><div><p class="MsoNormal">3) Depending on what you need from QuantumDbPluginV2/QuantumPluginBase, this may lead to the following inheritance sequence:<u></u><u></u></p></div><div><p class="MsoNormal">QuantumPluginBase<u></u><u></u></p>
</div><div><p class="MsoNormal"> |<u></u><u></u></p></div><div><p class="MsoNormal">ServicePluginBase<u></u><u></u></p></div><div><p class="MsoNormal"> |<u></u><u></u></p></div><div><p class="MsoNormal">LoadBalancerPluginBase <u></u><u></u></p>
</div><div><p class="MsoNormal"> |<u></u><u></u></p></div><div><p class="MsoNormal">LoadBalancerPluginDb<u></u><u></u></p></div><div><p class="MsoNormal"> |<u></u><u></u></p></div><div><p class="MsoNormal">LoadBalancerPlugin<u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Also, I think that LoadBalancerPlugin should not inherit LoadBalancerPluginDb. <u></u><u></u></p></div><div><p class="MsoNormal">Unlike core plugins where it could make sense, I'd prefer to see LoadBalancerPluginDb to be a part of LoadBalancerPlugin.<u></u><u></u></p>
</div><div><p class="MsoNormal">I mean LoadBalancerPlugin implements "has a" LoadBalancerPluginDb instead of "is a" relation. <u></u><u></u></p></div><div><p class="MsoNormal">The reason for this is that LoadBalancerPlugin provides CRUD implementation which doesn't directly map to DB operations implemented in LoadBalancerPluginDb. <u></u><u></u></p>
</div><div><p class="MsoNormal">E.g. my idea is:<u></u><u></u></p></div><div><p class="MsoNormal">LoadBalancerPlugin - CRUD, validation, calling LoadBalancerPluginDb, sending/receiving messages to agent<u></u><u></u></p></div>
<div><p class="MsoNormal">LoadBalancerPluginDb - DB access.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Thanks,<u></u><u></u></p></div><div><p class="MsoNormal">Eugene.<u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal">On Tue, Nov 20, 2012 at 6:54 AM, Leon Cui <<a href="mailto:lcui@vmware.com" target="_blank">lcui@vmware.com</a>> wrote:<u></u><u></u></p><div>
<div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Ilya,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#1f497d">R</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">ight now I took Eugene’s change under review (</span><span style="color:#003300"><a href="https://review.openstack.org/#/c/15733/" target="_blank">https://review.openstack.org/#/c/15733/</a></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">) and am developing the database access logic and plugin skeleton based on that service plugin mechanism.</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <span style="color:#1f497d">The class model is illustrated in the below diagram:</span></span><u></u><u></u></p>
<table border="0" cellspacing="0" cellpadding="0" align="left"><tbody><tr><td width="87" style="width:65.25pt;padding:0in 0in 0in 0in"></td><td width="107" style="width:80.25pt;padding:0in 0in 0in 0in"></td><td width="178" style="width:133.5pt;padding:0in 0in 0in 0in">
</td><td width="249" style="width:186.75pt;padding:0in 0in 0in 0in"></td></tr><tr style="min-height:128.25pt"><td style="padding:0in 0in 0in 0in;min-height:128.25pt"></td><td colspan="3" valign="top" style="padding:0in 0in 0in 0in;min-height:128.25pt">
<p class="MsoNormal"><span><img border="0" width="534" height="171" src="cid:image001.png@01CDCCA4.9CD6AD30" alt="ServicePluginBase
(quantum.plugins.services.service_base)
,QuantumDbPluginV2 (quantum.db. db_base_plugin_v2),LoadBalancerPluginDb (quantum.plugins.services.loadbalancer.loadbalancer_db),LoadBalancerPluginBase (quantum.extensions.loadbalancer)"></span><u></u><u></u></p></td></tr>
<tr style="min-height:2.25pt"><td style="padding:0in 0in 0in 0in;min-height:2.25pt"></td><td style="padding:0in 0in 0in 0in;min-height:2.25pt"></td><td style="padding:0in 0in 0in 0in;min-height:2.25pt"></td><td style="padding:0in 0in 0in 0in;min-height:2.25pt">
</td></tr><tr style="min-height:51.0pt"><td style="padding:0in 0in 0in 0in;min-height:51.0pt"></td><td style="padding:0in 0in 0in 0in;min-height:51.0pt"></td><td valign="top" style="padding:0in 0in 0in 0in;min-height:51.0pt">
<p class="MsoNormal"><span><img border="0" width="178" height="68" src="cid:image002.png@01CDCCA4.9CD6AD30" alt="LoadBalancerPlugin (quantum.plugins.services.loadbalancer.loadbalancerPlugin)"></span><u></u><u></u></p></td>
<td style="padding:0in 0in 0in 0in;min-height:51.0pt"></td></tr></tbody></table><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><br clear="all"><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">LoadBalancerPlugin module is the main body of loadbalancer plugin which inherits from multiple classes:</span><u></u><u></u></p>
<p style="margin-left:22.5pt"><span style="color:#1f497d">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif";color:#1f497d"> </span><span style="color:#1f497d">ServicePluginBase: defines the abstract methods that a service plugin should implemented.</span><u></u><u></u></p>
<p style="margin-left:22.5pt"><span style="color:#1f497d">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif";color:#1f497d"> </span><span style="color:#1f497d">QuantumDbPluginV2: contains a set of generic quantum database access methods. I<span lang="ZH-CN">’</span>m not sure if we really want to inherit from this class but I<span lang="ZH-CN">’</span>d like to leverage the methods defined in this class.</span><u></u><u></u></p>
<p style="margin-left:22.5pt"><span style="color:#1f497d">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif";color:#1f497d"> </span><span style="color:#1f497d">LoadBalancerPluginDb: This the main part I<span lang="ZH-CN">’</span>m coding on which wrap the Lbaas database model and CRUD operation against the database.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">My thought is that LoadBalancerPlugin will control the LBaaS CRUD API flow. For instance, “create_vip” method should first validate the input, update the database, send message to the LbAgent over AMQP channel, than update the database by setting the status from PENDING_CREATE to ACTIVE.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I’m trying to write unit tests against the database access now which will take a while to complete. Meanwhile it would be great to have your help on coding the RPC interaction between plugin and agent.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I don’t like blocking your part. What’s the best practice to collaborate with you on this? Maybe I can shelve my change to you somehow?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Leon</span><u></u><u></u></p><p class="MsoNormal"><b><span lang="ZH-CN" style="font-size:10.0pt">发件人</span></b><b><span style="font-size:10.0pt">:</span></b><span style="font-size:10.0pt"> Ilya Shakhat [mailto:<a href="mailto:ishakhat@mirantis.com" target="_blank">ishakhat@mirantis.com</a>] <br>
<b><span lang="ZH-CN">发送时间</span>:</b> 2012<span lang="ZH-CN">年</span>11<span lang="ZH-CN">月</span>19<span lang="ZH-CN">日</span> 22:08<br><b><span lang="ZH-CN">收件人</span>:</b> Sachin Thakkar; Leon Cui<br><b><span lang="ZH-CN">抄送</span>:</b> Eugene Nikanorov; Oleg Bondarev<br>
<b><span lang="ZH-CN">主题</span>:</b> Progress on lbaas-plugin-api-crud</span><u></u><u></u></p><div><div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Hi Sachin, Leo, <u></u><u></u></p><div><p class="MsoNormal">
<u></u><u></u></p></div><div><p class="MsoNormal">Recently there was a thread related to LBaaS architecture (<a href="http://lists.openstack.org/pipermail/openstack-dev/2012-November/002646.html" target="_blank">http://lists.openstack.org/pipermail/openstack-dev/2012-November/002646.html</a>). How good is it aligned with your implementation? Do you need help in coding? (we may take Agent part) <u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Thanks,<u></u><u></u></p></div><div><p class="MsoNormal">Ilya<u></u><u></u></p></div></div></div></div></div></div><p class="MsoNormal"> <u></u><u></u></p>
</div></div></div></div></div></div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div></div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div></div></div><p class="MsoNormal"> <u></u><u></u></p>
</div></div></div></div></div></div></div></blockquote></div><p class="MsoNormal"><span style="color:#888888"><br><br clear="all"><u></u><u></u></span></p><div><p class="MsoNormal"><span style="color:#888888"> <u></u><u></u></span></p>
</div><p class="MsoNormal"><span style="color:#888888">-- <br>~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Dan Wendlandt <u></u><u></u></span></p><div><div><p class="MsoNormal">Nicira, Inc: <a href="http://www.nicira.com" target="_blank">www.nicira.com</a><u></u><u></u></p>
<div><p class="MsoNormal">twitter: danwendlandt<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~<u></u><u></u></p></div></div><p class="MsoNormal"> <u></u><u></u></p></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<br>
OpenStack-dev mailing list<br><a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><u></u><u></u></p>
</div><p class="MsoNormal"><u></u> <u></u></p></div></div><br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>