Ejemplo n.º 1
0
 def topic(self):
   config = Config(RIAK_STORAGE_BASEURL=self.parent.baseurl)
   storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
   storage.put(IMAGE_URL % '9', IMAGE_BYTES)
   created = storage.exists(IMAGE_URL % '9')
   storage.remove(IMAGE_URL % '9')
   return storage.exists(IMAGE_URL % '9') != created
Ejemplo n.º 2
0
 def topic(self):
   config = Config(RIAK_STORAGE_BASEURL=self.parent.baseurl)
   storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
   storage.put(IMAGE_URL % '2', IMAGE_BYTES)
   return storage.get(IMAGE_URL % '2')
Ejemplo n.º 3
0
 def topic(self):
   config = Config(RIAK_STORAGE_BASEURL=self.parent.baseurl)
   storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
   return (storage.put(PNG_URL % '1', PNG_BYTES) , self.parent.client.fetch(self.parent.baseurl + "/images/" + urllib.quote_plus(PNG_URL % '1')))
Ejemplo n.º 4
0
 def topic(self):
   config = Config(RIAK_STORAGE_BASEURL=self.parent.baseurl)
   storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
   storage.put(IMAGE_URL % '7', IMAGE_BYTES)
   storage.put_detector_data(IMAGE_URL % '7', [{'origin': 'detection', 'height': 43, 'width': 43, 'y': 197, 'x': 276, 'z': 1849}])
   return storage.get_detector_data(IMAGE_URL % '7')
Ejemplo n.º 5
0
 def topic(self):
   config = Config(RIAK_STORAGE_BASEURL=self.parent.baseurl, SECURITY_KEY='ACME-SEC', STORES_CRYPTO_KEY_FOR_EACH_IMAGE=True)
   storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
   storage.put(IMAGE_URL % '6', IMAGE_BYTES)
   storage.put_crypto(IMAGE_URL % '6')
   return storage.get_crypto(IMAGE_URL % '6')
Ejemplo n.º 6
0
 def topic(self):
   config = Config(RIAK_STORAGE_BASEURL=self.parent.baseurl+'/TOTO')
   storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
   return storage.put(IMAGE_URL % '9999','TOTO')