Remove dead code
Far as I can tell, this has no users outside of a unit test and can therefore be removed. Change-Id: I844959d2a6cf956cb59a78fddbec5301fb9fdc4b Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
c6a23a3037
commit
5d0daffaa1
@ -309,13 +309,6 @@ class ProviderSummary(object):
|
||||
self.resources = resources or []
|
||||
self.traits = traits or []
|
||||
|
||||
@property
|
||||
def resource_class_names(self):
|
||||
"""Helper property that returns a set() of resource class string names
|
||||
that are included in the provider summary.
|
||||
"""
|
||||
return set(res.resource_class for res in self.resources)
|
||||
|
||||
|
||||
class ProviderSummaryResource(object):
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import os_resource_classes as orc
|
||||
|
||||
from placement.objects import allocation_candidate
|
||||
from placement.tests.unit.objects import base
|
||||
@ -46,16 +45,3 @@ class TestAllocationCandidatesNoDB(base.TestCase):
|
||||
self.context, aro_in, sum_in, 2)
|
||||
self.assertEqual(aro_in[:2], aro)
|
||||
self.assertEqual(set([sum1, sum0, sum4, sum8, sum5]), set(sum))
|
||||
|
||||
|
||||
class TestProviderSummaryNoDB(base.TestCase):
|
||||
|
||||
def test_resource_class_names(self):
|
||||
psum = allocation_candidate.ProviderSummary(mock.sentinel.ctx)
|
||||
disk_psr = allocation_candidate.ProviderSummaryResource(
|
||||
resource_class=orc.DISK_GB, capacity=100, used=0)
|
||||
ram_psr = allocation_candidate.ProviderSummaryResource(
|
||||
resource_class=orc.MEMORY_MB, capacity=1024, used=0)
|
||||
psum.resources = [disk_psr, ram_psr]
|
||||
expected = set(['DISK_GB', 'MEMORY_MB'])
|
||||
self.assertEqual(expected, psum.resource_class_names)
|
||||
|
Loading…
Reference in New Issue
Block a user