Пример #1
0
    def delobj(self, objname):
        logging.info('meta delobj: obj %s', objname)
        key = obj_key(objname)
        self.delete(key)

        return True
Пример #2
0
 def getobj(self, objname):
     logging.info('meta getobj: obj %s', objname)
     key = obj_key(objname)
     return self.get(key)
Пример #3
0
    def addobj(self, objname, objinfo):
        logging.info('meta addobj objname %s', objname)

        key = obj_key(objname)
        ret = self.set(key, objinfo)
        return ret
Пример #4
0
 def hasobj(self, objname):
     logging.info('meta hasobj: obj %s', objname)
     return self.exists(obj_key(objname))
Пример #5
0
 def getobj(self, objname):
     logging.info('meta getobj: obj %s', objname)
     key = obj_key(objname)
     return self.get(key)
Пример #6
0
    def delobj(self, objname):
        logging.info('meta delobj: obj %s', objname)
        key = obj_key(objname)
        self.delete(key)

        return True
Пример #7
0
 def hasobj(self, objname):
     logging.info('meta hasobj: obj %s', objname)
     return self.exists(obj_key(objname))
Пример #8
0
    def addobj(self, objname, objinfo):
        logging.info('meta addobj objname %s', objname)

        key = obj_key(objname)
        ret = self.set(key, objinfo)
        return ret
Пример #9
0
def test_obj_key():
    objname = '/test_obj0'
    key = obj_key(objname)
    eq_(key, 'obj:/test_obj0')