config/puppet-manifests/src/modules/platform/templates/ovs.add-port.erb

22 lines
638 B
Plaintext

ovs-vsctl --timeout 30 -- --may-exist add-<%= @type -%> <%= @bridge -%> <%= @name -%>
<%- if @type == 'bond' -%>
<%- @interfaces.each do |interface| -%>
<%= interface['name'] -%>
<%- end -%>
<%- end -%>
<%- @attributes.each do |attribute| -%>
<%= attribute -%>
<%- end -%>
<%- @interfaces.each do |interface| -%>
-- set Interface <%= interface['name'] -%>
type=<%= interface['type'] -%>
<%- interface['attributes'].each do |attribute| -%>
<%= attribute -%>
<%- end -%>
<%- end %>
<%- @interfaces.each do |interface| -%>
<%- if interface['type'] == 'internal' -%>
ip link set <%= interface['name'] -%> up
<%- end -%>
<%- end -%>