diff options
Diffstat (limited to 'src/pybind/mgr/cephadm/inventory.py')
-rw-r--r-- | src/pybind/mgr/cephadm/inventory.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pybind/mgr/cephadm/inventory.py b/src/pybind/mgr/cephadm/inventory.py index d3681cbe60a..550604fc55b 100644 --- a/src/pybind/mgr/cephadm/inventory.py +++ b/src/pybind/mgr/cephadm/inventory.py @@ -438,6 +438,7 @@ class SpecStore(): for key_attr in [ 'server_key', 'client_key', + 'encryption_key', ]: key = getattr(nvmeof_spec, key_attr, None) if key: @@ -490,6 +491,7 @@ class SpecStore(): self.mgr.cert_key_store.rm_cert('nvmeof_root_ca_cert', service_name=spec.service_name()) self.mgr.cert_key_store.rm_key('nvmeof_server_key', service_name=spec.service_name()) self.mgr.cert_key_store.rm_key('nvmeof_client_key', service_name=spec.service_name()) + self.mgr.cert_key_store.rm_key('nvmeof_encryption_key', service_name=spec.service_name()) def get_created(self, spec: ServiceSpec) -> Optional[datetime.datetime]: return self.spec_created.get(spec.service_name()) @@ -1969,6 +1971,7 @@ class CertKeyStore(): 'ingress_ssl_key', 'nvmeof_server_key', 'nvmeof_client_key', + 'nvmeof_encryption_key', ] known_certs: Dict[str, Any] = {} @@ -2005,6 +2008,7 @@ class CertKeyStore(): 'ingress_ssl_key': {}, # service-name -> key 'nvmeof_server_key': {}, # service-name -> key 'nvmeof_client_key': {}, # service-name -> key + 'nvmeof_encryption_key': {}, # service-name -> key } def get_cert(self, entity: str, service_name: str = '', host: str = '') -> str: @@ -2032,8 +2036,8 @@ class CertKeyStore(): var = service_name if entity in self.service_name_cert else host j = {} self.known_certs[entity][var] = cert_obj - for service_name in self.known_certs[entity].keys(): - j[var] = Cert.to_json(self.known_certs[entity][var]) + for cert_key in self.known_certs[entity]: + j[cert_key] = Cert.to_json(self.known_certs[entity][cert_key]) else: self.known_certs[entity] = cert_obj j = Cert.to_json(cert_obj) |