Prevent error if cert has no chain info
Change-Id: Ib2f52ef63cec268c30ab74f928f4db85677f028a Closes-Bug: #1850659
This commit is contained in:
parent
c32e82e236
commit
0b4b89340d
|
@ -52,10 +52,12 @@ class NeutronAPIPluginCharm(charms_openstack.charm.OpenStackCharm):
|
|||
|
||||
for tls_object in tls_objects:
|
||||
with open(ovn_ca_cert(self.adapters_instance), 'w') as crt:
|
||||
crt.write(
|
||||
tls_object['ca'] +
|
||||
os.linesep +
|
||||
tls_object.get('chain', ''))
|
||||
chain = tls_object.get('chain')
|
||||
if chain:
|
||||
crt.write(tls_object['ca'] + os.linesep + chain)
|
||||
else:
|
||||
crt.write(tls_object['ca'])
|
||||
|
||||
self.configure_cert(NEUTRON_PLUGIN_ML2_DIR,
|
||||
tls_object['cert'],
|
||||
tls_object['key'],
|
||||
|
|
Loading…
Reference in New Issue