<interface type='<%= @type %>'<% if @trust_guest_rx_filters %> trustGuestRxFilters='yes'<% end %>>
  <% if @mac %>
  <mac address='<%= @mac %>'/>
  <% end %>
  <%if @type == 'direct'%>
  <source dev='<%= @device %>' mode='<%= @mode %>'/>
  <% elsif !@portgroup.nil? %>
  <source network='<%=@network_name%>' portgroup='<%=@portgroup%>'/>
  <% else %>
  <source bridge='<%=@device%>'/>
  <% end %>
  <model type='<%=@model_type%>'/>
  <% if @driver_name and @driver_queues %>
    <driver name='<%=@driver_name%>' queues='<%=@driver_queues%>'/>
  <% elsif @driver_queues %>
    <driver queues='<%=@driver_queues%>'/>
  <% elsif @driver_name %>
    <driver name='<%=@driver_name%>'/>
  <% end %>
  <% if @ovs %>
  <virtualport type='openvswitch'/>
  <% end %>
  <% if @pci_bus and @pci_slot %>
  <address type='pci' bus='<%=@pci_bus%>' slot='<%=@pci_slot%>' />
  <% end %>
</interface>
