From c6b5ffa52e49ebfa7f246ac14163a2e9bbd6eaf7 Mon Sep 17 00:00:00 2001 From: Bryan Fraschetti Date: Mon, 12 Jan 2026 11:41:24 -0500 Subject: [PATCH] Replace Underscores in Configs with Dashes A few config options, namely: skip_cpu_compare_at_startup, skip_cpu_compare_on_dest, nagios_context, and nagios_servicegroups, use underscores instead of following the convention of using dashes. This commit fixes skip_cpu_compare_* to skip-cpu-compare-* to ensure conformance with the precedent since they are new options to the charm and can be modified safely. Change-Id: Iea19544915ec9a609333d0d182935e6758a7b2b0 Signed-off-by: Bryan Fraschetti --- config.yaml | 4 ++-- hooks/nova_compute_context.py | 4 ++-- unit_tests/test_nova_compute_contexts.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config.yaml b/config.yaml index 172e9ecc..456219b9 100644 --- a/config.yaml +++ b/config.yaml @@ -183,7 +183,7 @@ options: homedir - user's home directory username - username . - skip_cpu_compare_at_startup: + skip-cpu-compare-at-startup: type: boolean default: False description: | @@ -199,7 +199,7 @@ options: . # NOTE: This can be removed when https://launchpad.net/nova/+bug/2039803 # is fixed - skip_cpu_compare_on_dest: + skip-cpu-compare-on-dest: type: boolean default: False description: | diff --git a/hooks/nova_compute_context.py b/hooks/nova_compute_context.py index 8bd76d72..1f25d45e 100644 --- a/hooks/nova_compute_context.py +++ b/hooks/nova_compute_context.py @@ -258,9 +258,9 @@ class NovaComputeLibvirtContext(context.OSContextGenerator): ctxt['live_migration_permit_auto_converge'] = \ config('live-migration-permit-auto-converge') ctxt['skip_cpu_compare_at_startup'] = \ - config('skip_cpu_compare_at_startup') + config('skip-cpu-compare-at-startup') ctxt['skip_cpu_compare_on_dest'] = \ - config('skip_cpu_compare_on_dest') + config('skip-cpu-compare-on-dest') if config('instances-path') is not None: ctxt['instances_path'] = config('instances-path') diff --git a/unit_tests/test_nova_compute_contexts.py b/unit_tests/test_nova_compute_contexts.py index 3efc53d1..04b98bc7 100644 --- a/unit_tests/test_nova_compute_contexts.py +++ b/unit_tests/test_nova_compute_contexts.py @@ -671,8 +671,8 @@ class NovaComputeContextTests(CharmTestCase): self.kv.return_value = FakeUnitdata(**{'host_uuid': self.host_uuid}) self.lsb_release.return_value = {'DISTRIB_CODENAME': 'lucid'} self.test_config.set('enable-live-migration', True) - self.test_config.set('skip_cpu_compare_at_startup', True) - self.test_config.set('skip_cpu_compare_on_dest', True) + self.test_config.set('skip-cpu-compare-at-startup', True) + self.test_config.set('skip-cpu-compare-on-dest', True) libvirt = context.NovaComputeLibvirtContext() self.assertEqual(