Browse code

Merge "Support qpid as message provider for ceilometer"

Jenkins authored on 2013/02/24 04:25:34
Showing 1 changed files
... ...
@@ -64,11 +64,16 @@ function configure_ceilometer() {
64 64
     [ ! -d $CEILOMETER_API_LOG_DIR ] &&  sudo mkdir -m 755 -p $CEILOMETER_API_LOG_DIR
65 65
     sudo chown $USER $CEILOMETER_API_LOG_DIR
66 66
 
67
-    iniset $CEILOMETER_CONF DEFAULT rpc_backend 'ceilometer.openstack.common.rpc.impl_kombu'
67
+    if is_service_enabled rabbit ; then
68
+        iniset $CEILOMETER_CONF DEFAULT rpc_backend 'ceilometer.openstack.common.rpc.impl_kombu'
69
+        iniset $CEILOMETER_CONF DEFAULT rabbit_host $RABBIT_HOST
70
+        iniset $CEILOMETER_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
71
+    elif is_service_enabled qpid ; then
72
+        iniset $CEILOMETER_CONF DEFAULT rpc_backend 'ceilometer.openstack.common.rpc.impl_qpid'
73
+    fi
74
+
68 75
     iniset $CEILOMETER_CONF DEFAULT notification_topics 'notifications,glance_notifications'
69 76
     iniset $CEILOMETER_CONF DEFAULT verbose True
70
-    iniset $CEILOMETER_CONF DEFAULT rabbit_host $RABBIT_HOST
71
-    iniset $CEILOMETER_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
72 77
     iniset $CEILOMETER_CONF DEFAULT sql_connection $BASE_SQL_CONN/nova?charset=utf8
73 78
 
74 79
     # Install the policy file for the API server