This patch refactors the sample files of:
* instance-soft_delete-start
* instance-soft_delete-end
* instance-suspend-start
* instance-suspend-end
* instance-trigger_crash_dump-start
* instance-trigger_crash_dump-end
notifications to use a common InstanceActionPayload sample data.
Change-Id: I8c31f44a3a3460e044ff73e0779a08ae49133f64
This patch refactors the sample files of:
* instance-live_migration_abort_start
* instance-live_migration_abort_end
* instance-shutdown-start
* instance-shutdown-end
notifications to use a common InstanceActionPayload sample data.
refactors the sample files:
* instance-snapshot-start
* instance-snapshot-end
notifications to use a common InstanceActionSnapshotPayload sample data.
Change-Id: I762b619c4410e3ff4a3660fc318832f81f523c05
This patch refactors the sample files of:
* instance-volume_attach-start
* instance-volume_attach-end
* instance-volume_attach-error
* instance-volume_detach-start
* instance-volume_detach-end
notifications to use a common InstanceActionVolumePayload sample data.
and refactor:
* instance-volume_swap-start
* instance-volume_swap-end
* instance-volume_swap-error
notifications to use a common InstanceActionVolumeSwapPayload sample data
Change-Id: I51fd194ac3b95be96db2676b4abf3df5a14d0faa
This patch refactors the sample files of:
* instance-shelve-start
* instance-shelve-end
* instance-shelve_offload-start
* instance-shelve_offload-end
* instance-unshelve-start
* instance-unshelve-end
notifications to use a common InstanceActionPayload sample data.
Change-Id: Ic64f89d33a985cf6121ddc198380902a5e936ec4
This patch refactors the sample files of:
* instance-resize-start
* instance-resize-end
* instance-resize-error
* instance-resize_finish-start
* instance-resize_finish-end
notifications to use a common InstanceActionPayload sample data.
Change-Id: I4b3728a18d604f07ebffe45eec457e47bba98b7e
In a new microversion (1.22) expose support for processing
forbidden traits in GET /resource_providers and GET
/allocation_candidates. A forbidden trait is expressed as
part of the required parameter with a "!" prefix:
required=CUSTOM_FAST,!CUSTOM_SLOW
This change uses db and query processing code adjustments
already present in the code but guarded by a flag. If the
currently requested microversion matches 1.22 or beyond
that flag is True, otherwise False.
Reno, api-ref update and api history update are included.
Because this microversion changes the value of an existing
parameter it was unclear how to best express that in the
api-ref. In this case existing parameter references were
annotated.
Partially implements blueprint placement-forbidden-traits
Change-Id: I43e92bc5f97db7a2b09e64c6cb953c07d0561e63
Adjust the generated SQL and surrounding python code to support
expressing forbidden traits when requesting allocation candidates.
Any resource provider which has a forbidden trait will not be
included.
The RequestGroup object now supports a forbidden_traits attribute.
Code in forthcoming patches will adjust the query string processing
that creates a RequestGroup to set that attribute if the calling code
is using the right microversion.
Partially implements blueprint placement-forbidden-traits
Change-Id: I53f6fce0810c53551710407df7ab1689282e73f3
This is the db-side work for filtering resource providers by
forbidden traits. Since we control whether forbidden is allowed
or not at the API layer, we can add support here in the DB layer
such that it works all the time.
Subsequent patches will turn on the the functionality in a microversion.
Partially implements blueprint placement-forbidden-traits
Change-Id: I46796d49931df20b002d1a7e6bb3a6be34dabefa
Add support to parse_qs_request_groups to optionally process the
"required" parameter for forbidden traits, expressed as the
normal trait form prefixed with "!". The parsing removes "!"
prefixed traits from the required_traits attribute on a
RequestGroup and puts them (without the "!") in a new
forbidden_traits attribute.
The optionality allows the caller to control the processing
based on the microversion. Later code will add that to
the list resource providers and list allocation canidates
handler code, in the same microversion.
This allows declaring forbidden handling only at the API layer.
Subsequent patches will turn on forbidden handling in the object/
data layer but no forbidden traits will reach that layer until
the microversion turns on allow_forbidden in the API.
Partially implements blueprint placement-forbidden-traits
Change-Id: Icc9dc2631a0eca9e998b9ce8706c7b6920e0cb69
Two issues here:
- The mock library provides a 'mock_open' function to mock the 'open'
builtin's context manager. We should have been using this but were
not.
- We were mocking another context manager in a fairly strange way. This
seems to be causing issues, possibly down to race. We shouldn't do
that.
Fix both issues.
Change-Id: I289b56ae3f9ccd16d72b2ca317e68e6c18b8b313
Fixes-Bug: #1763535
host arg will be used to check libvirt and QEMU version.
Change-Id: Ib592065e8088a0cb45e95eb1501ff4aa32715206
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.com>
This will be used outside the libvirt driver itself in subsequent
patches, so this is factoring it out so it can be used elsewhere
instead of duplicating it.
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.com>
Change-Id: I2e77d7ae3666a4ce9e256f7757b5d3c6ba2495dd
I am unsure if I should be concerned about the lack of error
checking here, but this is how it was originally.
Change-Id: I9c1dfd5a90a53d90a44baae4874965bf8f48cea1
blueprint: hurrah-for-privsep
I can't see a good reason for the two drivers to use different
flags, and this simplifies the code a little.
Change-Id: I55cdc22ce8f95dff0cfd1a31b58582fc4b3ea48f
blueprint: hurrah-for-privsep-again
The same pattern as the rest of the changes. This means that privsep now
needs to let you pass flags to e2fsck, which I don't love and will remove
in a later patch.
Change-Id: I6c695c04ae586fec6adc354257638116277dda88
blueprint: hurrah-for-privsep
If the instance is rebuilt with a different image in the same
host, we don't need to call placement because there is no change
in resource consumption.
Change-Id: Ie252271ecfd38a0a1c61c26e323cc03869889f0a
Closes-Bug: #1750623