{% set openstack = pillar['openstack'] -%}
{% set quantum = openstack['quantum'] -%}

include:
  - openstack.repo
  - openstack.quantum.user
  - openstack.quantum.conf
  - kernel.headers

quantum-plugin-openvswitch:
  pkg.installed:
    - pkgs:
      - openvswitch-switch
      - openvswitch-datapath-dkms
      - quantum-plugin-openvswitch
      - quantum-plugin-openvswitch-agent
    - require: 
      - file: '/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini'
      - user: quantum-user
  service.running:
    - name: quantum-plugin-openvswitch-agent
    - enable: True
    - require:
      - pkg: quantum-plugin-openvswitch

openvswitch-service:
  service.running:
    - name: openvswitch-switch
    - enable: True
    - require:
      - pkg: quantum-plugin-openvswitch
    - watch:
      - pkg: quantum-plugin-openvswitch

{{ quantum['network'].get('integration_bridge','br-int') }}:
  ovs.bridged:
    - require:
      - service: openvswitch-service

{{ quantum['network']['bridge_name'] }}:
  ovs.bridged:
    - ports:
      {% for port in grains['openstack']['network']['ports'] %}
      - {{ port }}
      {% endfor %}
    - require:
      - service: openvswitch-service


{% set openstack = pillar['openstack'] -%}
{% set quantum = openstack['quantum'] -%}

include:
  - openstack.repo
  - openstack.quantum.user
  - openstack.quantum.conf
  - kernel.headers

quantum-plugin-openvswitch:
  pkg.installed:
    - pkgs:
      - openvswitch-switch
      - openvswitch-datapath-dkms
      - quantum-plugin-openvswitch
      - quantum-plugin-openvswitch-agent
    - require: 
      - file: '/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini'
      - user: quantum-user
  service.running:
    - name: quantum-plugin-openvswitch-agent
    - enable: True
    - watch:
      - file: '/etc/quantum/quantum.conf'
      - file: '/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini'
    - require:
      - pkg: quantum-plugin-openvswitch

openvswitch-service:
  service.running:
    - name: openvswitch-switch
    - enable: True
    - require:
      - pkg: quantum-plugin-openvswitch
    - watch:
      - pkg: quantum-plugin-openvswitch

{{ quantum['network'].get('integration_bridge','br-int') }}:
  ovs.bridged:
    - require:
      - service: openvswitch-service

{{ quantum['network']['bridge_name'] }}:
  ovs.bridged:
    - ports:
      {% for port in grains['openstack']['network']['ports'] %}
      - {{ port }}
      {% endfor %}
    - require:
      - service: openvswitch-service


Add quantum.conf as watched for openvswitch agent service.
Add quantum.conf as watched for openvswitch agent service.

jahkeup/salt-openstack,jahkeup/salt-openstack