From 251c4f54dc608d217573e3e776bb985a14684603 Mon Sep 17 00:00:00 2001 From: Alex Meade Date: Fri, 9 Nov 2012 10:53:02 -0500 Subject: Add generate_uuid to uuidutils. Currently many projects have their own nearly identical methods for generating uuids. This patch will change that. Change-Id: I0af348ddbdea658331e8e701dcf1f8a12d968479 --- openstack/common/uuidutils.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'openstack/common') diff --git a/openstack/common/uuidutils.py b/openstack/common/uuidutils.py index 51042a7..7608acb 100644 --- a/openstack/common/uuidutils.py +++ b/openstack/common/uuidutils.py @@ -22,6 +22,10 @@ UUID related utilities and helper functions. import uuid +def generate_uuid(): + return str(uuid.uuid4()) + + def is_uuid_like(val): """Returns validation of a value as a UUID. -- cgit