def delchk(self, chkname): logging.info('meta delchk: chk %s', chkname) key = chk_key(chkname) self.delete(key) return True
def getchk(self, chkname): logging.info('meta getchk: chk %s', chkname) key = chk_key(chkname) return self.get(key)
def addchk(self, chkname, chkinfo): logging.info('meta addchk chkname %s', chkname) key = chk_key(chkname) ret = self.set(key, chkinfo) return ret
def haschk(self, chkname): logging.info('meta haschk: chk %s', chkname) return self.exists(chk_key(chkname))
def test_chk_key(): chkname = '/test_ob0_chk0' key = chk_key(chkname) eq_(key, 'chk:' + chkname)