Re: [openstack-dev] [Neutron][ML2][Ml2Plugin] Setting _original_network in NetworkContext:

2014-04-03 Thread Nader Lahouti
Thanks a lot Andre for the reply. My comments inline: On Wed, Apr 2, 2014 at 12:37 PM, Andre Pech ap...@aristanetworks.comwrote: On Fri, Mar 28, 2014 at 6:44 PM, Nader Lahouti nader.laho...@gmail.comwrote: Hi Mathieu, Thanks a lot for your reply. Even in the

Re: [openstack-dev] [Neutron][ML2][Ml2Plugin] Setting _original_network in NetworkContext:

2014-04-03 Thread Mohammad Banikazemi
(not for usage questions) openstack-dev@lists.openstack.org, Andre Pech ap...@aristanetworks.com, Date: 04/03/2014 01:16 PM Subject:Re: [openstack-dev] [Neutron][ML2][Ml2Plugin] Setting _original_network in NetworkContext: Thanks a lot Andre for the reply

Re: [openstack-dev] [Neutron][ML2][Ml2Plugin] Setting _original_network in NetworkContext:

2014-03-28 Thread Mathieu Rohon
hi nader, I don't think this parameter could be used in this case. As andre said , tha original-network is usefull for update and delete commands. It would led to misunderstandings if we use this param in other cases, and particulary in create commands. I'm still thinking that the result of

Re: [openstack-dev] [Neutron][ML2][Ml2Plugin] Setting _original_network in NetworkContext:

2014-03-28 Thread Nader Lahouti
Hi Mathieu, Thanks a lot for your reply. Even in the neutron/neutron/db/db_base_plugin_v2.py: create_network() passes network object: 911 http://www.xrefs.info/neutron-icehouse-3/xref/neutron/db/db_base_plugin_v2.py#911 *def* create_network

Re: [openstack-dev] [Neutron][ML2][Ml2Plugin] Setting _original_network in NetworkContext:

2014-03-27 Thread Nader Lahouti
Hi Andre, Thans for your reply. There is no existing network. The scenario is for the first time that we create a network with an extension. Consider, a mechanism driver adds an attribute (through extensions) to the network resource. When user creates a network, the attribute is set and it is

Re: [openstack-dev] [Neutron][ML2][Ml2Plugin] Setting _original_network in NetworkContext:

2014-03-26 Thread Andre Pech
Hi Nader, When I wrote this, the intention was that original_network only really makes sense during an update_network call (ie when there's an existing network that you are modifying). In a create_network call, the assumption is that no network exists yet, so there is no original network to set.

[openstack-dev] [Neutron][ML2][Ml2Plugin] Setting _original_network in NetworkContext:

2014-03-25 Thread Nader Lahouti
Hi All, In the current Ml2Plugin code when 'create_network' is called, as shown below: def create_network(self, context, network) net_data = network['network'] ... session = context.session with session.begin(subtransactions=True):