summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootstrap/Dockerfile-template2
-rwxr-xr-xscripts/designate_import.py7
-rwxr-xr-xscripts/detemplate-bpinputs.py29
3 files changed, 24 insertions, 14 deletions
diff --git a/bootstrap/Dockerfile-template b/bootstrap/Dockerfile-template
index 935e77b..531939a 100644
--- a/bootstrap/Dockerfile-template
+++ b/bootstrap/Dockerfile-template
@@ -3,7 +3,7 @@ MAINTAINER maintainer
ENV INSROOT /opt/app
ENV APPUSER installer
RUN apt-get update\
- && apt-get install -y wget python-virtualenv python-pip ssh ed curl uuid-runtime\
+ && apt-get install -y iputils-ping wget python-virtualenv python-pip ssh ed curl uuid-runtime netcat\
&& apt-get clean\
&& pip install --upgrade pip\
&& mkdir -p ${INSROOT}/${APPUSER}/blueprints\
diff --git a/scripts/designate_import.py b/scripts/designate_import.py
index df09f50..9b0fc7d 100755
--- a/scripts/designate_import.py
+++ b/scripts/designate_import.py
@@ -43,12 +43,15 @@ def main():
print("Usgae: {} input_file [auth_url username password tenant]".format(sys.argv[0]))
exit(1)
if len(sys.argv) == 6:
- print("Creating DNS records using record defs from {}, authurl {}, usernaem {}, tenant {}".format(
+ print("Creating DNS records using record defs from {}, authurl {}, username {}, tenant {}".format(
sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[5]))
else:
- print("Creating DNS records using record defs from {}, authurl {}, usernaem {}, tenant {}".format(
+ print("Creating DNS records using record defs from {}, authurl {}, username {}, tenant {}".format(
shell.env('OS_AUTH_URL'), shell.env('OS_USERNAME'), shell.env('OS_PASSWORD'), shell.env('OS_PROJECT_NAME')))
+ print("Usage: {} disabled until changed".format(sys.argv[0]))
+ exit(1)
+
inputfilepath = sys.argv[1]
auth = ""
diff --git a/scripts/detemplate-bpinputs.py b/scripts/detemplate-bpinputs.py
index 97fd88f..ab9905a 100755
--- a/scripts/detemplate-bpinputs.py
+++ b/scripts/detemplate-bpinputs.py
@@ -81,17 +81,24 @@ def detemplate_bpinputs(jjt_directory, in_directory, out_directory):
def add_keystone_20(conf_directory, filename):
fpath = os.path.join(conf_directory, filename)
newurl = ''
- with open(fpath, 'r') as f:
- url = f.readline().rstrip()
- if not url.endswith('/2.0'):
- if url.endswith('/'):
- newurl = url + '2.0'
- else:
- newurl = url + '/2.0'
- f.close()
+ try:
+ with open(fpath, 'r') as f:
+ url = f.readline().rstrip()
+ if not url.endswith('/v2.0'):
+ if url.endswith('/'):
+ newurl = url + 'v2.0'
+ else:
+ newurl = url + '/v2.0'
+ except:
+ newurl = ''
+ print("add_keystone_20 eception reading file: " + conf_directory + "/" + filename)
+
if newurl:
- with open(fpath, 'w') as f:
- f.write(newurl)
+ try:
+ with open(fpath, 'w') as f:
+ f.write(newurl)
+ except:
+ print("add_keystone_20 eception writing file: " + conf_directory + "/" + filename)
def main():
@@ -100,9 +107,9 @@ def main():
exit(1)
print("De-templatizing templates in {} using variable defs from {}, results in {}".format(sys.argv[1], sys.argv[2], sys.argv[3]))
+ add_keystone_20(conf_directory = sys.argv[1], filename = 'keystone_url.txt')
check_templates(sys.argv[1], sys.argv[2])
detemplate_bpinputs(jjt_directory = sys.argv[1], in_directory = sys.argv[2], out_directory = sys.argv[3])
- add_keystone_20(conf_directory = sys.argv[3], filename = 'keystone_url.txt')
########################################
if __name__ == "__main__":