From bd7242101651562cf84d4820b230f1f1449185dd Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Mon, 4 Apr 2022 07:58:30 +0200 Subject: [PATCH] Use Netplan to configure SR-IOV and HWOL Rebuild pulls in updates to layer-ovn which enables use of Netplan to configure SR-IOV and Hardware Offload. Also drop past release specific classes. As part of the migration to charmhub we have also changed the release strategy from having every release support all previous supported os/release combinations to only support current and previous version (to ensure N+1 upgrades). Change-Id: Idc7837fd5b939b05c3ae1c8007c3080c7f0192e3 --- .gitignore | 1 + .../charm/openstack/ovn_dedicated_chassis.py | 37 +++---------------- 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index 2f71a88..f53d7ed 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ build interfaces layers *.swp +*.charm diff --git a/src/lib/charm/openstack/ovn_dedicated_chassis.py b/src/lib/charm/openstack/ovn_dedicated_chassis.py index 3e4c9c3..2b58847 100644 --- a/src/lib/charm/openstack/ovn_dedicated_chassis.py +++ b/src/lib/charm/openstack/ovn_dedicated_chassis.py @@ -31,25 +31,13 @@ class OVNDedicatedChassisConfigurationAdapter( enable_hardware_offload = False -class TrainOVNChassisCharm(charms.ovn_charm.DeferredEventMixin, - charms.ovn_charm.BaseTrainOVNChassisCharm): - # OpenvSwitch and OVN is distributed as part of the Ubuntu Cloud Archive - # Pockets get their name from OpenStack releases - source_config_key = 'source' - release = 'train' - name = 'ovn-dedicated-chassis' - configuration_class = OVNDedicatedChassisConfigurationAdapter - - # NOTE(fnordahl): Add this to ``layer-ovn`` - def install(self, check_deferred_events=True): - self.configure_source() - super().install(check_deferred_events=check_deferred_events) - - -class UssuriOVNChassisCharm(charms.ovn_charm.DeferredEventMixin, - charms.ovn_charm.BaseUssuriOVNChassisCharm): +class OVNChassisCharm(charms.ovn_charm.DeferredEventMixin, + charms.ovn_charm.BaseOVNChassisCharm): # OpenvSwitch and OVN is distributed as part of the Ubuntu Cloud Archive # Pockets get their name from OpenStack releases + # + # This defines the earliest version this charm can support, actually + # installed version is selected by configuration. source_config_key = 'source' release = 'ussuri' name = 'ovn-dedicated-chassis' @@ -59,18 +47,3 @@ class UssuriOVNChassisCharm(charms.ovn_charm.DeferredEventMixin, def install(self, check_deferred_events=True): self.configure_source() super().install(check_deferred_events=check_deferred_events) - - -class WallabyOVNChassisCharm(charms.ovn_charm.DeferredEventMixin, - charms.ovn_charm.BaseWallabyOVNChassisCharm): - # OpenvSwitch and OVN is distributed as part of the Ubuntu Cloud Archive - # Pockets get their name from OpenStack releases - source_config_key = 'source' - release = 'wallaby' - name = 'ovn-dedicated-chassis' - configuration_class = OVNDedicatedChassisConfigurationAdapter - - # NOTE(fnordahl): Add this to ``layer-ovn`` - def install(self, check_deferred_events=True): - self.configure_source() - super().install(check_deferred_events=check_deferred_events)