Skip to content

Add conditional execution (similar to jsonpatch test) #17

@gberche-orange

Description

@gberche-orange

It is sometimes useful to conditionally execute bosh operators (in addition to the ? refer to hash keys that may or may not exist) depending on the presence of key/value in the manifest.

This issue suggests to implement a support similar to the json patch test syntax

{ "op": "test", "path": "/best_biscuit/name", "value": "Choco Leibniz" }
Tests that the specified value is set in the document. If the test fails, then the patch as a whole should not apply.

This would enable bosh operators to check their prereqs explicitly, and be ignored if preqs are not met.

/CC @voelzmo

Here is a related specific use-case (for a bosh-based on demand service broker similar to cppforlife/bosh-generic-sb-release): orange-cloudfoundry/cf-ops-automation-broker#30

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions