class CustomAttrTlsContainer(CustomAttr): def __init__(self, keystone_auth_conf_file, key, value): super(CustomAttrTlsContainer, self).__init__(key, value) self.cert_manager = Barbican_Cert_Manager(keystone_auth_conf_file) def validate(self): if self._key != 'tls_container': return False if (self.cert_manager and \ self.cert_manager._validate_tls_secret(self._value)): tls_pem_string = self.cert_manager._populate_tls_pem(self._value) self._value = tls_pem_string return True else: logging.error("TLS container invalid") return False def post_validation(self): return self._value
def __init__(self, keystone_auth_conf_file, key, value): super(CustomAttrTlsContainer, self).__init__(key, value) self.cert_manager = Barbican_Cert_Manager(keystone_auth_conf_file)