executor: pf_api_domain_unjoin
input:
  id: ""
  username: ""
  password: ""
  i_retry: 40
  i_delay: 3
steps:
- type: pf_api_domain_action
  method: POST
  status_code: 202
  id: "{{.input.id}}"
  domain_extension: "/unjoin"
  body: >-
    {
      "id": "{{.input.id}}",
      "username": "{{.input.username}}",
      "password": "{{.input.password}}"
    }
  vars:
    task_id:
      from: result.pf_api_domain_action_json.task_id

- type: pf_api_poll
  i_task_id: '{{.task_id}}'
  i_retry: "{{.input.i_retry}}"
  i_delay: "{{.input.i_delay}}"

- type: pf_api_domain_action
  id: "{{.input.id}}"
  domain_extension: "/test_join"
  assertion:
    - result.pf_api_domain_action_json.status ShouldEqual 200
#    - result.pf_api_domain_action_json.message ShouldEqual "Join is OK"
