<div dir="ltr">Thanks Edgar, I think this is the appropriate place to continue this discussion.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 6, 2014 at 2:52 PM, Edgar Magana <span dir="ltr"><<a href="mailto:emagana@plumgrid.com" target="_blank">emagana@plumgrid.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><div>Nader,</div><div><br></div><div>I would encourage you to first discuss the possible extension with the ML2 team. Rober and Kyle are leading this effort and they have a IRC meeting every week:</div>
<div><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></div><div><br></div><div>Bring your concerns on this meeting and get the right feedback.</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Edgar</div><div><br></div><span><div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">
<span style="font-weight:bold">From: </span> Nader Lahouti <<a href="mailto:nader.lahouti@gmail.com" target="_blank">nader.lahouti@gmail.com</a>><br><span style="font-weight:bold">Reply-To: </span> OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Date: </span> Thursday, March 6, 2014 12:14 PM<br><span style="font-weight:bold">To: </span> OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span> Re: [openstack-dev] [Neutron][ML2]<br></div><div><br></div><div dir="ltr">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 (i.e. network config profile) and use it in the mechanism driver (in the create_network_precommit/postcommit).<br>

If I use current implementation of Ml2Plugin, when a call is made to mechanism driver's create_network_precommit/postcommit the new attribute is not included in the 'mech_context'<br>Here is code from Ml2Plugin:<br>
<font face="courier new,monospace">class Ml2Plugin(...):<br>...<br>       def create_network(self, context, network):<br>            net_data = network['network']<br>...</font><div><div>  <font face="courier new,monospace">      with session.begin(subtransactions=True):</font></div>
<div><font face="courier new,monospace">            self._ensure_default_security_group(context, tenant_id)</font></div><div><font face="courier new,monospace">            result = super(Ml2Plugin, self).create_network(context, network)</font></div>
<div><font face="courier new,monospace">            network_id = result['id']</font></div><div><font face="courier new,monospace">...</font></div><font face="courier new,monospace">            mech_context = driver_context.NetworkContext(self, context, result)<br>


            self.mechanism_manager.create_network_precommit(mech_context)<br></font><br></div><div class="gmail_extra">Also need to include new extension in the  <span style="font-family:Courier;font-size:14px">_supported_extension_aliases.</span><br>
<br>So to avoid changes in the existing code, I was going to create my own plugin (which will be very similar to Ml2Plugin) and use it as core_plugin.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Please advise the right solution implementing that.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Regards,</div><div class="gmail_extra">Nader.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 5, 2014 at 11:49 PM, Aaron Rosen <span dir="ltr"><<a href="mailto:aaronorosen@gmail.com" target="_blank">aaronorosen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Nader, <div><br>Devstack's default plugin is ML2. Usually you wouldn't 'inherit' one plugin in another. I'm guessing  you probably wire a driver that ML2 can use though it's hard to tell from the information you've provided what you're trying to do. </div>
<div><br></div><div>Best, </div><div><br>Aaron</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Wed, Mar 5, 2014 at 10:42 PM, Nader Lahouti <span dir="ltr"><<a href="mailto:nader.lahouti@gmail.com" target="_blank">nader.lahouti@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr"><font color="#000000" face="Courier,sans-serif"><span style="font-size:14px">Hi All,</span></font><br>
<div><br></div><div><span style="font-size:14px;font-family:Courier,sans-serif">I have a question regarding ML2 plugin in neutron: </span></div><div><span style="font-size:14px;font-family:Courier,sans-serif">My understanding is that, 'Ml2Plugin' is the default core_plugin for neutron ML2. We can use either the default plugin or our own plugin (i.e. my_ml2_core_plugin that can be inherited from Ml2Plugin) and use it as core_plugin.</span></div>
<div><br></div><div><font color="#000000" face="Courier,sans-serif"><span style="font-size:14px">Is my understanding correct?</span></font></div><div><font color="#000000" face="Courier,sans-serif"><span style="font-size:14px"><br>
</span></font></div><div><font color="#000000" face="Courier,sans-serif"><span style="font-size:14px"><br></span></font></div><div><font color="#000000" face="Courier,sans-serif"><span style="font-size:14px">Regards,</span></font></div>
<div><font color="#000000" face="Courier,sans-serif"><span style="font-size:14px">Nader.</span></font></div></div><br></div></div>_______________________________________________<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><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>
_______________________________________________
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>
</span></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>