From c547287d758c83510675ba9ee49a9038e7a4425b Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Mon, 6 May 2019 17:32:01 -0500 Subject: [PATCH] Propose FPGA and PGPU resource classes These will usually be inventoried by Cyborg. Change-Id: Ic6603aa62ed17c3e916cf7c98016cabb3c01b1f6 blueprint: nova-cyborg-interaction --- os_resource_classes/__init__.py | 4 ++++ os_resource_classes/tests/test_os_resource_classes.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/os_resource_classes/__init__.py b/os_resource_classes/__init__.py index 53ecc01..31de1b2 100644 --- a/os_resource_classes/__init__.py +++ b/os_resource_classes/__init__.py @@ -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 diff --git a/os_resource_classes/tests/test_os_resource_classes.py b/os_resource_classes/tests/test_os_resource_classes.py index 2976ce7..05b90f3 100644 --- a/os_resource_classes/tests/test_os_resource_classes.py +++ b/os_resource_classes/tests/test_os_resource_classes.py @@ -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))