Exemplo n.º 1
0
    def delobj(self, objname):
        logging.info('meta delobj: obj %s', objname)
        key = obj_key(objname)
        self.delete(key)

        return True
Exemplo n.º 2
0
 def getobj(self, objname):
     logging.info('meta getobj: obj %s', objname)
     key = obj_key(objname)
     return self.get(key)
Exemplo n.º 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
Exemplo n.º 4
0
 def hasobj(self, objname):
     logging.info('meta hasobj: obj %s', objname)
     return self.exists(obj_key(objname))
Exemplo n.º 5
0
 def getobj(self, objname):
     logging.info('meta getobj: obj %s', objname)
     key = obj_key(objname)
     return self.get(key)
Exemplo n.º 6
0
    def delobj(self, objname):
        logging.info('meta delobj: obj %s', objname)
        key = obj_key(objname)
        self.delete(key)

        return True
Exemplo n.º 7
0
 def hasobj(self, objname):
     logging.info('meta hasobj: obj %s', objname)
     return self.exists(obj_key(objname))
Exemplo n.º 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
Exemplo n.º 9
0
def test_obj_key():
    objname = '/test_obj0'
    key = obj_key(objname)
    eq_(key, 'obj:/test_obj0')