Do not have to mention ssl_ca_cert in vim config file (server)
This patch along with another patch on the tacker client will remove the need to mention ssl_ca_cert in the vim configuration file. Tacker client patch: https://review.openstack.org/546578 Change-Id: I362c40e8b2a606e3b28d368a95e74ee5ea306241
This commit is contained in:
parent
ffc9a84d73
commit
e44ce6ed7f
@ -74,8 +74,8 @@ class Kubernetes_Driver(abstract_vim_driver.VimAbstractDriver):
|
|||||||
return auth_cred, file_descriptor
|
return auth_cred, file_descriptor
|
||||||
|
|
||||||
def _create_ssl_ca_file(self, auth_cred):
|
def _create_ssl_ca_file(self, auth_cred):
|
||||||
|
if auth_cred.get('ssl_ca_cert', ''):
|
||||||
ca_cert = auth_cred['ssl_ca_cert']
|
ca_cert = auth_cred['ssl_ca_cert']
|
||||||
if ca_cert is not None:
|
|
||||||
file_descriptor, file_path = \
|
file_descriptor, file_path = \
|
||||||
self.kubernetes.create_ca_cert_tmp_file(ca_cert)
|
self.kubernetes.create_ca_cert_tmp_file(ca_cert)
|
||||||
auth_cred['ca_cert_file'] = file_path
|
auth_cred['ca_cert_file'] = file_path
|
||||||
@ -189,7 +189,7 @@ class Kubernetes_Driver(abstract_vim_driver.VimAbstractDriver):
|
|||||||
encoded_auth = fernet_obj.encrypt(
|
encoded_auth = fernet_obj.encrypt(
|
||||||
auth['bearer_token'].encode('utf-8'))
|
auth['bearer_token'].encode('utf-8'))
|
||||||
auth['bearer_token'] = encoded_auth
|
auth['bearer_token'] = encoded_auth
|
||||||
if ('ssl_ca_cert' in auth) and (auth['ssl_ca_cert'] is not None):
|
if auth.get('ssl_ca_cert', ''):
|
||||||
encoded_auth = fernet_obj.encrypt(
|
encoded_auth = fernet_obj.encrypt(
|
||||||
auth['ssl_ca_cert'].encode('utf-8'))
|
auth['ssl_ca_cert'].encode('utf-8'))
|
||||||
auth['ssl_ca_cert'] = encoded_auth
|
auth['ssl_ca_cert'] = encoded_auth
|
||||||
|
Loading…
Reference in New Issue
Block a user