<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="yui_3_10_3_1_1443168394888_176"
class="yui3-editable_text-text">
<p id="yui_3_10_3_1_1443168394888_1437">Hi everyone,<br>
</p>
<p>(TL;DR: we would like an L2 agent extension to be able to call
methods on the agent class, e.g. OVSAgent)<br>
</p>
<p>In the networking-bgpvpn project, we need the reference driver
to interact with the ML2 openvswitch agent with new RPCs to
allow exchanging information with the BGP VPN implementation
running on the compute nodes. We also need the OVS agent to
setup specific things on the OVS bridges for MPLS traffic.</p>
<p>To extend the agent behavior, we currently create a new agent
by mimicking the main() in ovs_neutron_<wbr>agent.py but instead
of instantiating instantiate OVSAgent, with instantiate a class
that overloads the OVSAgent class with the additional behavior
we need [1] .<br>
</p>
<p>This is really not the ideal way of extending the agent, and we
would prefer using the L2 agent extension framework [2].
</p>
<p>Using the L2 agent extension framework would work, but only
partially: it would easily allos us to register our RPC
consumers, but not to let us access to some
datastructures/methods of the agent that we need to use: setup_<wbr>entry_for_<wbr>arp_reply
and local_vlan_map, access to the OVSBridge objects to
manipulate OVS ports.<br>
</p>
<p>I've filled-in an RFE bug to track this issue [5].</p>
<p>We would like something like one of the following:<br>
1) augment the L2 agent extension interface
(AgentCoreResourceExtension) to give access to the agent object
(and thus let the extension call methods of the agent) by giving
the agent as a parameter of the initialize method [4]<br>
2) augment the L2 agent extension interface
(AgentCoreResourceExtension) to give access to the agent object
(and thus let the extension call methods of the agent) by giving
the agent as a parameter of a new setAgent method<br>
3) augment the L2 agent extension interface
(AgentCoreResourceExtension) to give access only to
specific/chosen methods on the agent object, for instance by
giving a dict as a parameter of the initialize method [4], whose
keys would be method names, and values would be pointer to these
methods on the agent object<br>
4) define a new interface with methods to access things inside
the agent, this interface would be implemented by an object
instantiated by the agent, and that the agent would pass to the
extension manager, thus allowing the extension manager to passe
the object to an extension through the initialize method of
AgentCoreResourceExtension [4]<br>
<br>
Any feedback on these ideas...?<br>
Of course any other idea is welcome...<br>
<br>
For the sake of triggering reaction, the question could be
rephrased as: if we submit a change doing (1) above, would it
have a reasonable chance of merging ?<br>
</p>
<p>-Thomas<br>
<br>
[1] <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/openstack/networking-bgpvpn/blob/master/networking_bgpvpn/neutron/services/service_drivers/bagpipe/ovs_agent/ovs_bagpipe_neutron_agent.py">https://github.com/openstack/networking-bgpvpn/blob/master/networking_bgpvpn/neutron/services/service_drivers/bagpipe/ovs_agent/ovs_bagpipe_neutron_agent.py</a><br>
[2] <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://review.openstack.org/#/c/195439/">https://review.openstack.org/#/c/195439/</a><br>
[3] <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_driver.py#L30">https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_driver.py#L30</a><br>
[4] <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/openstack/neutron/blob/master/neutron/agent/l2/agent_extension.py#L28">https://github.com/openstack/neutron/blob/master/neutron/agent/l2/agent_extension.py#L28</a><br>
[5] <a href="https://bugs.launchpad.net/neutron/+bug/1499637">https://bugs.launchpad.net/neutron/+bug/1499637</a><br>
<br>
</p>
</div>
<PRE>_________________________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
</PRE></body>
</html>