fuel-library/deployment/puppet/osnailyfacter/modular/ceph/ceph_compute_post.rb
Stanislav Makar bf5ec482cf Fix the problem with ceph deployment on scale lab
Postpone ceph pool creation to post deploy:
* Add task for ceph pool creation and put it in post deploy
* Change ceph/compute.pp and move to post deploy
* Remove from ceph/manifests/init.pp the pool creation code
* Add NOOP tests

Change-Id: I05b53042e24da8cb1693049bd95e682c8903c812
Closes-bug: #1462451
2015-07-08 13:00:28 +00:00

25 lines
1.1 KiB
Ruby

require File.join File.dirname(__FILE__), '../test_common.rb'
class CephComputePostTest < Test::Unit::TestCase
def config
'/etc/nova/nova.conf'
end
def ephemeral_enabled?
TestCommon::Settings.lookup('storage', {}).fetch 'ephemeral_ceph', false
end
def test_nova_ceph_ephemeral_configured
return unless ephemeral_enabled?
assert TestCommon::Config.value?(config, 'libvirt/images_type', 'rbd'), 'No libvirt/images_type in nova.conf!'
assert TestCommon::Config.value?(config, 'libvirt/inject_key', false), 'No libvirt/inject_key in nova.conf!'
assert TestCommon::Config.value?(config, 'libvirt/inject_partition', -2), 'No libvirt/inject_partition in nova.conf!'
assert TestCommon::Config.value?(config, 'libvirt/images_rbd_pool', 'compute'), 'No libvirt/images_rbd_pool in nova.conf!'
end
def test_nova_ceph_compute_configured
assert TestCommon::Config.value?(config, 'libvirt/rbd_user', 'compute'), 'No libvirt/rbd_user in nova.conf!'
assert TestCommon::Config.has_line?(config, /^rbd_secret_uuid=[\w\-]*$/), 'No rbd_secret_uuid in nova.conf!'
end
end