Merge pull request #838 from ableischwitz/master

Fix for #831
This commit is contained in:
Gerben Meijer
2017-11-29 11:44:32 +01:00
committed by GitHub
3 changed files with 15 additions and 4 deletions

View File

@@ -111,11 +111,16 @@
<% @channels.each do |channel| %>
<channel type='<%= channel[:type] %>' >
<source mode='<%= channel[:source_mode] %>'
<%if channel[:source_mode] or channel[:source_path] %>
<source
<% if channel[:source_mode] %>
mode='<%= channel[:source_mode] %>'
<% end %>
<% if channel[:source_path] %>
path="<%= channel[:source_path] %>"
<% end %>
/>
<% end %>
<target type='<%= channel[:target_type] %>'
<% if channel[:target_name] %>
name="<%= channel[:target_name] %>"

View File

@@ -62,14 +62,17 @@
</console>
<channel type='unix' >
<source mode=''
/>
<target type='virtio'
name="org.qemu.guest_agent.0"
/>
</channel>
<channel type='spicevmc' >
<target type='virtio'
name="com.redhat.spice.0"
/>
</channel>
<channel type='unix' >
<source mode=''
<source
path="/tmp/foo"
/>
<target type='guestfwd'

View File

@@ -52,6 +52,9 @@ describe 'templates/domain' do
domain.channel(type: 'unix',
target_name: 'org.qemu.guest_agent.0',
target_type: 'virtio')
domain.channel(type: 'spicevmc',
target_name: 'com.redhat.spice.0',
target_type: 'virtio')
domain.channel(type: 'unix',
target_type: 'guestfwd',
target_address: '192.0.2.42',