Propose FPGA and PGPU resource classes

These will usually be inventoried by Cyborg.

Change-Id: Ic6603aa62ed17c3e916cf7c98016cabb3c01b1f6
blueprint: nova-cyborg-interaction
This commit is contained in:
Eric Fried 2019-05-06 17:32:01 -05:00
parent e9798a1842
commit c547287d75
2 changed files with 6 additions and 2 deletions

View File

@ -68,6 +68,10 @@ STANDARDS = [
# host with memory encrypted at the hardware level. See
# http://specs.openstack.org/openstack/nova-specs/specs/train/approved/amd-sev-libvirt-support.html
'MEM_ENCRYPTION_CONTEXT',
# An accelerator (the "VF" that can be attached to the guest) from an FPGA.
'FPGA',
# A physical GPU for compute offload.
'PGPU',
]
# Namespace used for custom resource classes

View File

@ -44,8 +44,8 @@ class TestOs_resource_classes(base.TestCase):
of the STANDARDS list, otherwise database ids will get confused
in the placement service.
"""
expected_last_class = rc.MEM_ENCRYPTION_CONTEXT
expected_length = 16
expected_last_class = rc.PGPU
expected_length = 18
self.assertEqual(expected_last_class, rc.STANDARDS[-1])
self.assertEqual(expected_length, len(rc.STANDARDS))