[openstack-dev] [ALL] Removing generate_uuid() from uuidutils

John Griffith john.griffith at solidfire.com
Wed Nov 13 15:47:41 UTC 2013


On Wed, Nov 13, 2013 at 7:21 AM, Andrew Laski
<andrew.laski at rackspace.com> wrote:
> On 11/13/13 at 05:48am, Gary Kotton wrote:
>>
>> I recall a few cycles ago having str(uuid.uuid4()) replaced by
>> generate_uuid(). There was actually a helper function in neutron (back when
>> it was called quantum) and it was replaced. So now we are going back…
>> I am not in favor of this change.
>
>
> I'm also not really in favor of it.  Though it is a trivial method having it
> in oslo implies that this is what uuids should look like across OpenStack
> projects.  And I'm in favor of consistency for uuids across the projects
> because the same parsers and checkers can then be used for input validation
> or log parsing.
>
>>
>> From: Zhongyue Luo <zhongyue.nah at intel.com<mailto:zhongyue.nah at intel.com>>
>> Reply-To: "OpenStack Development Mailing List (not for usage questions)"
>> <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
>>
>> Date: Wednesday, November 13, 2013 8:07 AM
>> To: OpenStack Development Mailing List
>> <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
>>
>> Subject: [openstack-dev] [ALL] Removing generate_uuid() from uuidutils
>>
>> Hi all,
>>
>> We had a discussion of the modules that are incubated in Oslo.
>>
>>
>> https://etherpad.openstack.org/p/icehouse-oslo-status<https://urldefense.proofpoint.com/v1/url?u=https://etherpad.openstack.org/p/icehouse-oslo-status&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=eH0pxTUZo8NPZyF6hgoMQu%2BfDtysg45MkPhCZFxPEq8%3D%0A&m=3ns0o3FRyS2%2Fg%2FTFIH7waZX1o%2FHdXvrJ%2FnH9XMCRy08%3D%0A&s=63eaa20d8c94217d86793a24379b4391179fbfa1fb2c961fb37a5512dbdff69a>
>>
>>
>> One of the conclusions we came to was to deprecate/remove uuidutils in
>> this cycle.
>>
>> The first step into this change should be to remove generate_uuid() from
>> uuidutils.
>>
>> The reason is that 1) generating the UUID string seems trivial enough to
>> not need a function and 2) string representation of uuid4 is not what we
>> want in all projects.
>>
>> To address this, a patch is now on gerrit.
>> https://review.openstack.org/#/c/56152/<https://urldefense.proofpoint.com/v1/url?u=https://review.openstack.org/%23/c/56152/&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=eH0pxTUZo8NPZyF6hgoMQu%2BfDtysg45MkPhCZFxPEq8%3D%0A&m=3ns0o3FRyS2%2Fg%2FTFIH7waZX1o%2FHdXvrJ%2FnH9XMCRy08%3D%0A&s=adb860d11d1ad02718e306b9408c603daa00970685a208db375a9ec011f13978>
>>
>>
>> Each project should directly use the standard uuid module or implement its
>> own helper function to generate uuids if this patch gets in.
>>
>> Any thoughts on this change? Thanks.
>>
>> --
>> Intel SSG/STO/DCST/CIT
>> 880 Zixing Road, Zizhu Science Park, Minhang District, 200241, Shanghai,
>> China
>> +862161166500
>
>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Trivial or not, people use it and frankly I don't see any value at all
in removing it.  As far as the "some projects want a different format
of UUID" that doesn't make a lot of sense to me but if that's what
somebody wants they should write their own method.  I strongly agree
with others with respect to the comments around code-churn.  I see
little value in this.



More information about the OpenStack-dev mailing list