diff --git a/synapse/cryotank.py b/synapse/cryotank.py index b3b09cc5..d98e3a76 100644 --- a/synapse/cryotank.py +++ b/synapse/cryotank.py @@ -233,7 +233,7 @@ def handlers(self): CryoCell message handlers. ''' return { - 'cryo:new': self._onCryoNew, + 'cryo:init': self._onCryoInit, 'cryo:list': self._onCryoList, 'cryo:last': self._onCryoLast, 'cryo:puts': self._onCryoPuts, @@ -367,7 +367,7 @@ def _onCryoPuts(self, chan, mesg): tank.puts(items) @s_glob.inpool - def _onCryoNew(self, chan, mesg): + def _onCryoInit(self, chan, mesg): name = mesg[1].get('name') conf = mesg[1].get('conf') @@ -516,7 +516,7 @@ def metrics(self, name, offs, size, timeout=None): mesg = ('cryo:metrics', {'name': name, 'offs': offs, 'size': size}) return self._cryo_sess.call(mesg, timeout=timeout) - def new(self, name, conf=None, timeout=None): + def init(self, name, conf=None, timeout=None): ''' Create a new named Cryotank. @@ -529,5 +529,5 @@ def new(self, name, conf=None, timeout=None): True if the tank was created, False if the tank existed or there was an error during CryoTank creation. ''' - mesg = ('cryo:new', {'name': name, 'conf': conf}) + mesg = ('cryo:init', {'name': name, 'conf': conf}) return self._cryo_sess.call(mesg, timeout=timeout) diff --git a/synapse/tests/test_cryotank.py b/synapse/tests/test_cryotank.py index b71318b6..7f511f1b 100644 --- a/synapse/tests/test_cryotank.py +++ b/synapse/tests/test_cryotank.py @@ -152,10 +152,10 @@ def test_cryo_cell(self): self.len(1, (user.metrics('woot:hehe', 0, 100))) # We can initialize a new tank directly with a custom map size - self.true(user.new('weee:imthebest', {'mapsize': 5558675309})) - self.false(user.new('woot:hehe')) + self.true(user.init('weee:imthebest', {'mapsize': 5558675309})) + self.false(user.init('woot:hehe')) with self.getLoggerStream('synapse.cryotank') as stream: - self.false(user.new('weee:danktank', {'newp': 'hehe'})) + self.false(user.init('weee:danktank', {'newp': 'hehe'})) stream.seek(0) mesgs = stream.read() self.isin('Error making CryoTank', mesgs)