<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 13, 2014 at 12:07 PM, Nader Lahouti <span dir="ltr"><<a href="mailto:nader.lahouti@gmail.com" target="_blank">nader.lahouti@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">-- edited the subject<div><br></div><div>I'm resending this question. </div><div>The issue is described in email thread and. In brief, I need to add load new extensions and it seems the mechanism driver does not support that. In order to do that I was thinking to have a new ml2 plugin base on existing Ml2Plugin and add my changes there and have it as core_plugin.</div>
<div>Please read the email thread and glad to have your suggestion.<br><div><div class="gmail_extra"><br></div></div></div></div></blockquote><div>Nader, as has been pointed out in the prior thread, it would be best to not write a</div>
<div>new core plugin copied from ML2. A much better approach would be to work to</div><div>make the extension loading function in the existing ML2 plugin, as this will</div><div>benefit all users of ML2.</div><div><br></div>
<div>Thanks,</div><div>Kyle</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div class="gmail_extra"><br><div class="gmail_quote">
On Fri, Mar 7, 2014 at 10:33 AM, Nader Lahouti <span dir="ltr"><<a href="mailto:nader.lahouti@gmail.com" target="_blank">nader.lahouti@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">1) Does it mean an interim solution is to have our own plugin (and have all the changes in it) and declare it as core_plugin instead of Ml2Plugin?<div>
<br></div><div>2) The other issue as I mentioned before, is that the extension(s) is not showing up in the result, for instance when create_network is called </div>
<div>[<b style="font-family:Courier;font-size:14px">result = super(Ml2Plugin, self).create_network(context, network)]</b>, and as a result they cannot be used in the mechanism drivers when needed.</div><div><br>
</div><div>Looks like the process_extensions is disabled when fix for Bug 1201957 committed and here is the change:</div><div>Any idea why it is disabled?</div><div><br></div><div>----------</div><div>
<span style="font-family:Courier;font-size:14px">Avoid performing extra query for fetching port security binding</span><br></div><div>
<p style="margin:0px;font-size:14px;font-family:Courier">Bug 1201957</p>
<p style="margin:0px;font-size:14px;font-family:Courier;min-height:17px"><br></p>
<p style="margin:0px;font-size:14px;font-family:Courier">Add a relationship performing eager load in Port and Network</p>
<p style="margin:0px;font-size:14px;font-family:Courier">models, thus preventing the 'extend' function from performing</p>
<p style="margin:0px;font-size:14px;font-family:Courier">an extra database query.</p>
<p style="margin:0px;font-size:14px;font-family:Courier">Also fixes a comment in securitygroups_db.py</p>
<p style="margin:0px;font-size:14px;font-family:Courier;min-height:17px"><br></p>
<p style="margin:0px;font-size:14px;font-family:Courier">Change-Id: If0f0277191884aab4dcb1ee36826df7f7d66a8fa</p>
<p style="margin:0px;font-size:14px;font-family:Courier"> master h.1 </p>
<p style="margin:0px;font-size:14px;font-family:Courier">…</p>
<p style="margin:0px;font-size:14px;font-family:Courier"> 2013.2</p>
<p style="margin:0px;font-size:14px;font-family:Courier">commit f581b2faf11b49852b0e1d6f2ddd8d19b8b69cdf 1 parent ca421e7</p>
<p style="margin:0px;font-size:14px;font-family:Courier">Salvatore Orlando salv-orlando authored 8 months ago</p>
<p style="margin:0px;font-size:14px;font-family:Courier;min-height:17px"><br></p>
<p style="margin:0px;font-size:14px;font-family:Courier">2 neutron/db/db_base_plugin_v2.py View</p>
<p style="margin:0px;font-size:14px;font-family:Courier"> @@ -995,7 +995,7 @@ def create_network(self, context, network):</p>
<p style="margin:0px;font-size:14px;font-family:Courier">995<span style="white-space:pre-wrap"> </span> 'status': constants.NET_STATUS_ACTIVE}</p>
<p style="margin:0px;font-size:14px;font-family:Courier">996<span style="white-space:pre-wrap"> </span> network = models_v2.Network(**args)</p>
<p style="margin:0px;font-size:14px;font-family:Courier">997<span style="white-space:pre-wrap"> </span> context.session.add(network)</p>
<p style="margin:0px;font-size:14px;font-family:Courier"><b><font color="#cc0000">998 - return self._make_network_dict(network)</font></b></p>
<p style="margin:0px;font-size:14px;font-family:Courier"><b><font color="#cc0000">998 + return self._make_network_dict(network, process_extensions=False)</font></b></p>
<p style="margin:0px;font-size:14px;font-family:Courier">999</p>
<p style="margin:0px;font-size:14px;font-family:Courier">1000 def update_network(self, context, id, network):</p>
<p style="margin:0px;font-size:14px;font-family:Courier">1001<span style="white-space:pre-wrap"> </span></p>
<p style="margin:0px;font-size:14px;font-family:Courier"> n = network['network']</p></div><div><br></div><div>-----------------------</div><div><br></div><div><br></div><div>
Regards,</div><div>Nader.</div><div><br></div><div><br></div><div><br></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 7, 2014 at 6:26 AM, Robert Kukura <span dir="ltr"><<a href="mailto:kukura@noironetworks.com" target="_blank">kukura@noironetworks.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div>
<br>
<div>On 3/7/14, 3:53 AM, Édouard Thuleau
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Yes, that sounds good to be able to load extensions
from a mechanism driver.
<div><br>
<div>But another problem I think we have with ML2 plugin is
the list extensions supported by default [1].</div>
<div>The extensions should only load by MD and the ML2 plugin
should only implement the Neutron core API.</div>
</div>
</div>
</blockquote>
<br></div>
Keep in mind that ML2 supports multiple MDs simultaneously, so no
single MD can really control what set of extensions are active.
Drivers need to be able to load private extensions that only pertain
to that driver, but we also need to be able to share common
extensions across subsets of drivers. Furthermore, the semantics of
the extensions need to be correct in the face of multiple
co-existing drivers, some of which know about the extension, and
some of which don't. Getting this properly defined and implemented
seems like a good goal for juno.<br>
<br>
-Bob<div><div><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div>
<div><br>
</div>
<div>Any though ?</div>
<div>Édouard.</div>
<div><br>
</div>
<div>[1] <a href="https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L87" target="_blank">https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L87</a></div>
<div><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Fri, Mar 7, 2014 at 8:32 AM, Akihiro
Motoki <span dir="ltr"><<a href="mailto:amotoki@gmail.com" target="_blank">amotoki@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I think it is better to continue the discussion here. It is
a good log :-)<br>
<br>
Eugine and I talked the related topic to allow drivers to
load<br>
extensions) in Icehouse Summit<br>
but I could not have enough time to work on it during
Icehouse.<br>
I am still interested in implementing it and will register a
blueprint on it.<br>
<br>
etherpad in icehouse summit has baseline thought on how to
achieve it.<br>
<a href="https://etherpad.openstack.org/p/icehouse-neutron-vendor-extension" target="_blank">https://etherpad.openstack.org/p/icehouse-neutron-vendor-extension</a><br>
I hope it is a good start point of the discussion.<br>
<br>
Thanks,<br>
Akihiro<br>
<div>
<div><br>
On Fri, Mar 7, 2014 at 4:07 PM, Nader Lahouti <<a href="mailto:nader.lahouti@gmail.com" target="_blank">nader.lahouti@gmail.com</a>>
wrote:<br>
> Hi Kyle,<br>
><br>
> Just wanted to clarify: Should I continue using
this mailing list to post my<br>
> question/concerns about ML2? Please advise.<br>
><br>
> Thanks,<br>
> Nader.<br>
><br>
><br>
><br>
> On Thu, Mar 6, 2014 at 1:50 PM, Kyle Mestery <<a href="mailto:mestery@noironetworks.com" target="_blank">mestery@noironetworks.com</a>><br>
> wrote:<br>
>><br>
>> Thanks Edgar, I think this is the appropriate
place to continue this<br>
>> discussion.<br>
>><br>
>><br>
>> On Thu, Mar 6, 2014 at 2:52 PM, Edgar Magana
<<a href="mailto:emagana@plumgrid.com" target="_blank">emagana@plumgrid.com</a>>
wrote:<br>
>>><br>
>>> Nader,<br>
>>><br>
>>> I would encourage you to first discuss the
possible extension with the<br>
>>> ML2 team. Rober and Kyle are leading this
effort and they have a IRC meeting<br>
>>> every week:<br>
>>> <a href="https://wiki.openstack.org/wiki/Meetings#ML2_Network_sub-team_meeting" target="_blank">https://wiki.openstack.org/wiki/Meetings#ML2_Network_sub-team_meeting</a><br>
>>><br>
>>> Bring your concerns on this meeting and get
the right feedback.<br>
>>><br>
>>> Thanks,<br>
>>><br>
>>> Edgar<br>
>>><br>
>>> From: Nader Lahouti <<a href="mailto:nader.lahouti@gmail.com" target="_blank">nader.lahouti@gmail.com</a>><br>
>>> Reply-To: OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
>>> Date: Thursday, March 6, 2014 12:14 PM<br>
>>> To: OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
>>> Subject: Re: [openstack-dev] [Neutron][ML2]<br>
>>><br>
>>> Hi Aaron,<br>
>>><br>
>>> I appreciate your reply.<br>
>>><br>
>>> Here is some more details on what I'm
trying to do:<br>
>>> I need to add new attribute to the network
resource using extensions<br>
>>> (i.e. network config profile) and use it in
the mechanism driver (in the<br>
>>> create_network_precommit/postcommit).<br>
>>> If I use current implementation of
Ml2Plugin, when a call is made to<br>
>>> mechanism driver's
create_network_precommit/postcommit the new attribute is<br>
>>> not included in the 'mech_context'<br>
>>> Here is code from Ml2Plugin:<br>
>>> class Ml2Plugin(...):<br>
>>> ...<br>
>>> def create_network(self, context,
network):<br>
>>> net_data = network['network']<br>
>>> ...<br>
>>> with
session.begin(subtransactions=True):<br>
>>>
self._ensure_default_security_group(context, tenant_id)<br>
>>> result = super(Ml2Plugin,
self).create_network(context,<br>
>>> network)<br>
>>> network_id = result['id']<br>
>>> ...<br>
>>> mech_context =
driver_context.NetworkContext(self, context,<br>
>>> result)<br>
>>>
self.mechanism_manager.create_network_precommit(mech_context)<br>
>>><br>
>>> Also need to include new extension in the
_supported_extension_aliases.<br>
>>><br>
>>> So to avoid changes in the existing code, I
was going to create my own<br>
>>> plugin (which will be very similar to
Ml2Plugin) and use it as core_plugin.<br>
>>><br>
>>> Please advise the right solution
implementing that.<br>
>>><br>
>>> Regards,<br>
>>> Nader.<br>
>>><br>
>>><br>
>>> On Wed, Mar 5, 2014 at 11:49 PM, Aaron
Rosen <<a href="mailto:aaronorosen@gmail.com" target="_blank">aaronorosen@gmail.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> Hi Nader,<br>
>>>><br>
>>>> Devstack's default plugin is ML2.
Usually you wouldn't 'inherit' one<br>
>>>> plugin in another. I'm guessing you
probably wire a driver that ML2 can use<br>
>>>> though it's hard to tell from the
information you've provided what you're<br>
>>>> trying to do.<br>
>>>><br>
>>>> Best,<br>
>>>><br>
>>>> Aaron<br>
>>>><br>
>>>><br>
>>>> On Wed, Mar 5, 2014 at 10:42 PM, Nader
Lahouti <<a href="mailto:nader.lahouti@gmail.com" target="_blank">nader.lahouti@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Hi All,<br>
>>>>><br>
>>>>> I have a question regarding ML2
plugin in neutron:<br>
>>>>> My understanding is that,
'Ml2Plugin' is the default core_plugin for<br>
>>>>> neutron ML2. We can use either the
default plugin or our own plugin (i.e.<br>
>>>>> my_ml2_core_plugin that can be
inherited from Ml2Plugin) and use it as<br>
>>>>> core_plugin.<br>
>>>>><br>
>>>>> Is my understanding correct?<br>
>>>>><br>
>>>>><br>
>>>>> Regards,<br>
>>>>> Nader.<br>
>>>>><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><br>
>>>>><br>
>>>><br>
>>>><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><br>
>>>><br>
>>><br>
>>>
_______________________________________________
OpenStack-dev mailing<br>
>>> list <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><br>
>>><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><br>
>>><br>
>><br>
>><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><br>
>><br>
><br>
><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><br>
><br>
<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><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
OpenStack-dev mailing list
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a>
<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>
</pre>
</blockquote>
<br>
</div></div></div>
<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><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></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></div>