Commit Graph

3 Commits

Author SHA1 Message Date
Dmitry Rozhkov
2cb914225c fpga_webhook: never reject already mutated CRs
For some reason the API server may want to pass an already mutated CR
through the webhook once again. The webhook must accept such CR with
no additional transformations.

This patch adds support for such idempotence by maintaining
a set of identity mappings which effectively resolve to themselves. No
patching is applied to them.
2022-03-29 11:01:49 +03:00
Ed Bartosh
cec004c398 lint: enable wsl check
Fixes: #392

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-12-17 11:48:48 +02:00
Mikko Ylinen
0574c42078 fpga: move getRequestedResources() to new package
The function will be re-used by other webhooks too so it's better
to move it to its own package.

The unit tests are taken from the original implementation with some
minor changes.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-09-10 15:31:26 +03:00