Merge "Move parameters from ironic::drivers::deploy to ironic::conductor"
This commit is contained in:
@@ -42,6 +42,14 @@
|
|||||||
# state (False).
|
# state (False).
|
||||||
# Defaults to true.
|
# Defaults to true.
|
||||||
#
|
#
|
||||||
|
# [*http_url*]
|
||||||
|
# (optional) ironic-conductor node's HTTP server URL.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*http_root*]
|
||||||
|
# (optional) ironic-conductor node's HTTP root path.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# [*automated_clean*]
|
# [*automated_clean*]
|
||||||
# (optional) Whether to enable automated cleaning on nodes.
|
# (optional) Whether to enable automated cleaning on nodes.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
@@ -84,6 +92,8 @@ class ironic::conductor (
|
|||||||
$enabled_drivers = ['pxe_ipmitool'],
|
$enabled_drivers = ['pxe_ipmitool'],
|
||||||
$max_time_interval = '120',
|
$max_time_interval = '120',
|
||||||
$force_power_state_during_sync = true,
|
$force_power_state_during_sync = true,
|
||||||
|
$http_url = $::os_service_default,
|
||||||
|
$http_root = $::os_service_default,
|
||||||
$automated_clean = $::os_service_default,
|
$automated_clean = $::os_service_default,
|
||||||
$swift_account = $::os_service_default,
|
$swift_account = $::os_service_default,
|
||||||
$cleaning_network_uuid = $::os_service_default,
|
$cleaning_network_uuid = $::os_service_default,
|
||||||
@@ -94,6 +104,7 @@ class ironic::conductor (
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
include ::ironic::params
|
include ::ironic::params
|
||||||
|
include ::ironic::drivers::deploy
|
||||||
|
|
||||||
Ironic_config<||> ~> Service['ironic-conductor']
|
Ironic_config<||> ~> Service['ironic-conductor']
|
||||||
|
|
||||||
@@ -135,6 +146,9 @@ class ironic::conductor (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$http_url_real = pick($::ironic::drivers::deploy::http_url, $http_url)
|
||||||
|
$http_root_real = pick($::ironic::drivers::deploy::http_root, $http_root)
|
||||||
|
|
||||||
# Configure ironic.conf
|
# Configure ironic.conf
|
||||||
ironic_config {
|
ironic_config {
|
||||||
'DEFAULT/enabled_drivers': value => join($enabled_drivers_real, ',');
|
'DEFAULT/enabled_drivers': value => join($enabled_drivers_real, ',');
|
||||||
@@ -145,6 +159,8 @@ class ironic::conductor (
|
|||||||
'glance/swift_account': value => $swift_account;
|
'glance/swift_account': value => $swift_account;
|
||||||
'neutron/cleaning_network_uuid': value => $cleaning_network_uuid;
|
'neutron/cleaning_network_uuid': value => $cleaning_network_uuid;
|
||||||
'neutron/provisioning_network_uuid': value => $provisioning_network_uuid;
|
'neutron/provisioning_network_uuid': value => $provisioning_network_uuid;
|
||||||
|
'deploy/http_url': value => $http_url_real;
|
||||||
|
'deploy/http_root': value => $http_root_real;
|
||||||
'deploy/erase_devices_priority': value => $erase_devices_priority;
|
'deploy/erase_devices_priority': value => $erase_devices_priority;
|
||||||
'deploy/erase_devices_metadata_priority': value => $erase_devices_metadata_priority;
|
'deploy/erase_devices_metadata_priority': value => $erase_devices_metadata_priority;
|
||||||
'deploy/continue_if_disk_secure_erase_fails': value => $continue_if_disk_secure_erase_fails;
|
'deploy/continue_if_disk_secure_erase_fails': value => $continue_if_disk_secure_erase_fails;
|
||||||
|
@@ -11,26 +11,30 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
# Configure the deploy_utils in Ironic
|
# Configure the deploy_utils in Ironic
|
||||||
|
# This manifest is deprecated, use ironic::conductor directly instead.
|
||||||
#
|
#
|
||||||
# === Parameters
|
# === Parameters
|
||||||
#
|
#
|
||||||
# [*http_url*]
|
# [*http_url*]
|
||||||
# (optional) ironic-conductor node's HTTP server URL.
|
# (optional) ironic-conductor node's HTTP server URL. DEPRECATED.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
# [*http_root*]
|
# [*http_root*]
|
||||||
# (optional) ironic-conductor node's HTTP root path.
|
# (optional) ironic-conductor node's HTTP root path. DEPRECATED.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
|
|
||||||
class ironic::drivers::deploy (
|
class ironic::drivers::deploy (
|
||||||
$http_url = $::os_service_default,
|
$http_url = undef,
|
||||||
$http_root = $::os_service_default,
|
$http_root = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
ironic_config {
|
if $http_url {
|
||||||
'deploy/http_url': value => $http_url;
|
warning('http_url is deprecated and will be removed after Newton cycle.')
|
||||||
'deploy/http_root': value => $http_root;
|
}
|
||||||
|
|
||||||
|
if $http_root {
|
||||||
|
warning('http_root is deprecated and will be removed after Newton cycle.')
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
5
releasenotes/notes/drivers-deploy-e97b41f507b402fb.yaml
Normal file
5
releasenotes/notes/drivers-deploy-e97b41f507b402fb.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
Deprecated ``ironic::drivers::deploy`` manifest, use parameters from
|
||||||
|
``ironic::conductor`` instead.
|
@@ -60,7 +60,6 @@ describe 'basic ironic' do
|
|||||||
ssl => false,
|
ssl => false,
|
||||||
}
|
}
|
||||||
class { '::ironic::drivers::ipmi': }
|
class { '::ironic::drivers::ipmi': }
|
||||||
class { '::ironic::drivers::deploy': }
|
|
||||||
|
|
||||||
# Ironic inspector resources
|
# Ironic inspector resources
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
|
@@ -69,6 +69,8 @@ describe 'ironic::conductor' do
|
|||||||
is_expected.to contain_ironic_config('neutron/cleaning_network_uuid').with(:value => '<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('neutron/cleaning_network_uuid').with(:value => '<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('neutron/provisioning_network_uuid').with(:value => '<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('neutron/provisioning_network_uuid').with(:value => '<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('deploy/continue_if_disk_secure_erase_fails').with(:value => '<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('deploy/continue_if_disk_secure_erase_fails').with(:value => '<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_ironic_config('deploy/http_url').with(:value => '<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_ironic_config('deploy/http_root').with(:value => '<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when overriding parameters' do
|
context 'when overriding parameters' do
|
||||||
@@ -83,6 +85,8 @@ describe 'ironic::conductor' do
|
|||||||
:api_url => 'https://127.0.0.1:6385',
|
:api_url => 'https://127.0.0.1:6385',
|
||||||
:provisioning_network_uuid => '00000000-0000-0000-0000-000000000000',
|
:provisioning_network_uuid => '00000000-0000-0000-0000-000000000000',
|
||||||
:cleaning_disk_erase => 'metadata',
|
:cleaning_disk_erase => 'metadata',
|
||||||
|
:http_url => 'http://host:port',
|
||||||
|
:http_root => '/src/www',
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
it 'should replace default parameter with new value' do
|
it 'should replace default parameter with new value' do
|
||||||
@@ -96,6 +100,8 @@ describe 'ironic::conductor' do
|
|||||||
is_expected.to contain_ironic_config('neutron/provisioning_network_uuid').with_value('00000000-0000-0000-0000-000000000000')
|
is_expected.to contain_ironic_config('neutron/provisioning_network_uuid').with_value('00000000-0000-0000-0000-000000000000')
|
||||||
is_expected.to contain_ironic_config('deploy/erase_devices_priority').with_value(0)
|
is_expected.to contain_ironic_config('deploy/erase_devices_priority').with_value(0)
|
||||||
is_expected.to contain_ironic_config('deploy/erase_devices_metadata_priority').with_value(10)
|
is_expected.to contain_ironic_config('deploy/erase_devices_metadata_priority').with_value(10)
|
||||||
|
is_expected.to contain_ironic_config('deploy/http_url').with_value(p[:http_url])
|
||||||
|
is_expected.to contain_ironic_config('deploy/http_root').with_value(p[:http_root])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -1,53 +0,0 @@
|
|||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
# Unit tests for ironic::drivers::deploy class
|
|
||||||
#
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'ironic::drivers::deploy' do
|
|
||||||
|
|
||||||
shared_examples_for 'ironic deploy utils' do
|
|
||||||
|
|
||||||
context 'with default parameters' do
|
|
||||||
it { is_expected.to contain_ironic_config('deploy/http_url').with_value('<SERVICE DEFAULT>') }
|
|
||||||
it { is_expected.to contain_ironic_config('deploy/http_root').with_value('<SERVICE DEFAULT>') }
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when overriding parameters' do
|
|
||||||
let :params do
|
|
||||||
{ :http_url => 'http://foo',
|
|
||||||
:http_root => '/httpboot' }
|
|
||||||
end
|
|
||||||
|
|
||||||
it { is_expected.to contain_ironic_config('deploy/http_url').with_value('http://foo') }
|
|
||||||
it { is_expected.to contain_ironic_config('deploy/http_root').with_value('/httpboot') }
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
on_supported_os({
|
|
||||||
:supported_os => OSDefaults.get_supported_os
|
|
||||||
}).each do |os,facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let (:facts) do
|
|
||||||
facts.merge(OSDefaults.get_facts({
|
|
||||||
:processorcount => 8,
|
|
||||||
:concat_basedir => '/var/lib/puppet/concat'
|
|
||||||
}))
|
|
||||||
end
|
|
||||||
it_configures 'ironic deploy utils'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
Reference in New Issue
Block a user