This change introduces two new configuration options to the Nova Cloud Controller charm:
- `enable-notify`: Allows users to enable the `notify_on_state_change` setting in the Nova Cloud Controller. This controls whether notifications should be sent for changes in instance states. If `enable-notify` is set to `True`, users can configure the `notify-on-state-change` option to specify the types of state changes to notify on.
- `notify-on-state-change`: Specifies when to send `compute.instance.update` notifications on instance state changes. The possible values are:
- `None`: Disables notifications.
- `vm_state`: Sends notifications on changes to the VM state.
- `vm_and_task_state`: Sends notifications on changes to both VM and task states.
If `enable-notify` is set to `True`, the following configuration is added to `nova.conf`:
[DEFAULT]
notify_on_state_change = {{ notify_on_state_change }}
By default, `enable-notify` is set to `False`, keeping the existing behavior unchanged unless explicitly configured. This ensures that no notifications are sent unless the user opts in, providing backward compatibility while offering the flexibility to enable state change notifications when needed.
Closes-Bug: #2085354
Change-Id: I2f8926a89c89b03e81d05d36dd65579eb8bec16c