executor: run_cumulus_command
input:
  command: {}
steps:
  - type: http
    method: POST
    basic_auth_user: "{{.switch01.api.user}}"
    basic_auth_password: "{{.switch01.api.password}}"
    url: '{{.switch01.api.url}}/nclu/v1/rpc'
    ignore_verify_ssl: true
    body: >-
      {
       "cmd": "{{.input.command}}"
      }
    headers:
      "Content-Type": "application/json"
    assertions:
      - result.statuscode ShouldEqual 200
output:
  # inside test suite, assertions are made against result.body and result.status_code
  # and not result.statuscode
  body: "{{.result.body}}"
  status_code: "{{.result.statuscode}}"
