Exemple #1
0
    def teardown_class(self):
        """Teardown class parameters"""

        # cleanup tilebucket
        for z_index in (self.z_tile, settings.SUPER_CUBOID_SIZE[2], 1):
            tile_key = self.tile_bucket.encodeObjectKey(
                nd_proj.channel_name,
                nd_proj.resolution,
                self.x_tile,
                self.y_tile,
                z_index,
            )
            self.tile_bucket.deleteObject(tile_key)

        morton_index = XYZMorton(self.tiles)
        supercuboid_key = self.cuboid_bucket.generateSupercuboidKey(
            nd_proj.channel_name, nd_proj.resolution, self.tiles)
        self.cuboid_bucket.deleteObject(supercuboid_key)
        # delete created entities
        TileIndexDB.deleteTable(endpoint_url="http://localhost:8000")
        CuboidIndexDB.deleteTable(endpoint_url="http://localhost:8000")
        IngestQueue.deleteQueue(nd_proj, endpoint_url="http://localhost:4568")
        CleanupQueue.deleteQueue(nd_proj, endpoint_url="http://localhost:4568")
        TileBucket.deleteBucket(endpoint_url="http://localhost:4567")
        try:
            CuboidBucket.deleteBucket(endpoint_url="http://localhost:4567")
        except Exception as e:
            pass
Exemple #2
0
  def teardown_class(cls):
    """Teardown Parameters"""

    # Ensure bucket empty before deleting.
    for objs in cls.tile_bucket.getAllObjects():
      cls.tile_bucket.deleteObject(objs.key)

    TileBucket.deleteBucket(endpoint_url=cls.endpoint_url)
Exemple #3
0
def tile_bucket(s3, iam):
    from ndingest.ndbucket.tilebucket import TileBucket

    TileBucket.createBucket()
    yield TileBucket(nd_proj.project_name)
    TileBucket.deleteBucket()
Exemple #4
0
 def tearDownClass(cls):
     TileBucket.deleteBucket()