The python-qpid packages must be installed when qpidd is configured

The python-qpid package is available for Ubuntu trusty, precise, and
all the supported RHEL based platforms.  This package is necessary if
qpidd is configured as the RPC backend.  It is the client API used to
talk to the broker, and must be installed on each system that
communicates with the broker.

Change-Id: I635d3e857aa4b769a80cb7cde405cfd6cae44d32
diff --git a/files/apts/neutron b/files/apts/neutron
index 9df5904..381c758 100644
--- a/files/apts/neutron
+++ b/files/apts/neutron
@@ -17,7 +17,7 @@
 python-mysqldb
 python-mysql.connector
 python-pyudev
-python-qpid # dist:precise
+python-qpid # NOPRIME
 dnsmasq-base
 dnsmasq-utils # for dhcp_release only available in dist:precise
 rabbitmq-server # NOPRIME
diff --git a/files/apts/nova b/files/apts/nova
index 4e47d70..b1b969a 100644
--- a/files/apts/nova
+++ b/files/apts/nova
@@ -24,7 +24,7 @@
 curl
 genisoimage # required for config_drive
 rabbitmq-server # NOPRIME
-qpidd # dist:precise NOPRIME
+qpidd # NOPRIME
 socat # used by ajaxterm
 python-mox
 python-paste
@@ -45,4 +45,4 @@
 python-kombu
 python-feedparser
 python-iso8601
-python-qpid # dist:precise
+python-qpid # NOPRIME
diff --git a/files/rpms/neutron b/files/rpms/neutron
index 29d5cea..7020d33 100644
--- a/files/rpms/neutron
+++ b/files/rpms/neutron
@@ -15,7 +15,7 @@
 #rhel6 gets via pip
 python-paste        # dist:f19,f20,rhel7
 python-paste-deploy # dist:f19,f20,rhel7
-python-qpid
+python-qpid # NOPRIME
 python-routes
 python-sqlalchemy
 python-suds
diff --git a/files/rpms/nova b/files/rpms/nova
index fab4504..695d814 100644
--- a/files/rpms/nova
+++ b/files/rpms/nova
@@ -34,7 +34,7 @@
 # pip we need
 python-paste        # dist:f19,f20,rhel7
 python-paste-deploy # dist:f19,f20,rhel7
-python-qpid
+python-qpid # NOPRIME
 python-routes
 python-sqlalchemy
 python-suds
diff --git a/lib/rpc_backend b/lib/rpc_backend
index 38da50c..f70f98c 100644
--- a/lib/rpc_backend
+++ b/lib/rpc_backend
@@ -130,6 +130,11 @@
         sudo mkdir -p /var/run/openstack
         sudo chown $STACK_USER /var/run/openstack
     fi
+
+    # If using the QPID broker, install the QPID python client API
+    if is_service_enabled qpid || [ -n "$QPID_HOST" ]; then
+        install_package python-qpid
+    fi
 }
 
 # restart the rpc backend