Eric Fried 63d7649ed5 UUID sentinel
Add a private _UUIDSentinels() class to oslo_utils.fixture that behaves
like a mock.sentinel, but returns specifically UUIDs. Expose a
(singleton) instance of it called uuidsentinel. This is mostly copied
from [1], with the following differences:

- We don't do the enforced-singleton thing [2]. But importing the
  uuidsentinel global yields the same behavior.
- We don't do the local import thing [3][4], because we're already in
  the right lib, so no issues with circular imports.
- Locking is added to make this threadsafe. (See discussion at [5])

Note that there is some question as to whether it is more appropriate
for this to live here or in oslotest [6]. This has been discussed on the
dev ML [7] and it was concluded [8] that it should live here.

[1] 722d5b4772/nova/tests/uuidsentinel.py
[2] 722d5b4772/nova/tests/uuidsentinel.py (L30)
[3] 722d5b4772/nova/tests/uuidsentinel.py (L18-L19)
[4] 722d5b4772/nova/tests/uuidsentinel.py (L26)
[5] http://eavesdrop.openstack.org/irclogs/%23openstack-oslo/%23openstack-oslo.2018-08-20.log.html#t2018-08-20T20:10:33
[6] https://review.openstack.org/#/c/594068/
[7] http://lists.openstack.org/pipermail/openstack-dev/2018-August/133670.html
[8] http://lists.openstack.org/pipermail/openstack-dev/2018-August/133861.html

Change-Id: I214ff21b461fa1ca4b83476e1d0a763efe986217
2018-08-28 12:55:33 +00:00
..
2018-03-01 06:07:18 +00:00
2018-08-28 12:55:33 +00:00
2017-03-28 13:53:16 +08:00
2018-08-28 12:55:33 +00:00
2018-05-24 18:55:24 +08:00
2018-02-09 12:55:21 +00:00
2018-07-19 12:19:14 -07:00