Currently to get the parent OU of given OU is to strip the given OU dn and search again
parent_ou_dn_elements = ou_dn.split(',')[1:]
parent_ou_dn = ','.join(parent_ou_dn_elements)
ou_filter = '(& (objectclass=OrganizationalUnit)(distinguishedName={})'.format(parent_ou_dn)
ad_query(self.root_folder, ','.join(ou_filter))
Is there a more pythonic way to do so? eg.
ou.parent