def _validate_subject_dn_data(self, subject_dn): """Confirm that the subject_dn contains valid data Validate that the subject_dn string parses without error If not, raise InvalidSubjectDN """ try: parse_dn(subject_dn) except ldap_exceptions.LDAPInvalidDnError: raise exception.InvalidSubjectDN(subject_dn=subject_dn)
def _validate_subject_dn_data(self, subject_dn): """Confirm that the subject_dn contains valid data Validate that the subject_dn string parses without error If not, raise InvalidSubjectDN """ try: ldap.dn.str2dn(subject_dn) except Exception: raise exception.InvalidSubjectDN(subject_dn=subject_dn)