Insecure connection for MOS 7.0
diff --git a/wally/discover/discover.py b/wally/discover/discover.py
index b1feb80..f890237 100644
--- a/wally/discover/discover.py
+++ b/wally/discover/discover.py
@@ -17,6 +17,7 @@
export OS_USERNAME='{name}'
export OS_PASSWORD='{passwd}'
export OS_AUTH_URL='{auth_url}'
+export OS_INSECURE={insecure}
export OS_AUTH_STRATEGY='keystone'
export OS_REGION_NAME='RegionOne'
export CINDER_ENDPOINT_TYPE='publicURL'
@@ -76,7 +77,7 @@
'passwd': openrc_dict['password'],
'tenant': openrc_dict['tenant_name'],
'auth_url': openrc_dict['os_auth_url'],
- 'insecure': openrc_dict.get('insecure', False)}
+ 'insecure': openrc_dict['insecure']}
env_name = clusters_info['fuel']['openstack_env']
env_f_name = env_name
diff --git a/wally/fuel_rest_api.py b/wally/fuel_rest_api.py
index b110fc2..a0eb1ef 100644
--- a/wally/fuel_rest_api.py
+++ b/wally/fuel_rest_api.py
@@ -349,8 +349,15 @@
creds['username'] = access['user']['value']
creds['password'] = access['password']['value']
creds['tenant_name'] = access['tenant']['value']
- creds['os_auth_url'] = "http://{0}:5000/v2.0".format(
- self.get_networks()['public_vip'])
+
+ version = FuelInfo(self.__connection__).get_version()
+ if version >= [7, 0]: #only HTTPS since 7.0
+ creds['insecure'] = "True"
+ creds['os_auth_url'] = "https://{0}:5000/v2.0".format(
+ self.get_networks()['public_vip'])
+ else:
+ creds['os_auth_url'] = "http://{0}:5000/v2.0".format(
+ self.get_networks()['public_vip'])
return creds
def get_nodes(self):