def repl_member_add(self, params):
        """create new mongod instances and add it to the replica set.
        Args:
            params - mongod params
        return True if operation success otherwise False
        """
        repl_config = self.config
        member_id = max([member['_id'] for member in repl_config['members']]) + 1
        member_config = self.member_create(params, member_id)
        repl_config['members'].append(member_config)
        if not self.repl_update(repl_config):
            self.member_del(member_id, reconfig=True)
            raise ReplicaSetError("Could not add member to ReplicaSet.")
        return member_id
def repl_member_add ( self , params ) : repl_config = self . config member_id = max ( [ member [ '_id' ] for member in repl_config [ 'members' ] ] ) + 1 member_config = self . member_create ( params , member_id ) repl_config [ 'members' ] . append ( member_config ) if not self . repl_update ( repl_config ) : self . member_del ( member_id , reconfig = True ) raise ReplicaSetError ( "Could not add member to ReplicaSet." ) return member_id
create new mongod instances and add it to the replica set.
        Args:
            params - mongod params
        return True if operation success otherwise False