def reindex(self, be_name, vlv_index=None): reindex_task = Tasks(self._instance) if vlv_index is not None: reindex_task.reindex(suffix=be_name, attrname=vlv_index, vlv=True) else: attrs = [] vlvsorts = VLVIndexes(self._instance, basedn=self._dn).list() if len(vlvsorts) > 0: for vlvsort in vlvsorts: attrs.append(ensure_str(vlvsort.get_attr_val_bytes('cn'))) reindex_task.reindex(suffix=be_name, attrname=attrs, vlv=True)
def reindex(self, attrs=None, wait=False): """Reindex the attributes for this backend :param attrs - an optional list of attributes to index :param wait - Set to true to wait for task to complete """ args = None if wait: args = {TASK_WAIT: True} bename = ensure_str(self.get_attr_val_bytes('cn')) reindex_task = Tasks(self._instance) reindex_task.reindex(benamebase=bename, attrname=attrs, args=args)