diff --git a/manifests/init.pp b/manifests/init.pp
index 14be7a5..75a0019 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -147,7 +147,7 @@
# Optional changes to the /etc/default file (on Debian)
if $deb_default != false {
- file { '/etc/default/libvirt-bin':
+ file { "/etc/default/${libvirt_service}":
owner => 'root',
group => 'root',
mode => '0644',
diff --git a/manifests/network.pp b/manifests/network.pp
index 929189a..44c017b 100644
--- a/manifests/network.pp
+++ b/manifests/network.pp
@@ -77,6 +77,8 @@
$ip = undef,
$ipv6 = undef,
$mac = undef,
+ $vlan = undef,
+ $virtualport = undef,
) {
validate_bool ($autostart)
validate_re ($ensure, '^(present|defined|enabled|running|undefined|absent)$',
@@ -89,7 +91,7 @@
path => '/bin:/usr/bin',
user => 'root',
provider => 'posix',
- require => Service[$::libvirt::params::libvirt_service],
+ require => Service['libvirtd'],
environment => ['LC_ALL=en_US.utf8', ],
}
diff --git a/templates/network.xml.erb b/templates/network.xml.erb
index 98be69f..9dc1c6e 100644
--- a/templates/network.xml.erb
+++ b/templates/network.xml.erb
@@ -46,4 +46,18 @@
<%- end-%>
<%- end-%>
<%-end-%>
+ <%- if @vlan -%>
+ <%- @vlan.each do |vlan| -%>
+ >
+ <%- vlan['tags'].each do |tag| -%>
+ ' <%= tag['native_mode'] ? "nativeMode='#{tag['native_mode']}'" : '' %> />
+ <%- end -%>
+
+ <%- end -%>
+ <%- end -%>
+ <%- if @virtualport -%>
+ <%- @virtualport.each do |virtualport| -%>
+ '/>
+ <%- end -%>
+ <%- end -%>