<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Salvatore,<div><br></div><div>As per Jim's comments, it looks like testing the plugins as part of quantum is the only option if they are to remain in the repo.  Fair enough.  So is the idea to add plugin-specific dependency files that can then be  referenced by tox.ini?  The alternative would be including plugin dependencies in quantum's *-requires files, but that could packaging grief.</div><div><br></div><div>Thanks,</div><div><br></div><div><br></div><div>Maru  </div><div><br><div><div>On 2012-08-24, at 5:08 PM, Salvatore Orlando wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Maru,<div><br></div><div>whether plugins should be packaged or not with the main quantum service is a "recurrent" question on this mailing list - and I am afraid I don't have answer to it!</div><div>Pro and cons of separating the plugins from the main repository have been discussed on the mailing list and on the IRC channels; I hope some final deciscion/action will be agreed at the next Openstack summit. However, so far nothing has been done in this direction.</div>
<div><br></div><div>As concerns testing, our goal is to ensure that plugins too are covered by unit tests just like the quantum service. This can be achieved in two ways:</div><div>1) moving all tests in the same tree, so that  a single tox run can run them all, or</div>
<div>2) modifying the unit testing script on the openstack jenkins to run tox in the main tests directory and into each plugin's test dir.</div><div><br></div><div>The approach I am following so far is the first, which seem consistent with what nova does for its virt drivers; however if we (and the openstack-ci team) believe we should do it differently, we could have a tox.ini and a test-requires into each plugin folder, and execute a tox run for each plugin (plus a tox run for the quantum service)</div>
<div><br></div><div>Salvatore</div><div><br><br><div class="gmail_quote">On 24 August 2012 17:35, Maru Newby <span dir="ltr"><<a href="mailto:mnewby@internap.com" target="_blank">mnewby@internap.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Salvatore,<br>
<br>
I see you're working on getting plugins testable with tox:<br>
<br>
<a href="https://review.openstack.org/#/c/11922/" target="_blank">https://review.openstack.org/#/c/11922/</a><br>
<br>
What about keeping the plugins isolated for testing purposes?  I have been unable to work on it yet, but I was thinking it might be a good idea to move the plugins out of the main tree (but still in the same repo) for ease of maintenance, testing and deployment.  The thought was:<br>

<br>
- relocate all plugins outside of main quantum tree (plugins/ dir in the repo root)<br>
- give each plugin<br>
  - its own python root-level package (e.g. quantum_ovs)<br>
  - its own tox.ini<br>
  - its own tools/*-requires<br>
<br>
So the layout would be something like:<br>
<br>
plugins/quantum_ovs/tox.ini<br>
plugins/quantum_ovs/quantum_ovs/__init__.py<br>
plugins/quantum_ovs/tests/__init__.py<br>
plugins/quanum_ovs/tools/pip-requires<br>
....<br>
plugins/quantum_linuxbridge/tox.ini<br>
...<br>
<br>
The tests for each plugin could then be executed via an independent tox run.<br>
<br>
Is there any merit to this, now or in the future?<br>
<br>
Thanks,<br>
<br>
<br>
Maru<br>
<br>
On 2012-08-24, at 2:56 PM, Salvatore Orlando (Code Review) wrote:<br>
<br>
> Salvatore Orlando has uploaded a new change for review.<br>
><br>
> Change subject: Enable tox to run OVS plugin unit tests<br>
> ......................................................................<br>
><br>
> Enable tox to run OVS plugin unit tests<br>
><br>
> Fix bug 1029142<br>
><br>
> Unit tests have been moved into /quantum/tests/unit<br>
><br>
> Change-Id: I5d0fa84826f62a86e4ab04c3e1958869f24a1fcf<br>
> ---<br>
> D quantum/plugins/openvswitch/run_tests.py<br>
> D quantum/plugins/openvswitch/tests/__init__.py<br>
> D quantum/plugins/openvswitch/tests/unit/__init__.py<br>
> R quantum/tests/unit/test_ovs_db.py<br>
> R quantum/tests/unit/test_ovs_defaults.py<br>
> R quantum/tests/unit/test_ovs_rpcapi.py<br>
> R quantum/tests/unit/test_ovs_tunnel.py<br>
> 7 files changed, 0 insertions(+), 72 deletions(-)<br>
><br>
><br>
>  git pull ssh://<a href="http://review.openstack.org:29418/openstack/quantum" target="_blank">review.openstack.org:29418/openstack/quantum</a> refs/changes/22/11922/1<br>
> --<br>
> To view, visit <a href="https://review.openstack.org/11922" target="_blank">https://review.openstack.org/11922</a><br>
> To unsubscribe, visit <a href="https://review.openstack.org/settings" target="_blank">https://review.openstack.org/settings</a><br>
><br>
> Gerrit-MessageType: newchange<br>
> Gerrit-Change-Id: I5d0fa84826f62a86e4ab04c3e1958869f24a1fcf<br>
> Gerrit-PatchSet: 1<br>
> Gerrit-Project: openstack/quantum<br>
> Gerrit-Branch: master<br>
> Gerrit-Owner: Salvatore Orlando <<a href="mailto:salv.orlando@gmail.com">salv.orlando@gmail.com</a>><br>
<br>
<br>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
</blockquote></div><br></div>
</blockquote></div><br></div></body></html>