Add PCPU standard resource class

This patch adds a new standard resource class: PCPU

Partially Implements: blueprint cpu-resources
Change-Id: I7bf9ffaea7653870b3926a36d07771fc5016d74d
This commit is contained in:
bhagyashris 2019-01-18 13:15:47 +09:00
parent bffafeab58
commit b0c27a7d62
2 changed files with 6 additions and 2 deletions

View File

@ -59,6 +59,10 @@ STANDARDS = [
# Standard resource class for network bandwidth ingress measured in
# kilobits per second.
'NET_BW_IGR_KILOBIT_PER_SEC',
# Resource class representing an amount of dedicated CPUs for a single
# guest. A dedicated CPU is a physical processor that has been marked
# to be used for a single guest only
'PCPU',
]
# Namespace used for custom resource classes

View File

@ -44,7 +44,7 @@ class TestOs_resource_classes(base.TestCase):
of the STANDARDS list, otherwise database ids will get confused
in the placement service.
"""
expected_last_class = rc.NET_BW_IGR_KILOBIT_PER_SEC
expected_length = 14
expected_last_class = rc.PCPU
expected_length = 15
self.assertEqual(expected_last_class, rc.STANDARDS[-1])
self.assertEqual(expected_length, len(rc.STANDARDS))