<div dir="auto"><div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 22, 2018, 10:13 AM Eric Fried <openstack@fried.cc> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For some time, nova has been using uuidsentinel [1] which conveniently<br>
allows you to get a random UUID in a single LOC with a readable name<br>
that's the same every time you reference it within that process (but not<br>
across processes). Example usage: [2].<br>
<br>
We would like other projects (notably the soon-to-be-split-out placement<br>
project) to be able to use uuidsentinel without duplicating the code. So<br>
we would like to stuff it in an oslo lib.<br>
<br>
The question is whether it should live in oslotest [3] or in<br>
oslo_utils.uuidutils [4]. The proposed patches are (almost) the same.<br>
The issues we've thought of so far:<br>
<br>
- If this thing is used only for test, oslotest makes sense. We haven't<br>
thought of a non-test use, but somebody surely will.<br>
- Conversely, if we put it in oslo_utils, we're kinda saying we support<br>
it for non-test too. (This is why the oslo_utils version does some extra<br>
work for thread safety and collision avoidance.)<br>
- In oslotest, awkwardness is necessary to avoid circular importing:<br>
uuidsentinel uses oslo_utils.uuidutils, which requires oslotest. In<br>
oslo_utils.uuidutils, everything is right there.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">My preference is to put it in oslotest. Why does oslo_utils.uuidutils import oslotest? That makes zero sense to me...</div><div dir="auto"><br></div><div dir="auto">-jay</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- It's a... UUID util. If I didn't know anything and I was looking for a<br>
UUID util like uuidsentinel, I would look in a module called uuidutils<br>
first.<br>
<br>
We hereby solicit your opinions, either by further discussion here or as<br>
votes on the respective patches.<br>
<br>
Thanks,<br>
efried<br>
<br>
[1]<br>
<a href="https://github.com/openstack/nova/blob/17b69575bc240ca1dd8b7a681de846d90f3b642c/nova/tests/uuidsentinel.py" rel="noreferrer noreferrer" target="_blank">https://github.com/openstack/nova/blob/17b69575bc240ca1dd8b7a681de846d90f3b642c/nova/tests/uuidsentinel.py</a><br>
[2]<br>
<a href="https://github.com/openstack/nova/blob/17b69575bc240ca1dd8b7a681de846d90f3b642c/nova/tests/functional/api/openstack/placement/db/test_resource_provider.py#L109-L115" rel="noreferrer noreferrer" target="_blank">https://github.com/openstack/nova/blob/17b69575bc240ca1dd8b7a681de846d90f3b642c/nova/tests/functional/api/openstack/placement/db/test_resource_provider.py#L109-L115</a><br>
[3] <a href="https://review.openstack.org/594068" rel="noreferrer noreferrer" target="_blank">https://review.openstack.org/594068</a><br>
[4] <a href="https://review.openstack.org/594179" rel="noreferrer noreferrer" target="_blank">https://review.openstack.org/594179</a><br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div></div></div>