Add resume-on-boot config option

Enable configuring whether or not should the guests resume after the
host boots.

Change-Id: Ic1eed829dca357be7734d2d93fbf508d3100323f
This commit is contained in:
Guillaume Boutry 2024-04-30 20:12:50 +02:00
parent 600b3986d3
commit 9c31e36587
3 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,11 @@ options:
debug:
default: False
type: boolean
resume-on-boot:
default: True
description: |
Whether to resume the guest VMs when the host boots.
type: boolean
dns-domain:
default: "openstack.local"
type: string

View File

@ -416,6 +416,7 @@ class HypervisorOperatorCharm(sunbeam_charm.OSBaseOperatorCharm):
"compute.migration-address": self.migration_address
or config("ip-address")
or local_ip,
"compute.resume-on-boot": config("resume-on-boot"),
"credentials.ovn-metadata-proxy-shared-secret": self.metadata_secret(),
"identity.admin-role": contexts.identity_credentials.admin_role,
"identity.auth-url": contexts.identity_credentials.internal_endpoint,

View File

@ -144,6 +144,7 @@ class TestCharm(test_utils.CharmTestCase):
"compute.cert": certificate,
"compute.key": private_key,
"compute.migration-address": "10.0.0.10",
"compute.resume-on-boot": True,
"compute.rbd-user": "nova",
"compute.rbd-secret-uuid": "ddd",
"compute.rbd-key": "eee",
@ -247,6 +248,7 @@ class TestCharm(test_utils.CharmTestCase):
"compute.cert": certificate,
"compute.key": private_key,
"compute.migration-address": "10.0.0.10",
"compute.resume-on-boot": True,
"compute.rbd-user": "nova",
"compute.rbd-secret-uuid": "ddd",
"compute.rbd-key": "eee",