Pass dhcp_gateway to cobbler::server class

dhcp_gateway was somehow defaulting back to $::ipaddress
instead of matching the values from fuel_settings.

This corrects the scenario where a custom dhcp_gateway
is configured, but not used.

Change-Id: I3d2bb485f30e6c7b8e103181b98b5139cc651ff0
Closes-Bug: #1512721
This commit is contained in:
Matthew Mosesohn 2015-11-03 17:34:22 +03:00
parent 288557da71
commit ec7b42d703
3 changed files with 4 additions and 0 deletions

View File

@ -85,6 +85,7 @@ class cobbler(
dns_upstream => $dns_upstream, dns_upstream => $dns_upstream,
dns_domain => $dns_domain, dns_domain => $dns_domain,
dns_search => $dns_search, dns_search => $dns_search,
dhcp_gateway => $dhcp_gateway,
} }
cobbler_digest_user {$cobbler_user: cobbler_digest_user {$cobbler_user:

View File

@ -30,6 +30,7 @@ class cobbler::server (
$dns_search = 'local', $dns_search = 'local',
$dns_domain = 'local', $dns_domain = 'local',
$dns_upstream = '8.8.8.8', $dns_upstream = '8.8.8.8',
$dhcp_gateway = unset,
$dhcp_lease_max = '1800', $dhcp_lease_max = '1800',
$lease_time = '120m', $lease_time = '120m',
) { ) {

View File

@ -44,6 +44,7 @@ describe 'cobbler' do
:dns_upstream => params[:dns_upstream], :dns_upstream => params[:dns_upstream],
:dns_domain => params[:dns_domain], :dns_domain => params[:dns_domain],
:dns_search => params[:dns_search], :dns_search => params[:dns_search],
:dhcp_gateway => params[:dhcp_gateway],
:extra_admins_net => params[:extra_admins_nets]) :extra_admins_net => params[:extra_admins_nets])
should contain_cobbler_digest_user(params[:cobbler_user]).with( should contain_cobbler_digest_user(params[:cobbler_user]).with(
:password => params[:cobbler_password]) :password => params[:cobbler_password])
@ -69,6 +70,7 @@ describe 'cobbler' do
:dns_upstream => params[:dns_upstream], :dns_upstream => params[:dns_upstream],
:dns_domain => params[:dns_domain], :dns_domain => params[:dns_domain],
:dns_search => params[:dns_search], :dns_search => params[:dns_search],
:dhcp_gateway => params[:dhcp_gateway],
:extra_admins_net => params[:extra_admins_nets]) :extra_admins_net => params[:extra_admins_nets])
should contain_cobbler_digest_user(params[:cobbler_user]).with( should contain_cobbler_digest_user(params[:cobbler_user]).with(
:password => params[:cobbler_password]) :password => params[:cobbler_password])