From 4324d428899f6cb29c2f430be06290a7f82220da Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Wed, 16 Jun 2021 08:55:03 +0200 Subject: [PATCH] Add packet rate related resource classes Added: * NET_PACKET_RATE_KILOPACKET_PER_SEC * NET_PACKET_RATE_EGR_KILOPACKET_PER_SEC * NET_PACKET_RATE_IGR_KILOPACKET_PER_SEC blueprint: qos-minimum-guaranteed-packet-rate Change-Id: I1c035cf73cf73ad3fe0535d7ba5f1243fb816bea --- os_resource_classes/__init__.py | 6 ++++++ os_resource_classes/tests/test_os_resource_classes.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/os_resource_classes/__init__.py b/os_resource_classes/__init__.py index 31de1b2..599ce0c 100644 --- a/os_resource_classes/__init__.py +++ b/os_resource_classes/__init__.py @@ -72,6 +72,12 @@ STANDARDS = [ 'FPGA', # A physical GPU for compute offload. 'PGPU', + # Direction aware and direcitonless resource classes for the network + # packet rate measured in kilopackets per second. See + # https://specs.openstack.org/openstack/nova-specs/specs/xena/approved/qos-minimum-guaranteed-packet-rate.html + 'NET_PACKET_RATE_KILOPACKET_PER_SEC', + 'NET_PACKET_RATE_EGR_KILOPACKET_PER_SEC', + 'NET_PACKET_RATE_IGR_KILOPACKET_PER_SEC', ] # 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 05b90f3..194201b 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.PGPU - expected_length = 18 + expected_last_class = rc.NET_PACKET_RATE_IGR_KILOPACKET_PER_SEC + expected_length = 21 self.assertEqual(expected_last_class, rc.STANDARDS[-1]) self.assertEqual(expected_length, len(rc.STANDARDS))