summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-03-21 09:25:15 +0000
committerGerrit Code Review <review@openstack.org>2017-03-21 09:25:15 +0000
commit77320dedde7925d95e2217436369de0353824c12 (patch)
treef7e19ff79c4c6a4f8f04bc3dd0847efe5a3906e2
parentb9d23caf895ec070976ea6d222b7f6f3f48939c8 (diff)
parentc25dbe92487225e1209734ecaba2ff93aec42320 (diff)
Merge "Fix nova deprecated parameters"
-rw-r--r--deployment/puppet/openstack_tasks/manifests/ironic/ironic_compute.pp8
-rw-r--r--tests/noop/spec/hosts/ironic/ironic-compute_spec.rb11
2 files changed, 15 insertions, 4 deletions
diff --git a/deployment/puppet/openstack_tasks/manifests/ironic/ironic_compute.pp b/deployment/puppet/openstack_tasks/manifests/ironic/ironic_compute.pp
index e4e2d5e..71ad2be 100644
--- a/deployment/puppet/openstack_tasks/manifests/ironic/ironic_compute.pp
+++ b/deployment/puppet/openstack_tasks/manifests/ironic/ironic_compute.pp
@@ -112,6 +112,11 @@ class openstack_tasks::ironic::ironic_compute {
112 os_region_name => $region_name, 112 os_region_name => $region_name,
113 } 113 }
114 114
115 class { '::nova::availability_zone':
116 default_availability_zone => $nova_hash['default_availability_zone'],
117 default_schedule_zone => $nova_hash['default_schedule_zone'],
118 }
119
115 class { '::nova::compute': 120 class { '::nova::compute':
116 ensure_package => installed, 121 ensure_package => installed,
117 enabled => false, 122 enabled => false,
@@ -119,10 +124,7 @@ class openstack_tasks::ironic::ironic_compute {
119 force_config_drive => $nova_hash['force_config_drive'], 124 force_config_drive => $nova_hash['force_config_drive'],
120 #NOTE(bogdando) default became true in 4.0.0 puppet-nova (was false) 125 #NOTE(bogdando) default became true in 4.0.0 puppet-nova (was false)
121 neutron_enabled => true, 126 neutron_enabled => true,
122 default_availability_zone => $nova_hash['default_availability_zone'],
123 default_schedule_zone => $nova_hash['default_schedule_zone'],
124 reserved_host_memory => '0', 127 reserved_host_memory => '0',
125 compute_manager => 'ironic.nova.compute.manager.ClusteredComputeManager',
126 allow_resize_to_same_host => pick($nova_hash['allow_resize_to_same_host'], true) 128 allow_resize_to_same_host => pick($nova_hash['allow_resize_to_same_host'], true)
127 } 129 }
128 130
diff --git a/tests/noop/spec/hosts/ironic/ironic-compute_spec.rb b/tests/noop/spec/hosts/ironic/ironic-compute_spec.rb
index 74883f4..008cbb1 100644
--- a/tests/noop/spec/hosts/ironic/ironic-compute_spec.rb
+++ b/tests/noop/spec/hosts/ironic/ironic-compute_spec.rb
@@ -64,7 +64,6 @@ describe manifest do
64 should contain_nova_config('ironic/project_name').with(:value => ironic_tenant) 64 should contain_nova_config('ironic/project_name').with(:value => ironic_tenant)
65 should contain_nova_config('ironic/auth_url').with(:value => "#{admin_uri}/v2.0") 65 should contain_nova_config('ironic/auth_url').with(:value => "#{admin_uri}/v2.0")
66 should contain_nova_config('DEFAULT/compute_driver').with(:value => 'ironic.IronicDriver') 66 should contain_nova_config('DEFAULT/compute_driver').with(:value => 'ironic.IronicDriver')
67 should contain_nova_config('DEFAULT/compute_manager').with(:value => 'ironic.nova.compute.manager.ClusteredComputeManager')
68 should contain_nova_config('neutron/auth_url').with(:value => "#{admin_uri}/v3") 67 should contain_nova_config('neutron/auth_url').with(:value => "#{admin_uri}/v3")
69 should contain_nova_config('DEFAULT/max_concurrent_builds').with(:value => '50') 68 should contain_nova_config('DEFAULT/max_concurrent_builds').with(:value => '50')
70 69
@@ -151,6 +150,16 @@ describe manifest do
151 :allow_resize_to_same_host => Noop.puppet_function('pick', nova_hash['allow_resize_to_same_host'], true) 150 :allow_resize_to_same_host => Noop.puppet_function('pick', nova_hash['allow_resize_to_same_host'], true)
152 ) 151 )
153 end 152 end
153
154 let(:default_availability_zone) { Noop.puppet_function 'pick', nova_hash['default_availability_zone'], facts[:os_service_default] }
155 let(:default_schedule_zone) { Noop.puppet_function 'pick', nova_hash['default_schedule_zone'], facts[:os_service_default] }
156
157 it 'should configure availability zones' do
158 should contain_class('nova::availability_zone').with(
159 'default_availability_zone' => default_availability_zone,
160 'default_schedule_zone' => default_schedule_zone,
161 )
162 end
154 end 163 end
155 end 164 end
156 165