diff options
Diffstat (limited to 'kolla/cmd')
| -rwxr-xr-x | kolla/cmd/build.py | 3 | ||||
| -rwxr-xr-x | kolla/cmd/genpwd.py | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py index d0d6ab7d9..4674de762 100755 --- a/kolla/cmd/build.py +++ b/kolla/cmd/build.py @@ -15,6 +15,9 @@ import os import sys +# 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 +# pip installed kolla tools PROJECT_ROOT = os.path.abspath(os.path.join( os.path.dirname(os.path.realpath(__file__)), '../..')) if PROJECT_ROOT not in sys.path: diff --git a/kolla/cmd/genpwd.py b/kolla/cmd/genpwd.py index 288b35036..e548b9ab4 100755 --- a/kolla/cmd/genpwd.py +++ b/kolla/cmd/genpwd.py @@ -16,11 +16,20 @@ import argparse import os import random import string +import sys import uuid import yaml from Crypto.PublicKey import RSA +# 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 +# pip installed kolla tools +PROJECT_ROOT = os.path.abspath(os.path.join( + os.path.dirname(os.path.realpath(__file__)), '../..')) +if PROJECT_ROOT not in sys.path: + sys.path.insert(0, PROJECT_ROOT) + def generate_RSA(bits=4096): new_key = RSA.generate(bits, os.urandom) |
