- job:
    name: openstack-tox-functional-ovs-with-sudo
    parent: openstack-tox-functional-with-sudo
    required-projects:
      - opendev.org/openstack/devstack
    pre-run: playbooks/openstack-tox-functional-ovs-with-sudo/pre.yaml
    timeout: 600

- job:
    name: os-vif-tempest-base
    parent: devstack-tempest
    description: |
      Base integration test with Neutron networking and py3.
      This is derived from tempest-full-py3 and adapted for
      use in os-vif
    required-projects:
      - openstack/nova
      - openstack/os-vif
      - openstack/neutron
      - openstack/tempest
    vars:
      tempest_concurrency: 4
      tox_envlist: full
      devstack_plugins:
        neutron: https://opendev.org/openstack/neutron.git
      devstack_localrc:
        USE_PYTHON3: true
        FORCE_CONFIG_DRIVE: true
        ENABLE_VOLUME_MULTIATTACH: true
        # NOTE(sean-k-mooney) we do not have to set
        # DEVSTACK_PROJECT_FROM_GIT: "os-vif"
        # in the local.conf because os-vif is listed as a required
        # project and will be added to the LIB_FROM_GIT automatically.
      devstack_services:
        s-account: false
        s-container: false
        s-object: false
        s-proxy: false
        # without Swift, c-bak cannot run (in the Gate at least)
        c-bak: false

- job:
    name: os-vif-ovs-base
    parent: os-vif-tempest-base
    timeout: 7800
    description: |
      os-vif ovs base job, this should not be used directly.
    vars:
      devstack_local_conf:
        post-config:
          $NEUTRON_L3_CONF:
            agent:
              availability_zone: nova
          $NEUTRON_DHCP_CONF:
            agent:
              availability_zone: nova
          "/$NEUTRON_CORE_PLUGIN_CONF":
            ml2_type_vlan:
              network_vlan_ranges: foo:1:10
            agent:
              enable_distributed_routing: true
              l2_population: true
              tunnel_types: vxlan,gre
        test-config:
          $TEMPEST_CONFIG:
            neutron_plugin_options:
              provider_vlans: foo,
              agent_availability_zone: nova
              image_is_advanced: true
              available_type_drivers: flat,vlan,gre,local,vxlan

- job:
    name: os-vif-ovs
    parent: os-vif-ovs-base
    description: |
      os-vif ovs job with ovs firewall driver
    vars:
      devstack_local_conf:
        post-config:
          # NOTE(sean-k-mooney): i do not believe that the devstack role
          # will merge the base /$NEUTRON_CORE_PLUGIN_CONF with the parent
          # job so we redefine the entire section
          "/$NEUTRON_CORE_PLUGIN_CONF":
            ml2_type_vlan:
              network_vlan_ranges: foo:1:10
            agent:
              enable_distributed_routing: true
              l2_population: true
              tunnel_types: vxlan,gre
            securitygroup:
              firewall_driver: openvswitch

- job:
    name: os-vif-ovs-iptables
    parent: os-vif-ovs-base
    description: |
      os-vif iptables job derived from neutron-tempest-iptables_hybrid
    vars:
      tox_envlist: full
      devstack_local_conf:
        post-config:
          # NOTE(sean-k-mooney): i do not believe that the devstack role
          # will merge the base /$NEUTRON_CORE_PLUGIN_CONF with the parent
          # job so we redefine the entire section
          "/$NEUTRON_CORE_PLUGIN_CONF":
            ml2_type_vlan:
              network_vlan_ranges: foo:1:10
            agent:
              enable_distributed_routing: true
              l2_population: true
              tunnel_types: vxlan,gre
            securitygroup:
              firewall_driver: iptables_hybrid
- job:
    name: os-vif-linuxbridge
    parent: os-vif-tempest-base
    timeout: 10800
    description: |
      os-vif linux bridge job derived from neutron-tempest-linuxbridge
    vars:
      devstack_localrc:
        Q_AGENT: linuxbridge

- project:
    templates:
      - check-requirements
      - openstack-python3-wallaby-jobs
      - publish-openstack-docs-pti
      - release-notes-jobs-python3
      - openstack-cover-jobs
    check:
      jobs:
        - kuryr-kubernetes-tempest:
            voting: false
        - openstack-tox-functional-ovs-with-sudo
        - os-vif-ovs
        - os-vif-ovs-iptables
        - os-vif-linuxbridge
    gate:
      jobs:
        - openstack-tox-functional-ovs-with-sudo
        - os-vif-ovs
        - os-vif-ovs-iptables
        - os-vif-linuxbridge
