Add ipv6 network config templates for SUSE based distributions
This commit is contained in:
parent
1dda6cc14c
commit
eb9b478951
|
@ -0,0 +1,16 @@
|
|||
#VAGRANT-BEGIN
|
||||
# The contents below are automatically generated by Vagrant. Do not modify.
|
||||
STARTMODE='auto'
|
||||
BOOTPROTO='static'
|
||||
IPADDR=<%= options[:ip] %>
|
||||
<% if options[:netmask] -%>
|
||||
NETMASK=<%= options[:netmask] %>
|
||||
<% end -%>
|
||||
DEVICE=<%= options[:device] %>
|
||||
<% if options[:gateway] -%>
|
||||
GATEWAY=<%= options[:gateway] %>
|
||||
<% end -%>
|
||||
<% if options[:prefix_length] -%>
|
||||
PREFIXLEN=<%= options[:prefix_length] %>
|
||||
<% end -%>
|
||||
#VAGRANT-END
|
|
@ -0,0 +1,43 @@
|
|||
require_relative "../../../base"
|
||||
|
||||
require "vagrant/util/template_renderer"
|
||||
|
||||
describe "templates/guests/suse/network_static6" do
|
||||
let(:template) { "guests/suse/network_static6" }
|
||||
|
||||
it "renders the template" do
|
||||
result = Vagrant::Util::TemplateRenderer.render(template, options: {
|
||||
device: "eth2",
|
||||
ip: "fde4:8dba:82e1::c4",
|
||||
})
|
||||
expect(result).to eq <<-EOH.gsub(/^ {6}/, "")
|
||||
#VAGRANT-BEGIN
|
||||
# The contents below are automatically generated by Vagrant. Do not modify.
|
||||
STARTMODE='auto'
|
||||
BOOTPROTO='static'
|
||||
IPADDR=fde4:8dba:82e1::c4
|
||||
DEVICE=eth2
|
||||
#VAGRANT-END
|
||||
EOH
|
||||
end
|
||||
|
||||
it "includes the prefix-length and gateway" do
|
||||
result = Vagrant::Util::TemplateRenderer.render(template, options: {
|
||||
device: "eth1",
|
||||
ip: "fde4:8dba:82e1::c4",
|
||||
gateway: "fde4:8dba:82e1::01",
|
||||
prefix_length: "64",
|
||||
})
|
||||
expect(result).to eq <<-EOH.gsub(/^ {6}/, "")
|
||||
#VAGRANT-BEGIN
|
||||
# The contents below are automatically generated by Vagrant. Do not modify.
|
||||
STARTMODE='auto'
|
||||
BOOTPROTO='static'
|
||||
IPADDR=fde4:8dba:82e1::c4
|
||||
DEVICE=eth1
|
||||
GATEWAY=fde4:8dba:82e1::01
|
||||
PREFIXLEN=64
|
||||
#VAGRANT-END
|
||||
EOH
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue