aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-11-29 08:40:51 +0000
committerGerrit Code Review <review@openstack.org>2016-11-29 08:40:51 +0000
commit8b8d10848f611a69eba7ed9f3e3cd01ba29d7ed7 (patch)
treeea6f1f7d7761b37b6b3cf2eb1210ec00fe2f569f
parent869febe43ee800063bdad5c2624f0a198c63fc48 (diff)
parent142919813975dc53ef77fbe87024112692511c55 (diff)
downloadkolla-ansible-8b8d10848f611a69eba7ed9f3e3cd01ba29d7ed7.tar.gz
kolla-ansible-8b8d10848f611a69eba7ed9f3e3cd01ba29d7ed7.zip
Merge "use uuidutils instead of uuid.uuid4()"
-rwxr-xr-xkolla/cmd/genpwd.py6
-rw-r--r--requirements.txt1
2 files changed, 4 insertions, 3 deletions
diff --git a/kolla/cmd/genpwd.py b/kolla/cmd/genpwd.py
index e548b9ab4..5ed46410c 100755
--- a/kolla/cmd/genpwd.py
+++ b/kolla/cmd/genpwd.py
@@ -17,10 +17,10 @@ import os
import random
import string
import sys
-import uuid
-import yaml
from Crypto.PublicKey import RSA
+from oslo_utils import uuidutils
+import yaml
# NOTE(SamYaple): Update the search path to prefer PROJECT_ROOT as the source
# of packages to import if we are using local tools instead of
@@ -81,7 +81,7 @@ def main():
if k in blank_keys and v is None:
continue
if k in uuid_keys:
- passwords[k] = str(uuid.uuid4())
+ passwords[k] = uuidutils.generate_uuid()
else:
passwords[k] = ''.join([
random.SystemRandom().choice(
diff --git a/requirements.txt b/requirements.txt
index 142f6f691..d204dac37 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -8,6 +8,7 @@ gitdb>=0.6.4 # BSD License (3 clause)
GitPython>=1.0.1 # BSD License (3 clause)
six>=1.9.0 # MIT
oslo.config!=3.18.0,>=3.14.0 # Apache-2.0
+oslo.utils>=3.18.0 # Apache-2.0
setuptools!=24.0.0,>=16.0 # PSF/ZPL
pycrypto>=2.6 # Public Domain
netaddr!=0.7.16,>=0.7.13 # BSD