Skip to content

Commit ce3a7b4

Browse files
wprzytulafruch
authored andcommitted
Fixed yaml model (insecureSkipTlsVerify)
Field insecureSkipTlsVerify was incorrectly expected to be in AuthInfo instead of Datacenter.
1 parent a8f01e0 commit ce3a7b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cassandra/scylla/cloud.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@ def __init__(self, configuration_file, pyopenssl=False, endpoint_factory=None):
6666

6767
self.current_context = cloud_config['contexts'][cloud_config['currentContext']]
6868
self.data_centers = cloud_config['datacenters']
69+
self.current_data_center = self.data_centers[self.current_context['datacenterName']]
6970
self.auth_info = cloud_config['authInfos'][self.current_context['authInfoName']]
7071
self.ssl_options = {}
71-
self.skip_tls_verify = self.auth_info.get('insecureSkipTlsVerify', False)
72+
self.skip_tls_verify = self.current_data_center.get('insecureSkipTlsVerify', False)
7273
self.ssl_context = self.create_pyopenssl_context() if pyopenssl else self.create_ssl_context()
7374

74-
proxy_address, port, node_domain = self.get_server(self.data_centers[self.current_context['datacenterName']])
75+
proxy_address, port, node_domain = self.get_server(self.current_data_center)
7576

7677
if not endpoint_factory:
7778
endpoint_factory = SniEndPointFactory(proxy_address, port=int(port), node_domain=node_domain)

0 commit comments

Comments
 (0)