Commit 43a61e4d authored by Julien Muchembled's avatar Julien Muchembled

client: remove obsolete 'connector' config option

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2770 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent c2414bad
...@@ -56,7 +56,7 @@ class Storage(BaseStorage.BaseStorage, ...@@ -56,7 +56,7 @@ class Storage(BaseStorage.BaseStorage,
ZODB.interfaces.IMVCCStorage, ZODB.interfaces.IMVCCStorage,
))) )))
def __init__(self, master_nodes, name, connector=None, read_only=False, def __init__(self, master_nodes, name, read_only=False,
compress=None, logfile=None, verbose=False, _app=None, **kw): compress=None, logfile=None, verbose=False, _app=None, **kw):
""" """
Do not pass those parameters (used internally): Do not pass those parameters (used internally):
...@@ -70,13 +70,11 @@ class Storage(BaseStorage.BaseStorage, ...@@ -70,13 +70,11 @@ class Storage(BaseStorage.BaseStorage,
# Warning: _is_read_only is used in BaseStorage, do not rename it. # Warning: _is_read_only is used in BaseStorage, do not rename it.
self._is_read_only = read_only self._is_read_only = read_only
if _app is None: if _app is None:
_app = Application(master_nodes, name, connector, _app = Application(master_nodes, name, compress=compress)
compress=compress)
self.app = _app self.app = _app
# Used to clone self (see new_instance & IMVCCStorage definition). # Used to clone self (see new_instance & IMVCCStorage definition).
self._init_args = (master_nodes, name) self._init_args = (master_nodes, name)
self._init_kw = { self._init_kw = {
'connector': connector,
'read_only': read_only, 'read_only': read_only,
'compress': compress, 'compress': compress,
'logfile': logfile, 'logfile': logfile,
......
...@@ -66,8 +66,7 @@ else: ...@@ -66,8 +66,7 @@ else:
class Application(object): class Application(object):
"""The client node application.""" """The client node application."""
def __init__(self, master_nodes, name, connector=None, compress=True, def __init__(self, master_nodes, name, compress=True, **kw):
**kw):
# Start polling thread # Start polling thread
self.em = EventManager() self.em = EventManager()
self.poll_thread = ThreadedPoll(self.em, name=name) self.poll_thread = ThreadedPoll(self.em, name=name)
......
...@@ -14,11 +14,6 @@ ...@@ -14,11 +14,6 @@
Give the name of the cluster Give the name of the cluster
</description> </description>
</key> </key>
<key name="connector">
<description>
Give the name of the connector used at low-level
</description>
</key>
<key name="compress" datatype="boolean"> <key name="compress" datatype="boolean">
<description> <description>
If true, enable automatic data compression (compression is only used If true, enable automatic data compression (compression is only used
......
...@@ -35,7 +35,7 @@ import neo.scripts ...@@ -35,7 +35,7 @@ import neo.scripts
from neo.neoctl.neoctl import NeoCTL, NotReadyException from neo.neoctl.neoctl import NeoCTL, NotReadyException
from neo.lib import setupLog from neo.lib import setupLog
from neo.lib.protocol import ClusterStates, NodeTypes, CellStates, NodeStates from neo.lib.protocol import ClusterStates, NodeTypes, CellStates, NodeStates
from neo.lib.util import dump, SOCKET_CONNECTORS_DICT from neo.lib.util import dump
from neo.tests import DB_ADMIN, DB_PASSWD, NeoTestBase, buildUrlFromString, \ from neo.tests import DB_ADMIN, DB_PASSWD, NeoTestBase, buildUrlFromString, \
ADDRESS_TYPE, IP_VERSION_FORMAT_DICT, getTempDirectory ADDRESS_TYPE, IP_VERSION_FORMAT_DICT, getTempDirectory
from neo.tests.cluster import SocketLock from neo.tests.cluster import SocketLock
...@@ -419,16 +419,14 @@ class NEOCluster(object): ...@@ -419,16 +419,14 @@ class NEOCluster(object):
def getNEOCTL(self): def getNEOCTL(self):
return self.neoctl return self.neoctl
def getZODBStorage(self,connector = SOCKET_CONNECTORS_DICT[ADDRESS_TYPE], **kw): def getZODBStorage(self, **kw):
master_nodes = self.master_nodes.replace('/', ' ') master_nodes = self.master_nodes.replace('/', ' ')
result = Storage( result = Storage(
master_nodes=master_nodes, master_nodes=master_nodes,
name=self.cluster_name, name=self.cluster_name,
connector=connector,
logfile=os.path.join(self.temp_dir, 'client.log'), logfile=os.path.join(self.temp_dir, 'client.log'),
verbose=self.verbose, verbose=self.verbose,
**kw **kw)
)
self.zodb_storage_list.append(result) self.zodb_storage_list.append(result)
return result return result
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest import unittest
from mock import Mock from mock import Mock
from time import time
from neo.tests import NeoUnitTestBase from neo.tests import NeoUnitTestBase
from neo.lib.epoll import Epoll from neo.lib.epoll import Epoll
from neo.lib.event import EpollEventManager from neo.lib.event import EpollEventManager
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment