From e7f2cdb10062116a671be308e3c7921c35b48a11 Mon Sep 17 00:00:00 2001 From: "zmeyers.amperecomputing" Date: Mon, 19 Dec 2022 08:57:09 -0800 Subject: [PATCH] Add mixins for fedora36 and fedora37 os types --- CHANGES.next.md | 1 + perfkitbenchmarker/linux_virtual_machine.py | 20 ++++++++++++++++++++ perfkitbenchmarker/os_types.py | 4 ++++ perfkitbenchmarker/static_virtual_machine.py | 10 ++++++++++ 4 files changed, 35 insertions(+) diff --git a/CHANGES.next.md b/CHANGES.next.md index d873dd8150..6eb0e4a598 100644 --- a/CHANGES.next.md +++ b/CHANGES.next.md @@ -32,6 +32,7 @@ ### New features: +- Add support for systems running fedora36 and fedora37 - Add support for static systems running debian11 - Add ibmcloud as a new provider. - Add prefix/directory support for object storage service runs. diff --git a/perfkitbenchmarker/linux_virtual_machine.py b/perfkitbenchmarker/linux_virtual_machine.py index ce85bb923c..3cc111261b 100644 --- a/perfkitbenchmarker/linux_virtual_machine.py +++ b/perfkitbenchmarker/linux_virtual_machine.py @@ -1913,6 +1913,26 @@ def SetupPackageManager(self): self.RemoteCommand(f'sudo dnf install -y {_EPEL_URL.format(9)}') +class Fedora36Mixin(BaseRhelMixin): + """Class holding Fedora36 specific methods and attributes.""" + OS_TYPE = os_types.FEDORA36 + PYTHON_2_PACKAGE = None + + + def SetupPackageManager(self): + """Fedora does not need epel.""" + + +class Fedora37Mixin(BaseRhelMixin): + """Class holding Fedora37 specific methods and attributes.""" + OS_TYPE = os_types.FEDORA37 + PYTHON_2_PACKAGE = None + + + def SetupPackageManager(self): + """Fedora does not need epel.""" + + class CentOs7Mixin(BaseRhelMixin): """Class holding CentOS 7 specific VM methods and attributes.""" OS_TYPE = os_types.CENTOS7 diff --git a/perfkitbenchmarker/os_types.py b/perfkitbenchmarker/os_types.py index 84edb2718a..d0c2b0505e 100644 --- a/perfkitbenchmarker/os_types.py +++ b/perfkitbenchmarker/os_types.py @@ -27,6 +27,8 @@ DEBIAN9 = 'debian9' DEBIAN10 = 'debian10' DEBIAN11 = 'debian11' +FEDORA36 = 'fedora36' +FEDORA37 = 'fedora37' JUJU = 'juju' RHEL7 = 'rhel7' RHEL8 = 'rhel8' @@ -83,6 +85,8 @@ DEBIAN9, DEBIAN10, DEBIAN11, + FEDORA36, + FEDORA37, JUJU, RHEL7, RHEL8, diff --git a/perfkitbenchmarker/static_virtual_machine.py b/perfkitbenchmarker/static_virtual_machine.py index 07b1e0c1a0..c1b6627f2b 100644 --- a/perfkitbenchmarker/static_virtual_machine.py +++ b/perfkitbenchmarker/static_virtual_machine.py @@ -356,6 +356,16 @@ class Rhel9BasedStaticVirtualMachine(StaticVirtualMachine, pass +class Fedora36BasedStaticVirtualMachine(StaticVirtualMachine, + linux_virtual_machine.Fedora36Mixin): + pass + + +class Fedora37BasedStaticVirtualMachine(StaticVirtualMachine, + linux_virtual_machine.Fedora37Mixin): + pass + + class CentOs7BasedStaticVirtualMachine(StaticVirtualMachine, linux_virtual_machine.CentOs7Mixin): pass