Add support for [neutron] fail_on_port_binding_failure
Depends-on: 876a9d40275d21bf2a7889a2d864877292f18143 Change-Id: I1a5d0a8ce48679de05464ef83fb1419c2758e822 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -61,6 +61,10 @@
|
|||||||
# successfully lease addresses.
|
# successfully lease addresses.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
|
# [*fail_on_port_binding_failure*]
|
||||||
|
# (Optional) Fail deployment if neutron port binding fails.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
class ironic::neutron (
|
class ironic::neutron (
|
||||||
$password,
|
$password,
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
@@ -73,6 +77,7 @@ class ironic::neutron (
|
|||||||
$region_name = $facts['os_service_default'],
|
$region_name = $facts['os_service_default'],
|
||||||
$endpoint_override = $facts['os_service_default'],
|
$endpoint_override = $facts['os_service_default'],
|
||||||
$dhcpv6_stateful_address_count = $facts['os_service_default'],
|
$dhcpv6_stateful_address_count = $facts['os_service_default'],
|
||||||
|
$fail_on_port_binding_failure = $facts['os_service_default'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if is_service_default($system_scope) {
|
if is_service_default($system_scope) {
|
||||||
@@ -95,5 +100,6 @@ class ironic::neutron (
|
|||||||
'neutron/region_name': value => $region_name;
|
'neutron/region_name': value => $region_name;
|
||||||
'neutron/endpoint_override': value => $endpoint_override;
|
'neutron/endpoint_override': value => $endpoint_override;
|
||||||
'neutron/dhcpv6_stateful_address_count': value => $dhcpv6_stateful_address_count;
|
'neutron/dhcpv6_stateful_address_count': value => $dhcpv6_stateful_address_count;
|
||||||
|
'neutron/fail_on_port_binding_failure': value => $fail_on_port_binding_failure;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``ironic::neutron::fail_on_port_binding_failure`` parameter has
|
||||||
|
been added.
|
@@ -34,6 +34,7 @@ describe 'ironic::neutron' do
|
|||||||
is_expected.to contain_ironic_config('neutron/region_name').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('neutron/region_name').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('neutron/endpoint_override').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('neutron/endpoint_override').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('neutron/dhcpv6_stateful_address_count').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('neutron/dhcpv6_stateful_address_count').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_ironic_config('neutron/fail_on_port_binding_failure').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when overriding parameters' do
|
context 'when overriding parameters' do
|
||||||
@@ -48,6 +49,7 @@ describe 'ironic::neutron' do
|
|||||||
:region_name => 'regionTwo',
|
:region_name => 'regionTwo',
|
||||||
:endpoint_override => 'http://example2.com',
|
:endpoint_override => 'http://example2.com',
|
||||||
:dhcpv6_stateful_address_count => 8,
|
:dhcpv6_stateful_address_count => 8,
|
||||||
|
:fail_on_port_binding_failure => true,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -62,6 +64,7 @@ describe 'ironic::neutron' do
|
|||||||
is_expected.to contain_ironic_config('neutron/region_name').with_value(params[:region_name])
|
is_expected.to contain_ironic_config('neutron/region_name').with_value(params[:region_name])
|
||||||
is_expected.to contain_ironic_config('neutron/endpoint_override').with_value(params[:endpoint_override])
|
is_expected.to contain_ironic_config('neutron/endpoint_override').with_value(params[:endpoint_override])
|
||||||
is_expected.to contain_ironic_config('neutron/dhcpv6_stateful_address_count').with_value(params[:dhcpv6_stateful_address_count])
|
is_expected.to contain_ironic_config('neutron/dhcpv6_stateful_address_count').with_value(params[:dhcpv6_stateful_address_count])
|
||||||
|
is_expected.to contain_ironic_config('neutron/fail_on_port_binding_failure').with_value(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user