#!/bin/sh

source /opt/python/admin.info


nova_result=`nova-manage service list |grep -v disabled | grep XXX `
cinder_result=`cinder-manage service list | grep -v disabled |grep XXX`
neutron_result=`neutron agent-list |grep -v False | grep xxx`

#if [ ! -n "$cinder_result" ]; then
#    echo "is null"
#    echo "0"
#else
#    echo "not null"
#    echo "1"
#fi
if [ ! -n "$nova_result" ] && [ ! -n "$cinder_result" ] && [ ! -n "$neutron_result" ]; then
#    echo "is null"
    echo "0"
else
#    echo "not null"
    echo "1"
fi
