Browse Source

Fix noop tests for new fixtures

This patch makes it possible to enable
new fixtures for I9e6363e20c59fd023a64be1013fa2697e80fdbcc

-Added the compute-vmware role in globals and hiera
 tasks for noop script
-Fix compute-vmware running service, this service
 started with enable_compute
-Fix noop tests

Change-Id: Ibaf3a0bbbfb1bb8308bb55de8e905ffccb57a0d6
Partial-Bug: 1541849
Related-Bug: 1535339
changes/75/320475/4
Alexander Arzhanov 6 years ago
parent
commit
7be192b72b
  1. 4
      deployment/puppet/osnailyfacter/modular/globals/tasks.yaml
  2. 2
      deployment/puppet/osnailyfacter/modular/hiera/tasks.yaml
  3. 10
      deployment/puppet/vmware/manifests/compute_vmware.pp
  4. 1
      tests/noop/spec/hosts/globals/globals_spec.rb
  5. 3
      tests/noop/spec/hosts/roles/cinder_spec.rb

4
deployment/puppet/osnailyfacter/modular/globals/tasks.yaml

@ -2,8 +2,8 @@
type: puppet
version: 2.1.0
groups: [primary-controller, controller,
cinder, cinder-block-device, cinder-vmware, compute, ceph-osd,
primary-mongo, mongo, virt, ironic]
cinder, cinder-block-device, cinder-vmware, compute, compute-vmware,
ceph-osd, primary-mongo, mongo, virt, ironic]
required_for: [deploy_end]
requires: [hiera]
condition:

2
deployment/puppet/osnailyfacter/modular/hiera/tasks.yaml

@ -2,7 +2,7 @@
type: puppet
version: 2.1.0
groups: [primary-controller, controller, cinder, cinder-block-device,
cinder-vmware, compute, ceph-osd, primary-mongo, mongo, virt, ironic]
cinder-vmware, compute, compute-vmware, ceph-osd, primary-mongo, mongo, virt, ironic]
requires: [deploy_start, rsync_core_puppet]
required_for: [setup_repositories]
condition:

10
deployment/puppet/vmware/manifests/compute_vmware.pp

@ -40,7 +40,13 @@ define vmware::compute_vmware(
$service_enabled = false,
)
{
include nova::params
include ::nova::params
if $service_enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
# We skip deployment if current node name is not same as target_node
if ($target_node == $current_node) {
@ -64,7 +70,7 @@ define vmware::compute_vmware(
}
service { 'nova-compute':
ensure => running,
ensure => $service_ensure,
name => $::nova::params::compute_service_name,
enable => $service_enabled,
}

1
tests/noop/spec/hosts/globals/globals_spec.rb

@ -5,6 +5,7 @@
# ROLE: ironic
# ROLE: controller
# ROLE: compute
# ROLE: compute-vmware
# ROLE: cinder-vmware
# ROLE: cinder-block-device
# ROLE: cinder

3
tests/noop/spec/hosts/roles/cinder_spec.rb

@ -28,6 +28,7 @@ describe manifest do
cinder_db_user = Noop.hiera_structure 'cinder/db_user', 'cinder'
cinder_db_name = Noop.hiera_structure 'cinder/db_name', 'cinder'
cinder = Noop.puppet_function 'roles_include', 'cinder'
cinder_vmware = Noop.puppet_function 'roles_include', 'cinder-vmware'
cinder_block_device = Noop.puppet_function 'roles_include', 'cinder-block-device'
hostname = Noop.hiera('fqdn')
@ -38,6 +39,8 @@ describe manifest do
'ceph'
elsif storage_hash['volumes_block_device']
'block'
elsif cinder_vmware
'vmdk'
else
false
end

Loading…
Cancel
Save