nutanix / calm-dsl

Keep Calm and DSL On!
https://nutanix.github.io/calm-dsl/
Apache License 2.0
33 stars 51 forks source link

Missing verify for Runbook HTTP task variable #172

Open pipoe2h opened 3 years ago

pipoe2h commented 3 years ago

The attribute verify of a Runbook HTTP task variable is missing. Include the attribute verify.

Example


from calm.dsl.runbooks import runbook, runbook_json
from calm.dsl.runbooks import RunbookTask as Task, RunbookVariable as Variable

@runbook
def DslCommunityRunbook():

    ntnx_calm_object = Variable.WithOptions.FromTask(
        Task.HTTP.get(
            relative_url="https://api.github.com/repos/nutanixdev/calm-community/contents/",
            content_type="application/json",
            verify=True,
            status_mapping={200: True},
            response_paths={"ntnx_calm_object": "$[?(@.type == 'dir')].name"},
        ),
        is_mandatory=True,
    )