summaryrefslogtreecommitdiffstats
path: root/ipapython/dn.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipapython/dn.py')
-rw-r--r--ipapython/dn.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ipapython/dn.py b/ipapython/dn.py
index 4e8c22bb0..a54629e8b 100644
--- a/ipapython/dn.py
+++ b/ipapython/dn.py
@@ -1155,9 +1155,15 @@ class DN(object):
def _get_rdn(self, rdn):
return self.RDN_type(*rdn, **{'raw': True})
- def __str__(self):
+ def ldap_text(self):
return dn2str(self.rdns)
+ def x500_text(self):
+ return dn2str(reversed(self.rdns))
+
+ def __str__(self):
+ return self.ldap_text()
+
def __repr__(self):
return "%s.%s('%s')" % (self.__module__, self.__class__.__name__, self.__str__())