Introduced by I76eb2e4da027a13525314bd58264f482374d270d the
os-assisted-volume-snapshots API is only implemented by the libvirt virt
driver and should only be called by c-vol as part of an orchestrated
remotefs based volume snapshot creation or deletion workflow.
While not documented clearly in the current api-ref there are code
comments within the compute API suggesting that this API can be called
against a volume attached to an instance that is in *any* vm_state.
This however is not correct when deleting and in turn committing an
intermediary volume snapshot of an instance that is not running given
the current implementation within the libvirt driver. With a request to
virDomainBlockCommit being made that fails if the instance and
underlying domain is not running.
Adding support for an offline commit isn't trivial and would be
considered a new feature and not something we could backport on the
stable branches. As such this change seeks to ensure requests to commit
an intermediary volume snapshot from an inactive instance are rejected
quickly and clearly by the compute API to the caller before we cast to
the compute.
Closes-Bug: #1919487
Change-Id: I212a2db8d71702d330b146dc6f871b402a309e74
(cherry picked from commit 99409375a0)