Browse Source

Merge "Add dependency between ovs-port and dpdk bridge."

pull/148/head
Petr Jediny 6 years ago
parent
commit
9e9123cea8
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      linux/network/interface.sls

+ 9
- 0
linux/network/interface.sls View File

{%- from "linux/map.jinja" import system with context %} {%- from "linux/map.jinja" import system with context %}
{%- if network.enabled %} {%- if network.enabled %}


{%- if network.get('dpdk', {}).get('enabled', False) %}
include:
- linux.network.dpdk
{%- endif %}

{%- macro set_param(param_name, param_dict) -%} {%- macro set_param(param_name, param_dict) -%}
{%- if param_dict.get(param_name, False) -%} {%- if param_dict.get(param_name, False) -%}
- {{ param_name }}: {{ param_dict[param_name] }} - {{ param_name }}: {{ param_dict[param_name] }}
- name: {{ interface_name }} - name: {{ interface_name }}
- bridge: {{ interface.bridge }} - bridge: {{ interface.bridge }}
- require: - require:
{%- if network.interface.get(interface.bridge, {}).get('type', 'ovs_bridge') == 'dpdk_ovs_bridge' %}
- cmd: linux_network_dpdk_bridge_interface_{{ interface.bridge }}
{%- else %}
- openvswitch_bridge: ovs_bridge_{{ interface.bridge }} - openvswitch_bridge: ovs_bridge_{{ interface.bridge }}
{%- endif %}


ovs_port_set_type_{{ interface_name }}: ovs_port_set_type_{{ interface_name }}:
cmd.run: cmd.run:

Loading…
Cancel
Save