- job:
    name: networking-odl-config-job
    description: Fake job to hold configuration settings for jobs
    vars:
      odl_version_map:
        oxygen: &oxygen oxygen-snapshot-0.8
        fluorine: &fluorine fluorine-snapshot-0.9
      common_devstack_vars: &devstack_vars
        devstack_localrc:
          ODL_TIMEOUT: 60
          ODL_RELEASE: latest-snapshot
          # Set here which ODL openstack service provider to use
          ODL_NETVIRT_KARAF_FEATURE: odl-neutron-service,odl-restconf-all,odl-aaa-authn,odl-dlux-core,odl-mdsal-apidocs,odl-netvirt-openstack,odl-neutron-logger,odl-neutron-hostconfig-ovs
          # Switch to using the ODL's L3 implementation
          ODL_L3: True
          # public network connectivity
          ODL_PROVIDER_MAPPINGS: public:br-ex
          PUBLIC_PHYSICAL_NETWORK: public
          PUBLIC_BRIDGE: br-ex
          Q_USE_PUBLIC_VETH: False
          # Enable debug logs for odl ovsdb
          ODL_NETVIRT_DEBUG_LOGS: True
          # Database
          MYSQL_PASSWORD: secretmysql
          DATABASE_QUERY_LOGGING: True
          OS_LOG_PATH: '{{ zuul.executor.log_root }}'
          IS_GATE: True
        devstack_services: &devstack_services
          c-api: True
          c-bak: True
          c-sch: True
          c-vol: True
          cinder: True
          dstat: True
          g-api: True
          g-reg: True
          horizon: False
          key: True
          mysql: True
          n-api-meta: True
          n-api: True
          n-cauth: False
          n-cond: True
          n-cpu: True
          n-crt: True
          n-novnc: False
          n-obj: True
          n-sch: True
          neutron: True
          neutron-agent: False
          neutron-api: True
          neutron-dhcp: True
          neutron-l3: False
          neutron-metadata-agent: True
          neutron-qos: True
          placement-api: True
          placement-client: False
          q-agt: False
          q-dhcp: False
          q-l3: False
          q-meta: False
          q-svc: False
          rabbit: True
        devstack_plugins: &devstack_plugins
          networking-odl: git://git.openstack.org/openstack/networking-odl
          neutron: git://git.openstack.org/openstack/neutron

- job:
    name: networking-odl-tempest-base
    parent: devstack-tempest
    description: |
        Base job for tempest-based tests
    pre-run: playbooks/tempest/pre.yaml
    run: playbooks/tempest/run.yaml
    post-run: playbooks/tempest/post.yaml
    voting: false
    required-projects:
      - openstack/ceilometer
      - openstack/networking-odl
      - openstack/networking-l2gw
      - openstack/networking-sfc
      - openstack/networking-bgpvpn
      - openstack/neutron-fwaas
      - openstack/neutron-lbaas
      - openstack/neutron-tempest-plugin
    roles:
      - zuul: openstack-dev/devstack
    timeout: 9000
    irrelevant-files: &irrelevant_files
      - ^.*\.rst$
      - ^doc/.*$
      - ^releasenotes/.*$
    vars:
      <<: *devstack_vars
      tox_envlist: all-plugin
      zuul_copy_output:
        '{{ devstack_log_dir }}/screen-karaf.log': 'logs'
      extensions_to_txt:
        log: True
        ini: True
      devstack_plugins:
        <<: *devstack_plugins
        neutron-tempest-plugin: git://git.openstack.org/openstack/neutron-tempest-plugin.git
      tempest_test_regex: tempest\.(api|scenario|thirdparty)|neutron_tempest_plugin
      tempest_test_blacklist: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tempest-blacklist.txt"

- job:
    name: networking-odl-tempest-oxygen
    parent: networking-odl-tempest-base
    vars:
      devstack_localrc:
        ODL_RELEASE: *oxygen

- job:
    name: networking-odl-tempest-fluorine
    parent: networking-odl-tempest-base
    vars:
      devstack_localrc:
        ODL_RELEASE: *fluorine

- job:
    name: networking-odl-devstack-base
    parent: devstack
    description: |
        Base job for devstack-based tests
    pre-run: playbooks/devstack/pre.yaml
    required-projects:
      - openstack/ceilometer
      - openstack/networking-odl
      - openstack/networking-l2gw
      - openstack/networking-sfc
      - openstack/networking-bgpvpn
      - openstack/neutron-fwaas
      - openstack/neutron-lbaas
    roles:
      - zuul: openstack-dev/devstack
    timeout: 9000
    irrelevant-files: *irrelevant_files
    vars:
      <<: *devstack_vars
      run_devstack: True

- job:
    name: networking-odl-devstack-base-tox
    parent: networking-odl-devstack-base
    pre-run: playbooks/devstack-tox/pre.yaml
    run: playbooks/devstack-tox/run.yaml
    post-run: playbooks/devstack-tox/post.yaml
    description: |
        Base job for devstack tests that use a tox environment

- job:
    name: networking-odl-functional-base
    parent: networking-odl-devstack-base-tox
    pre-run: playbooks/functional/pre.yaml
    description: |
        Base job for functional tests
    timeout: 1800
    roles:
      - zuul: openstack-dev/devstack
    vars:
      tox_envlist: functional
      zuul_copy_output:
        '{{ devstack_log_dir }}/functional-logs': 'logs'
        '{{ devstack_log_dir }}/screen-karaf.log': 'logs'
      extensions_to_txt:
        log: True
      devstack_localrc:
        HOST_IP: 127.0.0.1
        UNSTACK_KEEP_ODL: True
      run_devstack: False

- job:
    name: networking-odl-fullstack-base
    parent: networking-odl-devstack-base-tox
    pre-run: playbooks/fullstack/pre.yaml
    post-run: playbooks/fullstack/post.yaml
    roles:
      - zuul: openstack-dev/devstack
    description: |
        Base job for fullstack tests
    timeout: 1800
    vars:
      tox_envlist: fullstack
      zuul_copy_output:
        '{{ devstack_log_dir }}/fullstack-logs': 'logs'
        '{{ devstack_log_dir }}/screen-karaf.log': 'logs'
      extensions_to_txt:
        log: True
      devstack_localrc:
        HOST_IP: 127.0.0.1
        UNSTACK_KEEP_ODL: True
      run_devstack: False

- job:
    name: networking-odl-functional-oxygen
    parent: networking-odl-functional-base
    vars:
      devstack_localrc:
        ODL_RELEASE: *oxygen

- job:
    name: networking-odl-functional-fluorine
    parent: networking-odl-functional-base
    voting: false
    vars:
      devstack_localrc:
        ODL_RELEASE: *fluorine

- job:
    name: networking-odl-fullstack-oxygen
    parent: networking-odl-fullstack-base
    voting: false
    vars:
      devstack_localrc:
        ODL_RELEASE: *oxygen

- job:
    name: networking-odl-fullstack-fluorine
    parent: networking-odl-fullstack-base
    voting: false
    vars:
      devstack_localrc:
        ODL_RELEASE: *fluorine

# >>> LEGACY JOBS TO REPLACE

- job:
    name: networking-odl-grenade
    parent: legacy-dsvm-base
    run: playbooks/legacy/grenade-dsvm-networking-odl/run.yaml
    post-run: playbooks/legacy/grenade-dsvm-networking-odl/post.yaml
    timeout: 9000
    required-projects:
      - openstack-dev/grenade
      - openstack-infra/devstack-gate
      - openstack/networking-odl

- job:
    name: networking-odl-tempest-oxygen-multinode
    parent: legacy-dsvm-base-multinode
    run: playbooks/legacy/tempest-dsvm-networking-odl-multinode-oxygen-snapshot/run.yaml
    post-run: playbooks/legacy/tempest-dsvm-networking-odl-multinode-oxygen-snapshot/post.yaml
    timeout: 10800
    required-projects:
      - openstack-infra/devstack-gate
      - openstack/networking-odl
      - openstack/tempest
    nodeset: legacy-ubuntu-xenial-2-node

- job:
    name: networking-odl-tempest-fluorine-multinode
    parent: legacy-dsvm-base-multinode
    run: playbooks/legacy/tempest-dsvm-networking-odl-multinode-fluorine-snapshot/run.yaml
    post-run: playbooks/legacy/tempest-dsvm-networking-odl-multinode-fluorine-snapshot/post.yaml
    timeout: 10800
    required-projects:
      - openstack-infra/devstack-gate
      - openstack/networking-odl
      - openstack/tempest
    nodeset: legacy-ubuntu-xenial-2-node

- job:
    name: networking-odl-rally-oxygen
    parent: legacy-dsvm-base
    run: playbooks/legacy/rally-dsvm-networking-odl-oxygen-snapshot/run.yaml
    post-run: playbooks/legacy/rally-dsvm-networking-odl-oxygen-snapshot/post.yaml
    timeout: 7500
    required-projects:
      - openstack-infra/devstack-gate
      - openstack/networking-odl
      - openstack/rally

- job:
    name: networking-odl-rally-fluorine
    parent: legacy-dsvm-base
    run: playbooks/legacy/rally-dsvm-networking-odl-fluorine-snapshot/run.yaml
    post-run: playbooks/legacy/rally-dsvm-networking-odl-fluorine-snapshot/post.yaml
    timeout: 7500
    required-projects:
      - openstack-infra/devstack-gate
      - openstack/networking-odl
      - openstack/rally

# <<< LEGACY JOBS TO REPLACE
