From 440c198bde025cd667b84faa4563d1fd05ae129f Mon Sep 17 00:00:00 2001
From: alisha17 <anejaalisha@yahoo.com>
Date: Tue, 5 Dec 2017 00:34:24 +1100
Subject: [PATCH] Ticket 49479 - Remove unused 'batch' argument from lib389

Bug Description: Batch is unused in lib389.

Fix Description:  Remove batch from lib389.

https://pagure.io/389-ds-base/issue/49479

Author: Alisha Aneja

Review by: ???

remove 'batch' from lib389

remove 'batch' from lib389
---
 src/lib389/lib389/_mapped_object.py         |  20 ++---
 src/lib389/lib389/backend.py                |  14 ++--
 src/lib389/lib389/config.py                 |  18 ++--
 src/lib389/lib389/idm/account.py            |   8 +-
 src/lib389/lib389/idm/domain.py             |   6 +-
 src/lib389/lib389/idm/group.py              |  20 ++---
 src/lib389/lib389/idm/organisationalrole.py |  12 +--
 src/lib389/lib389/idm/organisationalunit.py |  12 +--
 src/lib389/lib389/idm/organization.py       |  12 +--
 src/lib389/lib389/idm/posixgroup.py         |  12 +--
 src/lib389/lib389/idm/services.py           |  12 +--
 src/lib389/lib389/idm/user.py               |  12 +--
 src/lib389/lib389/index.py                  |   8 +-
 src/lib389/lib389/mappingTree.py            |  12 +--
 src/lib389/lib389/monitor.py                |  13 ++-
 src/lib389/lib389/plugins.py                | 126 ++++++++++++++--------------
 src/lib389/lib389/referral.py               |   8 +-
 src/lib389/lib389/replica.py                |  12 +--
 src/lib389/lib389/rootdse.py                |   4 +-
 src/lib389/lib389/schema.py                 |   4 +-
 src/lib389/lib389/tasks.py                  |  16 ++--
 21 files changed, 152 insertions(+), 209 deletions(-)

diff --git a/src/lib389/lib389/_mapped_object.py b/src/lib389/lib389/_mapped_object.py
index a85428807..9f1d3d0cf 100644
--- a/src/lib389/lib389/_mapped_object.py
+++ b/src/lib389/lib389/_mapped_object.py
@@ -86,12 +86,10 @@ class DSLdapObject(DSLogging):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
     # TODO: Automatically create objects when they are requested to have properties added
-    def __init__(self, instance, dn=None, batch=False):
+    def __init__(self, instance, dn=None):
         self._instance = instance
         super(DSLdapObject, self).__init__(self._instance.verbose)
         # This allows some factor objects to be overriden
@@ -99,7 +97,6 @@ class DSLdapObject(DSLogging):
         if dn is not None:
             self._dn = ensure_str(dn)
 
-        self._batch = batch
         self._protected = True
         # Used in creation
         self._create_objectclasses = []
@@ -322,10 +319,8 @@ class DSLdapObject(DSLogging):
         elif value is not None:
             value = [ensure_bytes(value)]
 
-        if self._batch:
-            pass
-        else:
-            return self._instance.modify_ext_s(self._dn, [(action, key, value)], serverctrls=self._server_controls, clientctrls=self._client_controls)
+        return self._instance.modify_ext_s(self._dn, [(action, key, value)],
+             serverctrls=self._server_controls, clientctrls=self._client_controls)
 
     def apply_mods(self, mods):
         """Perform modification operation using several mods at once
@@ -734,11 +729,9 @@ class DSLdapObjects(DSLogging):
 
     :param instance: An instance
     :type instance: lib389.DirSrv
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, batch=False):
+    def __init__(self, instance):
         self._childobject = DSLdapObject
         self._instance = instance
         super(DSLdapObjects, self).__init__(self._instance.verbose)
@@ -747,7 +740,6 @@ class DSLdapObjects(DSLogging):
         self._list_attrlist = ['dn']
         # Copy this from the child if we need.
         self._basedn = ""
-        self._batch = batch
         self._scope = ldap.SCOPE_SUBTREE
         self._server_controls = None
         self._client_controls = None
@@ -762,7 +754,7 @@ class DSLdapObjects(DSLogging):
         # have "many" possible child types, this allows us to overload
         # and select / return the right one through ALL our get/list/create
         # functions with very little work on the behalf of the overloader
-        return self._childobject(instance=self._instance, dn=dn, batch=self._batch)
+        return self._childobject(instance=self._instance, dn=dn)
 
     def list(self):
         """Get a list of children entries (DSLdapObject, Replica, etc.) using a base DN
@@ -784,7 +776,7 @@ class DSLdapObjects(DSLogging):
                 attrlist=self._list_attrlist,
                 serverctrls=self._server_controls, clientctrls=self._client_controls
             )
-            # def __init__(self, instance, dn=None, batch=False):
+            # def __init__(self, instance, dn=None):
             insts = [self._entry_to_instance(dn=r.dn, entry=r) for r in results]
         except ldap.NO_SUCH_OBJECT:
             # There are no objects to select from, se we return an empty array
diff --git a/src/lib389/lib389/backend.py b/src/lib389/lib389/backend.py
index 5f78d41f4..7a2651316 100644
--- a/src/lib389/lib389/backend.py
+++ b/src/lib389/lib389/backend.py
@@ -394,14 +394,12 @@ class Backend(DSLdapObject):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
     _must_attributes = ['nsslapd-suffix', 'cn']
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(Backend, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(Backend, self).__init__(instance, dn)
         self._rdn_attribute = 'cn'
         self._must_attributes = ['nsslapd-suffix', 'cn']
         self._create_objectclasses = ['top', 'extensibleObject', BACKEND_OBJECTCLASS_VALUE]
@@ -550,7 +548,7 @@ class Backend(DSLdapObject):
     def get_monitor(self):
         """Get a MonitorBackend(DSLdapObject) for the backend"""
 
-        monitor = MonitorBackend(instance=self._instance, dn= "cn=monitor,%s" % self._dn, batch=self._batch)
+        monitor = MonitorBackend(instance=self._instance, dn= "cn=monitor,%s" % self._dn)
         return monitor
 
     def get_indexes(self):
@@ -568,12 +566,10 @@ class Backends(DSLdapObjects):
 
     :param instance: An instance
     :type instance: lib389.DirSrv
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, batch=False):
-        super(Backends, self).__init__(instance=instance, batch=batch)
+    def __init__(self, instance):
+        super(Backends, self).__init__(instance=instance)
         self._objectclasses = [BACKEND_OBJECTCLASS_VALUE]
         self._filterattrs = ['cn', 'nsslapd-suffix', 'nsslapd-directory']
         self._childobject = Backend
diff --git a/src/lib389/lib389/config.py b/src/lib389/lib389/config.py
index 566b75419..35ecf17de 100644
--- a/src/lib389/lib389/config.py
+++ b/src/lib389/lib389/config.py
@@ -31,9 +31,9 @@ class Config(DSLdapObject):
         - set access and error logging
         - get and set "cn=config" attributes
     """
-    def __init__(self, conn, batch=False):
+    def __init__(self, conn):
         """@param conn - a DirSrv instance """
-        super(Config, self).__init__(instance=conn, batch=batch)
+        super(Config, self).__init__(instance=conn)
         self._dn = DN_CONFIG
         # self._instance = conn
         # self.log = conn.log
@@ -203,9 +203,9 @@ class Encryption(DSLdapObject):
         - ssl ciphers
         - ssl / tls levels
     """
-    def __init__(self, conn, batch=False):
+    def __init__(self, conn):
         """@param conn - a DirSrv instance """
-        super(Encryption, self).__init__(instance=conn, batch=batch)
+        super(Encryption, self).__init__(instance=conn)
         self._dn = 'cn=encryption,%s' % DN_CONFIG
         self._create_objectclasses = ['top', 'nsEncryptionConfig']
         # Once created, don't allow it's removal
@@ -232,9 +232,9 @@ class RSA(DSLdapObject):
         - Database path
         - ssl token name
     """
-    def __init__(self, conn, batch=False):
+    def __init__(self, conn):
         """@param conn - a DirSrv instance """
-        super(RSA, self).__init__(instance=conn, batch=batch)
+        super(RSA, self).__init__(instance=conn)
         self._dn = 'cn=RSA,cn=encryption,%s' % DN_CONFIG
         self._create_objectclasses = ['top', 'nsEncryptionModule']
         self._rdn_attribute = 'cn'
@@ -358,12 +358,10 @@ class LDBMConfig(DSLdapObject):
 
         :param instance: An instance
         :type instance: lib389.DirSrv
-        :param batch: Not implemented
-        :type batch: bool
     """
 
-    def __init__(self, conn, batch=False):
-        super(LDBMConfig, self).__init__(instance=conn, batch=batch)
+    def __init__(self, conn):
+        super(LDBMConfig, self).__init__(instance=conn)
         self._dn = DN_CONFIG_LDBM
         config_compare_exclude = []
         self._rdn_attribute = 'cn'
diff --git a/src/lib389/lib389/idm/account.py b/src/lib389/lib389/idm/account.py
index 8dcbe6bc5..9953f289d 100644
--- a/src/lib389/lib389/idm/account.py
+++ b/src/lib389/lib389/idm/account.py
@@ -16,8 +16,6 @@ class Account(DSLdapObject):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
     def is_locked(self):
@@ -45,12 +43,10 @@ class Accounts(DSLdapObjects):
     :type instance: lib389.DirSrv
     :param basedn: Base DN for all account entries below
     :type basedn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, basedn, batch=False):
-        super(Accounts, self).__init__(instance, batch)
+    def __init__(self, instance, basedn):
+        super(Accounts, self).__init__(instance)
         # These are all the objects capable of holding a password.
         self._objectclasses = [
             'simpleSecurityObject',
diff --git a/src/lib389/lib389/idm/domain.py b/src/lib389/lib389/idm/domain.py
index a30c5bdf7..aff963967 100644
--- a/src/lib389/lib389/idm/domain.py
+++ b/src/lib389/lib389/idm/domain.py
@@ -17,12 +17,10 @@ class Domain(DSLdapObject):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(Domain, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(Domain, self).__init__(instance, dn)
         self._rdn_attribute = 'dc'
         self._must_attributes = ['dc']
         self._create_objectclasses = [
diff --git a/src/lib389/lib389/idm/group.py b/src/lib389/lib389/idm/group.py
index be6001c92..044772600 100644
--- a/src/lib389/lib389/idm/group.py
+++ b/src/lib389/lib389/idm/group.py
@@ -21,12 +21,10 @@ class Group(DSLdapObject):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(Group, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(Group, self).__init__(instance, dn)
         self._rdn_attribute = RDN
         # Can I generate these from schema?
         self._must_attributes = MUST_ATTRIBUTES
@@ -74,12 +72,10 @@ class Groups(DSLdapObjects):
     :type instance: lib389.DirSrv
     :param basedn: Base DN for all group entries below
     :type basedn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, basedn, batch=False, rdn='ou=Groups'):
-        super(Groups, self).__init__(instance, batch)
+    def __init__(self, instance, basedn, rdn='ou=Groups'):
+        super(Groups, self).__init__(instance)
         self._objectclasses = [
             'groupOfNames',
         ]
@@ -91,8 +87,8 @@ class Groups(DSLdapObjects):
 class UniqueGroup(DSLdapObject):
     # WARNING!!!
     # Use group, not unique group!!!
-    def __init__(self, instance, dn=None, batch=False):
-        super(UniqueGroup, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(UniqueGroup, self).__init__(instance, dn)
         self._rdn_attribute = RDN
         self._must_attributes = MUST_ATTRIBUTES
         self._create_objectclasses = [
@@ -117,8 +113,8 @@ class UniqueGroup(DSLdapObject):
 class UniqueGroups(DSLdapObjects):
     # WARNING!!!
     # Use group, not unique group!!!
-    def __init__(self, instance, basedn, batch=False, rdn='ou=Groups'):
-        super(UniqueGroups, self).__init__(instance, batch)
+    def __init__(self, instance, basedn, rdn='ou=Groups'):
+        super(UniqueGroups, self).__init__(instance)
         self._objectclasses = [
             'groupOfUniqueNames',
         ]
diff --git a/src/lib389/lib389/idm/organisationalrole.py b/src/lib389/lib389/idm/organisationalrole.py
index 7bfb2f7d6..1d560f252 100644
--- a/src/lib389/lib389/idm/organisationalrole.py
+++ b/src/lib389/lib389/idm/organisationalrole.py
@@ -21,12 +21,10 @@ class OrganisationalRole(DSLdapObject):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(OrganisationalRole, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(OrganisationalRole, self).__init__(instance, dn)
         self._rdn_attribute = RDN
         self._must_attributes = MUST_ATTRIBUTES
         self._create_objectclasses = [
@@ -43,12 +41,10 @@ class OrganisationalRoles(DSLdapObjects):
     :type instance: lib389.DirSrv
     :param basedn: Base DN for all group entries below
     :type basedn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, basedn, batch=False):
-        super(OrganisationalRoles, self).__init__(instance, batch)
+    def __init__(self, instance, basedn):
+        super(OrganisationalRoles, self).__init__(instance)
         self._objectclasses = [
             'organizationalrole',
         ]
diff --git a/src/lib389/lib389/idm/organisationalunit.py b/src/lib389/lib389/idm/organisationalunit.py
index 8a2997016..ac3de05b8 100644
--- a/src/lib389/lib389/idm/organisationalunit.py
+++ b/src/lib389/lib389/idm/organisationalunit.py
@@ -20,12 +20,10 @@ class OrganisationalUnit(DSLdapObject):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(OrganisationalUnit, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(OrganisationalUnit, self).__init__(instance, dn)
         self._rdn_attribute = RDN
         # Can I generate these from schema?
         self._must_attributes = MUST_ATTRIBUTES
@@ -42,12 +40,10 @@ class OrganisationalUnits(DSLdapObjects):
     :type instance: lib389.DirSrv
     :param basedn: Base DN for all group entries below
     :type basedn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, basedn, batch=False):
-        super(OrganisationalUnits, self).__init__(instance, batch)
+    def __init__(self, instance, basedn):
+        super(OrganisationalUnits, self).__init__(instance)
         self._objectclasses = [
             'organizationalunit',
         ]
diff --git a/src/lib389/lib389/idm/organization.py b/src/lib389/lib389/idm/organization.py
index e0f0e6bf1..c6a9f61f4 100644
--- a/src/lib389/lib389/idm/organization.py
+++ b/src/lib389/lib389/idm/organization.py
@@ -21,12 +21,10 @@ class Organization(DSLdapObject):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(Organization, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(Organization, self).__init__(instance, dn)
         self._rdn_attribute = RDN
         self._must_attributes = MUST_ATTRIBUTES
         self._create_objectclasses = [
@@ -43,12 +41,10 @@ class Organizations(DSLdapObjects):
     :type instance: lib389.DirSrv
     :param basedn: Base DN for all group entries below
     :type basedn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, basedn, batch=False):
-        super(Organizations, self).__init__(instance, batch)
+    def __init__(self, instance, basedn):
+        super(Organizations, self).__init__(instance)
         self._objectclasses = [
             'organization',
         ]
diff --git a/src/lib389/lib389/idm/posixgroup.py b/src/lib389/lib389/idm/posixgroup.py
index 60a2d5660..a765016ea 100644
--- a/src/lib389/lib389/idm/posixgroup.py
+++ b/src/lib389/lib389/idm/posixgroup.py
@@ -22,12 +22,10 @@ class PosixGroup(DSLdapObject):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(PosixGroup, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(PosixGroup, self).__init__(instance, dn)
         self._rdn_attribute = RDN
         # Can I generate these from schema?
         self._must_attributes = MUST_ATTRIBUTES
@@ -68,12 +66,10 @@ class PosixGroups(DSLdapObjects):
     :type instance: lib389.DirSrv
     :param basedn: Base DN for all group entries below
     :type basedn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, basedn, batch=False, rdn='ou=Groups'):
-        super(PosixGroups, self).__init__(instance, batch)
+    def __init__(self, instance, basedn, rdn='ou=Groups'):
+        super(PosixGroups, self).__init__(instance)
         self._objectclasses = [
             'groupOfNames',
             'posixGroup',
diff --git a/src/lib389/lib389/idm/services.py b/src/lib389/lib389/idm/services.py
index 54b68088c..50d8ed44f 100644
--- a/src/lib389/lib389/idm/services.py
+++ b/src/lib389/lib389/idm/services.py
@@ -20,12 +20,10 @@ class ServiceAccount(DSLdapObject):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(ServiceAccount, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(ServiceAccount, self).__init__(instance, dn)
         self._rdn_attribute = RDN
         self._must_attributes = MUST_ATTRIBUTES
         self._create_objectclasses = [
@@ -42,12 +40,10 @@ class ServiceAccounts(DSLdapObjects):
     :type instance: lib389.DirSrv
     :param basedn: Base DN for all group entries below
     :type basedn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, basedn, batch=False, rdn='ou=Services'):
-        super(ServiceAccounts, self).__init__(instance, batch)
+    def __init__(self, instance, basedn, rdn='ou=Services'):
+        super(ServiceAccounts, self).__init__(instance)
         self._objectclasses = [
             'netscapeServer',
         ]
diff --git a/src/lib389/lib389/idm/user.py b/src/lib389/lib389/idm/user.py
index 10b787ac8..176345cd9 100644
--- a/src/lib389/lib389/idm/user.py
+++ b/src/lib389/lib389/idm/user.py
@@ -38,12 +38,10 @@ class UserAccount(Account):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(UserAccount, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(UserAccount, self).__init__(instance, dn)
         self._rdn_attribute = RDN
         # Can I generate these from schema?
         self._must_attributes = MUST_ATTRIBUTES
@@ -91,12 +89,10 @@ class UserAccounts(DSLdapObjects):
     :type basedn: str
     :param rdn: The DN that will be combined wit basedn
     :type rdn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, basedn, batch=False, rdn='ou=People'):
-        super(UserAccounts, self).__init__(instance, batch)
+    def __init__(self, instance, basedn, rdn='ou=People'):
+        super(UserAccounts, self).__init__(instance)
         self._objectclasses = [
             'account',
             'posixaccount',
diff --git a/src/lib389/lib389/index.py b/src/lib389/lib389/index.py
index cf6636832..7f55d8bc5 100644
--- a/src/lib389/lib389/index.py
+++ b/src/lib389/lib389/index.py
@@ -24,8 +24,8 @@ if MAJOR >= 3 or (MAJOR == 2 and MINOR >= 7):
 DEFAULT_INDEX_DN = "cn=default indexes,%s" % DN_CONFIG_LDBM
 
 class Index(DSLdapObject):
-    def __init__(self, instance, dn=None, batch=False):
-        super(Index, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(Index, self).__init__(instance, dn)
         self._rdn_attribute = 'cn'
         self._must_attributes = ['cn', 'nsSystemIndex', 'nsIndexType']
         self._create_objectclasses = ['top', 'nsIndex']
@@ -33,8 +33,8 @@ class Index(DSLdapObject):
         self._lint_functions = []
 
 class Indexes(DSLdapObjects):
-    def __init__(self, instance, basedn=DEFAULT_INDEX_DN, batch=False):
-        super(Indexes, self).__init__(instance=instance, batch=batch)
+    def __init__(self, instance, basedn=DEFAULT_INDEX_DN):
+        super(Indexes, self).__init__(instance=instance)
         self._objectclasses = ['nsIndex']
         self._filterattrs = ['cn']
         self._childobject = Index
diff --git a/src/lib389/lib389/mappingTree.py b/src/lib389/lib389/mappingTree.py
index a7ef3e86a..a248f02a3 100644
--- a/src/lib389/lib389/mappingTree.py
+++ b/src/lib389/lib389/mappingTree.py
@@ -387,14 +387,12 @@ class MappingTree(DSLdapObject):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
     _must_attributes = ['cn']
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(MappingTree, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(MappingTree, self).__init__(instance, dn)
         self._rdn_attribute = 'cn'
         self._must_attributes = ['cn']
         self._create_objectclasses = ['top', 'extensibleObject', MT_OBJECTCLASS_VALUE]
@@ -420,12 +418,10 @@ class MappingTrees(DSLdapObjects):
 
     :param instance: An instance
     :type instance: lib389.DirSrv
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, batch=False):
-        super(MappingTrees, self).__init__(instance=instance, batch=batch)
+    def __init__(self, instance):
+        super(MappingTrees, self).__init__(instance=instance)
         self._objectclasses = [MT_OBJECTCLASS_VALUE]
         self._filterattrs = ['cn', 'nsslapd-backend' ]
         self._childobject = MappingTree
diff --git a/src/lib389/lib389/monitor.py b/src/lib389/lib389/monitor.py
index 557e04be8..e36d9111e 100644
--- a/src/lib389/lib389/monitor.py
+++ b/src/lib389/lib389/monitor.py
@@ -16,10 +16,9 @@ class Monitor(DSLdapObject):
         :param instance: An instance
         :type instance: lib389.DirSrv
         :param dn: not used
-        :param batch: not used
     """
-    def __init__(self, instance, dn=None, batch=False):
-        super(Monitor, self).__init__(instance=instance, batch=batch)
+    def __init__(self, instance, dn=None):
+        super(Monitor, self).__init__(instance=instance)
         self._dn = DN_MONITOR
 
     def get_connections(self):
@@ -85,8 +84,8 @@ class Monitor(DSLdapObject):
         return (dtablesize, readwaiters, entriessent, bytessent, currenttime, starttime)
 
 class MonitorLDBM(DSLdapObject):
-    def __init__(self, instance, dn=None, batch=False):
-        super(MonitorLDBM, self).__init__(instance=instance, batch=batch)
+    def __init__(self, instance, dn=None):
+        super(MonitorLDBM, self).__init__(instance=instance)
         self._dn = DN_MONITOR_LDBM
         self._backend_keys = [
             'dbcachehits',
@@ -105,8 +104,8 @@ class MonitorBackend(DSLdapObject):
     This is initialised from Backend in backend.py to get the right basedn.
     """
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(MonitorBackend, self).__init__(instance=instance, dn=dn, batch=batch)
+    def __init__(self, instance, dn=None):
+        super(MonitorBackend, self).__init__(instance=instance, dn=dn)
         self._backend_keys = [
             'readonly',
             'entrycachehits',
diff --git a/src/lib389/lib389/plugins.py b/src/lib389/lib389/plugins.py
index d683f21a9..9f86ec938 100644
--- a/src/lib389/lib389/plugins.py
+++ b/src/lib389/lib389/plugins.py
@@ -25,8 +25,8 @@ class Plugin(DSLdapObject):
         'nsslapd-pluginEnabled' : 'off'
     }
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(Plugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(Plugin, self).__init__(instance, dn)
         self._rdn_attribute = 'cn'
         self._must_attributes = [
             'nsslapd-pluginEnabled',
@@ -65,13 +65,13 @@ class Plugin(DSLdapObject):
         return super(Plugin, self).create(rdn, internal_properties, basedn)
 
 class AddnPlugin(Plugin):
-    def __init__(self, instance, dn="cn=addn,cn=plugins,cn=config", batch=False):
-        super(AddnPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=addn,cn=plugins,cn=config"):
+        super(AddnPlugin, self).__init__(instance, dn)
         # Need to add wrappers to add domains to this.
 
 class AttributeUniquenessPlugin(Plugin):
-    def __init__(self, instance, dn="cn=attribute uniqueness,cn=plugins,cn=config", batch=False):
-        super(AttributeUniquenessPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=attribute uniqueness,cn=plugins,cn=config"):
+        super(AttributeUniquenessPlugin, self).__init__(instance, dn)
 
     ## These are some wrappers to the important attributes
     # This plugin will be "tricky" in that it can have "many" instance
@@ -108,12 +108,12 @@ class LdapSSOTokenPlugin(Plugin):
         'nsslapd-pluginDescription' : 'Ldap SSO Token Sasl Mech - draft-wibrown-ldapssotoken',
     }
 
-    def __init__(self, instance, dn="cn=ldapssotoken,cn=plugins,cn=config", batch=False):
-        super(LdapSSOTokenPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=ldapssotoken,cn=plugins,cn=config"):
+        super(LdapSSOTokenPlugin, self).__init__(instance, dn)
 
 class ManagedEntriesPlugin(Plugin):
-    def __init__(self, instance, dn="cn=managed entries,cn=plugins,cn=config", batch=False):
-        super(ManagedEntriesPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=managed entries,cn=plugins,cn=config"):
+        super(ManagedEntriesPlugin, self).__init__(instance, dn)
 
     # This will likely need to be a bit like both the DSLdapObjects AND the object.
     # Because there are potentially many MEP configs.
@@ -135,8 +135,8 @@ class ReferentialIntegrityPlugin(Plugin):
         'nsslapd-pluginDescription' : 'referential integrity plugin',
     }
 
-    def __init__(self, instance, dn="cn=referential integrity postoperation,cn=plugins,cn=config", batch=False):
-        super(ReferentialIntegrityPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=referential integrity postoperation,cn=plugins,cn=config"):
+        super(ReferentialIntegrityPlugin, self).__init__(instance, dn)
         self._create_objectclasses.extend(['extensibleObject'])
         self._must_attributes.extend([
             'referint-update-delay',
@@ -226,28 +226,28 @@ class ReferentialIntegrityPlugin(Plugin):
         self.remove_all('nsslapd-plugincontainerscope')
 
 class SyntaxValidationPlugin(Plugin):
-    def __init__(self, instance, dn="cn=Syntax Validation Task,cn=plugins,cn=config", batch=False):
-        super(SyntaxValidationPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Syntax Validation Task,cn=plugins,cn=config"):
+        super(SyntaxValidationPlugin, self).__init__(instance, dn)
 
 class SchemaReloadPlugin(Plugin):
-    def __init__(self, instance, dn="cn=Schema Reload,cn=plugins,cn=config", batch=False):
-        super(SchemaReloadPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Schema Reload,cn=plugins,cn=config"):
+        super(SchemaReloadPlugin, self).__init__(instance, dn)
 
 class StateChangePlugin(Plugin):
-    def __init__(self, instance, dn="cn=State Change Plugin,cn=plugins,cn=config", batch=False):
-        super(StateChangePlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=State Change Plugin,cn=plugins,cn=config"):
+        super(StateChangePlugin, self).__init__(instance, dn)
 
 class ACLPlugin(Plugin):
-    def __init__(self, instance, dn="cn=ACL Plugin,cn=plugins,cn=config", batch=False):
-        super(ACLPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=ACL Plugin,cn=plugins,cn=config"):
+        super(ACLPlugin, self).__init__(instance, dn)
 
 class ACLPreoperationPlugin(Plugin):
-    def __init__(self, instance, dn="cn=ACL preoperation,cn=plugins,cn=config", batch=False):
-        super(ACLPreoperationPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=ACL preoperation,cn=plugins,cn=config"):
+        super(ACLPreoperationPlugin, self).__init__(instance, dn)
 
 class RolesPlugin(Plugin):
-    def __init__(self, instance, dn="cn=Roles Plugin,cn=plugins,cn=config", batch=False):
-        super(RolesPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Roles Plugin,cn=plugins,cn=config"):
+        super(RolesPlugin, self).__init__(instance, dn)
 
 class MemberOfPlugin(Plugin):
     _plugin_properties = {
@@ -265,8 +265,8 @@ class MemberOfPlugin(Plugin):
         'memberOfAttr' : 'memberOf',
     }
 
-    def __init__(self, instance, dn="cn=MemberOf Plugin,cn=plugins,cn=config", batch=False):
-        super(MemberOfPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=MemberOf Plugin,cn=plugins,cn=config"):
+        super(MemberOfPlugin, self).__init__(instance, dn)
         self._create_objectclasses.extend(['extensibleObject'])
         self._must_attributes.extend(['memberOfGroupAttr', 'memberOfAttr'])
 
@@ -367,48 +367,48 @@ class MemberOfPlugin(Plugin):
         return task
 
 class RetroChangelogPlugin(Plugin):
-    def __init__(self, instance, dn="cn=Retro Changelog Plugin,cn=plugins,cn=config", batch=False):
-        super(RetroChangelogPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Retro Changelog Plugin,cn=plugins,cn=config"):
+        super(RetroChangelogPlugin, self).__init__(instance, dn)
 
 class ClassOfServicePlugin(Plugin):
-    def __init__(self, instance, dn="cn=Class of Service,cn=plugins,cn=config", batch=False):
-        super(ClassOfServicePlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Class of Service,cn=plugins,cn=config"):
+        super(ClassOfServicePlugin, self).__init__(instance, dn)
 
 class ViewsPlugin(Plugin):
-    def __init__(self, instance, dn="cn=Views,cn=plugins,cn=config", batch=False):
-        super(ViewsPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Views,cn=plugins,cn=config"):
+        super(ViewsPlugin, self).__init__(instance, dn)
 
 class SevenBitCheckPlugin(Plugin):
-    def __init__(self, instance, dn="cn=7-bit check,cn=plugins,cn=config", batch=False):
-        super(SevenBitCheckPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=7-bit check,cn=plugins,cn=config"):
+        super(SevenBitCheckPlugin, self).__init__(instance, dn)
 
 class AccountUsabilityPlugin(Plugin):
-    def __init__(self, instance, dn="cn=Account Usability Plugin,cn=plugins,cn=config", batch=False):
-        super(AccountUsabilityPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Account Usability Plugin,cn=plugins,cn=config"):
+        super(AccountUsabilityPlugin, self).__init__(instance, dn)
 
 class AutoMembershipPlugin(Plugin):
-    def __init__(self, instance, dn="cn=Auto Membership Plugin,cn=plugins,cn=config", batch=False):
-        super(AutoMembershipPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Auto Membership Plugin,cn=plugins,cn=config"):
+        super(AutoMembershipPlugin, self).__init__(instance, dn)
 
 class ContentSynchronizationPlugin(Plugin):
-    def __init__(self, instance, dn="cn=Content Synchronization,cn=plugins,cn=config", batch=False):
-        super(ContentSynchronizationPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Content Synchronization,cn=plugins,cn=config"):
+        super(ContentSynchronizationPlugin, self).__init__(instance, dn)
 
 class DereferencePlugin(Plugin):
-    def __init__(self, instance, dn="cn=deref,cn=plugins,cn=config", batch=False):
-        super(DereferencePlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=deref,cn=plugins,cn=config"):
+        super(DereferencePlugin, self).__init__(instance, dn)
 
 class HTTPClientPlugin(Plugin):
-    def __init__(self, instance, dn="cn=HTTP Client,cn=plugins,cn=config", batch=False):
-        super(HTTPClientPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=HTTP Client,cn=plugins,cn=config"):
+        super(HTTPClientPlugin, self).__init__(instance, dn)
 
 class LinkedAttributesPlugin(Plugin):
-    def __init__(self, instance, dn="cn=Linked Attributes,cn=plugins,cn=config", batch=False):
-        super(LinkedAttributesPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Linked Attributes,cn=plugins,cn=config"):
+        super(LinkedAttributesPlugin, self).__init__(instance, dn)
 
 class PassThroughAuthenticationPlugin(Plugin):
-    def __init__(self, instance, dn="cn=Pass Through Authentication,cn=plugins,cn=config", batch=False):
-        super(PassThroughAuthenticationPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Pass Through Authentication,cn=plugins,cn=config"):
+        super(PassThroughAuthenticationPlugin, self).__init__(instance, dn)
 
 class USNPlugin(Plugin):
     _plugin_properties = {
@@ -425,8 +425,8 @@ class USNPlugin(Plugin):
         'nsslapd-pluginDescription': 'USN (Update Sequence Number) plugin',
     }
 
-    def __init__(self, instance, dn="cn=USN,cn=plugins,cn=config", batch=False):
-        super(USNPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=USN,cn=plugins,cn=config"):
+        super(USNPlugin, self).__init__(instance, dn)
         self._create_objectclasses.extend(['extensibleObject'])
 
     def is_global_mode_set(self):
@@ -468,8 +468,8 @@ class WhoamiPlugin(Plugin):
         'nsslapd-pluginDescription' : 'Provides whoami extended operation',
     }
 
-    def __init__(self, instance, dn="cn=whoami,cn=plugins,cn=config", batch=False):
-        super(WhoamiPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=whoami,cn=plugins,cn=config"):
+        super(WhoamiPlugin, self).__init__(instance, dn)
 
 class RootDNAccessControlPlugin(Plugin):
     _plugin_properties = {
@@ -485,8 +485,8 @@ class RootDNAccessControlPlugin(Plugin):
         'nsslapd-pluginDescription' : 'RootDN Access Control plugin',
     }
 
-    def __init__(self, instance, dn="cn=RootDN Access Control,cn=plugins,cn=config", batch=False):
-        super(RootDNAccessControlPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=RootDN Access Control,cn=plugins,cn=config"):
+        super(RootDNAccessControlPlugin, self).__init__(instance, dn)
         self._create_objectclasses.extend(['rootDNPluginConfig'])
 
     def get_open_time(self):
@@ -647,24 +647,24 @@ class RootDNAccessControlPlugin(Plugin):
 
 
 class LDBMBackendPlugin(Plugin):
-    def __init__(self, instance, dn="cn=ldbm database,cn=plugins,cn=config", batch=False):
-        super(LDBMBackendPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=ldbm database,cn=plugins,cn=config"):
+        super(LDBMBackendPlugin, self).__init__(instance, dn)
 
 class ChainingBackendPlugin(Plugin):
-    def __init__(self, instance, dn="cn=chaining database,cn=plugins,cn=config", batch=False):
-        super(ChainingBackendPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=chaining database,cn=plugins,cn=config"):
+        super(ChainingBackendPlugin, self).__init__(instance, dn)
 
 class AccountPolicyPlugin(Plugin):
-    def __init__(self, instance, dn="cn=Account Policy Plugin,cn=plugins,cn=config", batch=False):
-        super(AccountPolicyPlugin, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn="cn=Account Policy Plugin,cn=plugins,cn=config"):
+        super(AccountPolicyPlugin, self).__init__(instance, dn)
 
 class Plugins(DSLdapObjects):
 
     # This is a map of plugin to type, so when we
     # do a get / list / create etc, we can map to the correct
     # instance.
-    def __init__(self, instance, batch=False):
-        super(Plugins, self).__init__(instance=instance, batch=batch)
+    def __init__(self, instance):
+        super(Plugins, self).__init__(instance=instance)
         self._objectclasses = ['top', 'nsslapdplugin']
         self._filterattrs = ['cn', 'nsslapd-pluginPath']
         self._childobject = Plugin
@@ -684,7 +684,7 @@ class Plugins(DSLdapObjects):
     def _entry_to_instance(self, dn=None, entry=None):
         # If dn in self._pluginmap
         if entry['nsslapd-pluginPath'] in self._pluginmap:
-            return self._pluginmap[entry['nsslapd-pluginPath']](self._instance, dn=dn, batch=self._batch)
+            return self._pluginmap[entry['nsslapd-pluginPath']](self._instance, dn=dn)
         else:
             return super(Plugins, self)._entry_to_instance(dn)
 
diff --git a/src/lib389/lib389/referral.py b/src/lib389/lib389/referral.py
index e4500cb29..93487cd2f 100644
--- a/src/lib389/lib389/referral.py
+++ b/src/lib389/lib389/referral.py
@@ -12,8 +12,8 @@ from lib389._mapped_object import DSLdapObjects, DSLdapObject
 
 
 class Referral(DSLdapObject):
-    def __init__(self, instance, dn=None, batch=False):
-        super(Referral, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(Referral, self).__init__(instance, dn)
         self._rdn_attribute = "cn"
         self._must_attributes = ["ref"]
         self._create_objectclasses = ['referral', 'nsContainer']
@@ -23,8 +23,8 @@ class Referral(DSLdapObject):
         self._client_controls = None
 
 class Referrals(DSLdapObjects):
-    def __init__(self, instance, basedn, batch=False):
-        super(Referrals, self).__init__(instance, batch)
+    def __init__(self, instance, basedn):
+        super(Referrals, self).__init__(instance)
         self._objectclasses = ['referral']
         self._filterattrs = 'cn'
         self._childobject = Referral
diff --git a/src/lib389/lib389/replica.py b/src/lib389/lib389/replica.py
index 48b879f2b..429d58365 100644
--- a/src/lib389/lib389/replica.py
+++ b/src/lib389/lib389/replica.py
@@ -802,12 +802,10 @@ class Replica(DSLdapObject):
     :type instance: lib389.DirSrv
     :param dn: Entry DN
     :type dn: str
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, dn=None, batch=False):
-        super(Replica, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(Replica, self).__init__(instance, dn)
         self._rdn_attribute = 'cn'
         self._must_attributes = ['cn', REPL_TYPE,
                                  REPL_ROOT, REPL_BINDDN, REPL_ID]
@@ -1212,12 +1210,10 @@ class Replicas(DSLdapObjects):
 
     :param instance: A instance
     :type instance: lib389.DirSrv
-    :param batch: Not implemented
-    :type batch: bool
     """
 
-    def __init__(self, instance, batch=False):
-        super(Replicas, self).__init__(instance=instance, batch=False)
+    def __init__(self, instance):
+        super(Replicas, self).__init__(instance=instance)
         self._objectclasses = [REPLICA_OBJECTCLASS_VALUE]
         self._filterattrs = [REPL_ROOT]
         self._childobject = Replica
diff --git a/src/lib389/lib389/rootdse.py b/src/lib389/lib389/rootdse.py
index efd299f64..d0a2e9d13 100644
--- a/src/lib389/lib389/rootdse.py
+++ b/src/lib389/lib389/rootdse.py
@@ -16,9 +16,9 @@ class RootDSE(DSLdapObject):
     """
     Check if the directory supports features or not.
     """
-    def __init__(self, conn, batch=False):
+    def __init__(self, conn):
         """@param conn - a DirSrv instance """
-        super(RootDSE, self).__init__(instance=conn, batch=batch)
+        super(RootDSE, self).__init__(instance=conn)
         self._dn = ""
 
     def supported_sasl(self):
diff --git a/src/lib389/lib389/schema.py b/src/lib389/lib389/schema.py
index 600309323..fe2f3931d 100755
--- a/src/lib389/lib389/schema.py
+++ b/src/lib389/lib389/schema.py
@@ -22,8 +22,8 @@ from lib389.tasks import SchemaReloadTask
 
 
 class Schema(DSLdapObject):
-    def __init__(self, instance, batch=False):
-        super(Schema, self).__init__(instance=instance, batch=batch)
+    def __init__(self, instance):
+        super(Schema, self).__init__(instance=instance)
         self._dn = DN_SCHEMA
         self._rdn_attribute = 'cn'
 
diff --git a/src/lib389/lib389/tasks.py b/src/lib389/lib389/tasks.py
index 44b191fca..adb3cecba 100644
--- a/src/lib389/lib389/tasks.py
+++ b/src/lib389/lib389/tasks.py
@@ -27,8 +27,8 @@ from lib389.properties import (
 
 
 class Task(DSLdapObject):
-    def __init__(self, instance, dn=None, batch=False):
-        super(Task, self).__init__(instance, dn, batch)
+    def __init__(self, instance, dn=None):
+        super(Task, self).__init__(instance, dn)
         self._rdn_attribute = 'cn'
         self._must_attributes = ['cn']
         self._create_objectclasses = ['top', 'extensibleObject']
@@ -69,20 +69,20 @@ class Task(DSLdapObject):
 
 
 class MemberOfFixupTask(Task):
-    def __init__(self, instance, dn=None, batch=False):
+    def __init__(self, instance, dn=None):
         self.cn = 'memberOf_fixup_' + Task._get_task_date()
         dn = "cn=" + self.cn + "," + DN_MBO_TASK
 
-        super(MemberOfFixupTask, self).__init__(instance, dn, batch)
+        super(MemberOfFixupTask, self).__init__(instance, dn)
         self._must_attributes.extend(['basedn'])
 
 
 class USNTombstoneCleanupTask(Task):
-    def __init__(self, instance, dn=None, batch=False):
+    def __init__(self, instance, dn=None):
         self.cn = 'usn_cleanup_' + Task._get_task_date()
         dn = "cn=" + self.cn + ",cn=USN tombstone cleanup task," + DN_TASKS
 
-        super(USNTombstoneCleanupTask, self).__init__(instance, dn, batch)
+        super(USNTombstoneCleanupTask, self).__init__(instance, dn)
 
     def _validate(self, rdn, properties, basedn):
         if not 'suffix' in properties and not 'backend' in properties:
@@ -91,11 +91,11 @@ class USNTombstoneCleanupTask(Task):
         return super(USNTombstoneCleanupTask, self)._validate(rdn, properties, basedn)
 
 class SchemaReloadTask(Task):
-    def __init__(self, instance, dn=None, batch=False):
+    def __init__(self, instance, dn=None):
         self.cn = 'schema_reload_' + Task._get_task_date()
         dn = "cn=" + self.cn + ",cn=schema reload task," + DN_TASKS
 
-        super(SchemaReloadTask, self).__init__(instance, dn, batch)
+        super(SchemaReloadTask, self).__init__(instance, dn)
 
 class Tasks(object):
     proxied_methods = 'search_s getEntry'.split()
-- 
2.13.5

