Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-27 Thread Eric Fried
Thanks Doug. I restored [4] and moved the code to the fixture module. Enjoy. -efried On 08/27/2018 10:59 AM, Doug Hellmann wrote: > Excerpts from Eric Fried's message of 2018-08-22 09:13:25 -0500: >> For some time, nova has been using uuidsentinel [1] which conveniently >> allows you to get a

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-27 Thread Doug Hellmann
Excerpts from Eric Fried's message of 2018-08-22 09:13:25 -0500: > For some time, nova has been using uuidsentinel [1] which conveniently > allows you to get a random UUID in a single LOC with a readable name > that's the same every time you reference it within that process (but not > across

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-27 Thread Jay Pipes
On 08/24/2018 07:51 PM, Matt Riedemann wrote: On 8/23/2018 2:05 PM, Chris Dent wrote: On Thu, 23 Aug 2018, Dan Smith wrote: ...and it doesn't work like mock.sentinel does, which is part of the value. I really think we should put this wherever it needs to be so that it can continue to be as

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-24 Thread Davanum Srinivas
On Fri, Aug 24, 2018 at 8:01 PM Jeremy Stanley wrote: > On 2018-08-24 18:51:08 -0500 (-0500), Matt Riedemann wrote: > [...] > > So just follow me here people, what if we had this common shared > > library where code could incubate and then we could write some > > tools to easily copy that common

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-24 Thread Jeremy Stanley
On 2018-08-24 18:51:08 -0500 (-0500), Matt Riedemann wrote: [...] > So just follow me here people, what if we had this common shared > library where code could incubate and then we could write some > tools to easily copy that common code into other projects... If we do this, can we at least put

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-24 Thread Matt Riedemann
On 8/23/2018 2:05 PM, Chris Dent wrote: On Thu, 23 Aug 2018, Dan Smith wrote: ...and it doesn't work like mock.sentinel does, which is part of the value. I really think we should put this wherever it needs to be so that it can continue to be as useful as is is today. Even if that means just

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-24 Thread Chris Dent
On Fri, 24 Aug 2018, Doug Hellmann wrote: I guess all of the people who complained so loudly about the global in oslo.config are gone? It's a diffent context. In a testing environment where there is already a well established pattern of use it's not a big deal. Global in oslo.config is still

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-24 Thread Eric Fried
So... Restore the PS of the oslo_utils version that exposed the global [1]? Or use the forced-singleton pattern from nova [2] to put it in its own importable module, e.g. oslo_utils.uuidutils.uuidsentinel? (FTR, "import only modules" is a thing for me too, but I've noticed it doesn't seem to be

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Doug Hellmann
> On Aug 23, 2018, at 4:01 PM, Ben Nemec wrote: > > > >> On 08/23/2018 12:25 PM, Doug Hellmann wrote: >> Excerpts from Eric Fried's message of 2018-08-23 09:51:21 -0500: >>> Do you mean an actual fixture, that would be used like: >>> >>> class MyTestCase(testtools.TestCase): >>> def

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Ben Nemec
On 08/23/2018 12:25 PM, Doug Hellmann wrote: Excerpts from Eric Fried's message of 2018-08-23 09:51:21 -0500: Do you mean an actual fixture, that would be used like: class MyTestCase(testtools.TestCase): def setUp(self): self.uuids =

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Chris Dent
On Thu, 23 Aug 2018, Dan Smith wrote: ...and it doesn't work like mock.sentinel does, which is part of the value. I really think we should put this wherever it needs to be so that it can continue to be as useful as is is today. Even if that means just copying it into another project -- it's not

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Dan Smith
> The compromise, using the patch as currently written [1], would entail > adding one line at the top of each test file: > > uuids = uuidsentinel.UUIDSentinels() > > ...as seen (more or less) at [2]. The subtle difference being that this > `uuids` wouldn't share a namespace across the whole

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Eric Fried
The compromise, using the patch as currently written [1], would entail adding one line at the top of each test file: uuids = uuidsentinel.UUIDSentinels() ...as seen (more or less) at [2]. The subtle difference being that this `uuids` wouldn't share a namespace across the whole process, only

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Jay Pipes
On 08/23/2018 01:25 PM, Doug Hellmann wrote: Excerpts from Eric Fried's message of 2018-08-23 09:51:21 -0500: Do you mean an actual fixture, that would be used like: class MyTestCase(testtools.TestCase): def setUp(self): self.uuids =

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Doug Hellmann
Excerpts from Eric Fried's message of 2018-08-23 09:51:21 -0500: > Do you mean an actual fixture, that would be used like: > > class MyTestCase(testtools.TestCase): > def setUp(self): > self.uuids = self.useFixture(oslofx.UUIDSentinelFixture()).uuids > > def test_foo(self): >

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Dan Smith
> Do you mean an actual fixture, that would be used like: > > class MyTestCase(testtools.TestCase): > def setUp(self): > self.uuids = self.useFixture(oslofx.UUIDSentinelFixture()).uuids > > def test_foo(self): > do_a_thing_with(self.uuids.foo) > > ? > > That's... okay

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Eric Fried
Do you mean an actual fixture, that would be used like: class MyTestCase(testtools.TestCase): def setUp(self): self.uuids = self.useFixture(oslofx.UUIDSentinelFixture()).uuids def test_foo(self): do_a_thing_with(self.uuids.foo) ? That's... okay I guess, but the

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Jay Pipes
On 08/23/2018 08:06 AM, Doug Hellmann wrote: Excerpts from Davanum Srinivas (dims)'s message of 2018-08-23 06:46:38 -0400: Where exactly Eric? I can't seem to find the import: http://codesearch.openstack.org/?q=(from%7Cimport).*oslotest=nope==oslo.utils -- dims oslo.utils depends on

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Doug Hellmann
Excerpts from Davanum Srinivas (dims)'s message of 2018-08-23 06:46:38 -0400: > Where exactly Eric? I can't seem to find the import: > > http://codesearch.openstack.org/?q=(from%7Cimport).*oslotest=nope==oslo.utils > > -- dims oslo.utils depends on oslotest via test-requirements.txt and

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread Davanum Srinivas
Where exactly Eric? I can't seem to find the import: http://codesearch.openstack.org/?q=(from%7Cimport).*oslotest=nope==oslo.utils -- dims On Wed, Aug 22, 2018 at 11:24 PM Jay Pipes wrote: > > On Wed, Aug 22, 2018, 10:13 AM Eric Fried wrote: > >> For some time, nova has been using

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-23 Thread ChangBo Guo
+1 for oslotest Jay Pipes 于2018年8月23日周四 上午11:24写道: > > On Wed, Aug 22, 2018, 10:13 AM Eric Fried wrote: > >> For some time, nova has been using uuidsentinel [1] which conveniently >> allows you to get a random UUID in a single LOC with a readable name >> that's the same every time you

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-22 Thread Jay Pipes
On Wed, Aug 22, 2018, 10:13 AM Eric Fried wrote: > For some time, nova has been using uuidsentinel [1] which conveniently > allows you to get a random UUID in a single LOC with a readable name > that's the same every time you reference it within that process (but not > across processes). Example

Re: [openstack-dev] [oslo] UUID sentinel needs a home

2018-08-22 Thread Doug Hellmann
Excerpts from Eric Fried's message of 2018-08-22 09:13:25 -0500: > For some time, nova has been using uuidsentinel [1] which conveniently > allows you to get a random UUID in a single LOC with a readable name > that's the same every time you reference it within that process (but not > across

[openstack-dev] [oslo] UUID sentinel needs a home

2018-08-22 Thread Eric Fried
For some time, nova has been using uuidsentinel [1] which conveniently allows you to get a random UUID in a single LOC with a readable name that's the same every time you reference it within that process (but not across processes). Example usage: [2]. We would like other projects (notably the