- job-template:
    name: '{pipeline}-cinderclient-dsvm-functional{special}-{node}{suffix}'
    node: '{node}'

    wrappers:
      - build-timeout:
          timeout: 70
      - timestamps

    builders:
      - link-logs
      - net-info
      - devstack-checkout
      - shell: |
          #!/bin/bash -xe
          export PYTHONUNBUFFERED=true
          export BRANCH_OVERRIDE={branch-override}
          export DEVSTACK_PROJECT_FROM_GIT=python-cinderclient
          export DEVSTACK_LOCAL_CONFIG="VOLUME_BACKING_FILE_SIZE=16G"
          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
          fi
          if [ "{special}" == "-identity-v3-only" ] ; then
              export DEVSTACK_LOCAL_CONFIG+=$'\n'"ENABLE_IDENTITY_V2=False"
          fi
          function post_test_hook {{
              # Configure and run functional tests
              $BASE/new/python-cinderclient/cinderclient/tests/functional/hooks/post_test_hook.sh
          }}
          export -f post_test_hook

          cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
          ./safe-devstack-vm-gate-wrap.sh

    publishers:
      - test-results
      - devstack-logs
      - console-log

- job-template:
    name: '{pipeline}-brick-cinderclient-ext-dsvm-functional-{node}{suffix}'
    node: '{node}'

    wrappers:
      - build-timeout:
          timeout: 65
      - timestamps

    builders:
      - link-logs
      - net-info
      - devstack-checkout
      - shell: |
          #!/bin/bash -xe
          export PYTHONUNBUFFERED=true
          export BRANCH_OVERRIDE={branch-override}
          export DEVSTACK_PROJECT_FROM_GIT=python-brick-cinderclient-ext
          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
          fi

          function post_test_hook {{
              # Configure and run functional tests
              $BASE/new/python-brick-cinderclient-ext/brick_cinderclient_ext/tests/functional/hooks/post_test_hook.sh
          }}
          export -f post_test_hook

          cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
          ./safe-devstack-vm-gate-wrap.sh

    publishers:
      - test-results
      - devstack-logs
      - console-log

- job-template:
    name: '{pipeline}-cinder-dsvm-apache-{node}{suffix}'
    node: '{node}'

    wrappers:
      - build-timeout:
          timeout: 130
      - timestamps

    builders:
      - link-logs
      - net-info
      - devstack-checkout
      - local_conf:
          conf: |
            [[local|localrc]]
            CINDER_USE_MOD_WSGI=True
      - shell: |
          #!/bin/bash -xe
          export PYTHONUNBUFFERED=true
          export DEVSTACK_GATE_TEMPEST=1
          export DEVSTACK_GATE_TEMPEST_FULL=1
          export BRANCH_OVERRIDE={branch-override}
          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
          fi
          cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
          ./safe-devstack-vm-gate-wrap.sh

    publishers:
      - test-results
      - devstack-logs
      - console-log