def delobj(self, objname): logging.info('meta delobj: obj %s', objname) key = obj_key(objname) self.delete(key) return True
def getobj(self, objname): logging.info('meta getobj: obj %s', objname) key = obj_key(objname) return self.get(key)
def addobj(self, objname, objinfo): logging.info('meta addobj objname %s', objname) key = obj_key(objname) ret = self.set(key, objinfo) return ret
def hasobj(self, objname): logging.info('meta hasobj: obj %s', objname) return self.exists(obj_key(objname))
def test_obj_key(): objname = '/test_obj0' key = obj_key(objname) eq_(key, 'obj:/test_obj0')