def test_delete_segment_allocation_range_deletes(self):
        sa_range = self._create_segment_allocation_range()
        sa_range_id = sa_range["id"]

        sa_ranges_api.delete_segment_allocation_range(self.context, sa_range_id)

        # assert that the range and it's unused allocations are deleted
        sa_range = db_api.segment_allocation_range_find(self.context, id=sa_range_id, scope=db_api.ALL)
        allocs = db_api.segment_allocation_find(self.context, segment_allocation_range_id=sa_range_id).all()
        self.assertEqual(sa_range, [])
        self.assertEqual(allocs, [])
Exemplo n.º 2
0
    def test_delete_segment_allocation_range_deletes(self):
        sa_range = self._create_segment_allocation_range()
        sa_range_id = sa_range["id"]

        sa_ranges_api.delete_segment_allocation_range(self.context,
                                                      sa_range_id)

        # assert that the range and it's unused allocations are deleted
        sa_range = db_api.segment_allocation_range_find(self.context,
                                                        id=sa_range_id,
                                                        scope=db_api.ALL)
        allocs = db_api.segment_allocation_find(
            self.context, segment_allocation_range_id=sa_range_id).all()
        self.assertEqual(sa_range, [])
        self.assertEqual(allocs, [])
Exemplo n.º 3
0
 def delete_segment_allocation_range(self, context, id):
     segment_allocation_ranges.delete_segment_allocation_range(
         context, id)
Exemplo n.º 4
0
 def delete_segment_allocation_range(self, context, id):
     segment_allocation_ranges.delete_segment_allocation_range(context, id)