7 function test_cinder_service(){
8 echo "Starting Cinder $1..."
13 service_running=`netstat -nat | grep $2 | wc -l`
14 if [ $service_running -eq 0 ]; then
15 echo "Can not start Cinder $1 service"
18 echo "Cinder $1 successfully started"
24 function check_file_exists(){
25 if [ ! -f "$1" ]; then
31 function test_cinder_configs(){
32 declare -a files=("/etc/cinder/cinder.conf" "/etc/cinder/api-paste.ini" "/etc/cinder/policy.json")
33 for f in "${files[@]}"
35 check_file_exists "$f"
42 declare -a imports=("cinder" "cinder.volume.drivers.lvm" "cinder.volume.drivers.rbd")
43 for i in "${imports[@]}"
55 count=`ls -1 /usr/bin/cinder* 2>/dev/null | wc -l`
56 if [ $count -eq 0 ]; then
60 test_cinder_service openstack-cinder-api 8776
61 check_file_exists "/usr/bin/cinder-volume"
62 check_file_exists "/usr/bin/cinder-scheduler"
66 check_file_exists "/usr/bin/cinder-manage"
69 check_file_exists "/usr/bin/cinder-scheduler"
72 check_file_exists "/usr/bin/cinder-api"
73 test_cinder_service cinder-api 8776
76 check_file_exists "/usr/bin/cinder-volume"
79 echo "No test for docs defined"
82 echo "Test is not defined, skipping..."