diff options
| author | Alex Meade <alex.meade@rackspace.com> | 2012-11-09 10:53:02 -0500 |
|---|---|---|
| committer | Alex Meade <alex.meade@rackspace.com> | 2012-11-09 12:40:13 -0500 |
| commit | 251c4f54dc608d217573e3e776bb985a14684603 (patch) | |
| tree | 4b888dfbe556f6951109f85081fd41939d7fe5ef /openstack | |
| parent | ac4515559fb7bd1a480f7260b7143ebf84e2202a (diff) | |
| download | oslo-251c4f54dc608d217573e3e776bb985a14684603.tar.gz oslo-251c4f54dc608d217573e3e776bb985a14684603.tar.xz oslo-251c4f54dc608d217573e3e776bb985a14684603.zip | |
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
Diffstat (limited to 'openstack')
| -rw-r--r-- | openstack/common/uuidutils.py | 4 |
1 files changed, 4 insertions, 0 deletions
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. |
