Browse code

Support qpid as message provider for ceilometer

Previously, the RPC backend was hardcoded to the appropriate
dirver for rabbitMQ only.

Now we allow qpid to be used as an alternative.

Note that ZeroMQ is not tested or supported as yet.

Change-Id: If9a69a4c52f046fc6e3530b47542d55438787cea

Eoghan Glynn authored on 2013/02/23 06:59:52
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