Return distinguished name of parent node (if it belongs to tree, else return empty string). dn --- distinguished name of node, which parent to return
(self, dn)
| 87 | return [] |
| 88 | |
| 89 | def get_parent_dn(self, dn): |
| 90 | """Return distinguished name of parent node (if it belongs to tree, |
| 91 | else return empty string). |
| 92 | |
| 93 | dn --- distinguished name of node, which parent to return |
| 94 | """ |
| 95 | _len = dn.find(self.delimeter) |
| 96 | if _len == -1: |
| 97 | return "" |
| 98 | else: |
| 99 | if dn[_len+1:] in self.dn_set: |
| 100 | return dn[_len+1:] |
| 101 | else: |
| 102 | return "" |
| 103 | |
| 104 | def get_fake_parent_dn(self, dn): |
| 105 | """Get distinguished name of node that should be a parent of dn, |