aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/resources/v1/env.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/resources/v1/env.py b/api/resources/v1/env.py
index 75c981a96..6c9eb8324 100644
--- a/api/resources/v1/env.py
+++ b/api/resources/v1/env.py
@@ -10,12 +10,16 @@ from __future__ import absolute_import
import errno
import logging
+
+import ipaddress
import os
import subprocess
import threading
import time
import uuid
import glob
+
+import six
import yaml
import collections
@@ -269,6 +273,8 @@ class V1Env(ApiResource):
LOG.info('Openrc file not found')
installer_ip = os.environ.get('INSTALLER_IP',
'192.168.200.2')
+ # validate installer_ip is a valid ipaddress
+ installer_ip = str(ipaddress.IPv4Address(six.u(installer_ip)))
installer_type = os.environ.get('INSTALLER_TYPE', 'compass')
LOG.info('Getting openrc file from %s', installer_type)
self._get_remote_rc_file(rc_file,