Fix bug 921845

Update stack.sh and stackrc to support new Quantum server/client
repo split.

Change-Id: Iea8df5270f765a635a444c0e39a22809473a605f
diff --git a/stack.sh b/stack.sh
index f2ca9d5..aafeaac 100755
--- a/stack.sh
+++ b/stack.sh
@@ -184,6 +184,7 @@
 SWIFT_DIR=$DEST/swift
 SWIFT_KEYSTONE_DIR=$DEST/swift-keystone2
 QUANTUM_DIR=$DEST/quantum
+QUANTUM_CLIENT_DIR=$DEST/python-quantumclient
 
 # Default Quantum Plugin
 Q_PLUGIN=${Q_PLUGIN:-openvswitch}
@@ -624,6 +625,7 @@
 if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then
     # quantum
     git_clone $QUANTUM_REPO $QUANTUM_DIR $QUANTUM_BRANCH
+    git_clone $QUANTUM_CLIENT_REPO $QUANTUM_CLIENT_DIR $QUANTUM_CLIENT_BRANCH
 fi
 
 # Initialization
@@ -743,12 +745,9 @@
     # Install apache2, which is NOPRIME'd
     apt_get install apache2 libapache2-mod-wsgi
 
-    # Horizon currently imports quantum even if you aren't using it.  Instead
-    # of installing quantum we can create a simple module that will pass the
-    # initial imports
-    mkdir -p  $HORIZON_DIR/openstack-dashboard/quantum || true
-    touch $HORIZON_DIR/openstack-dashboard/quantum/__init__.py
-    touch $HORIZON_DIR/openstack-dashboard/quantum/client.py
+    # Link to quantum client directory.
+    rm -fr ${HORIZON_DIR}/openstack-dashboard/quantum
+    ln -s ${QUANTUM_CLIENT_DIR}/quantum ${HORIZON_DIR}/openstack-dashboard/quantum
 
 
     # ``local_settings.py`` is used to override horizon default settings.
@@ -1386,7 +1385,7 @@
         # Make sure we're using the openvswitch plugin
         sed -i -e "s/^provider =.*$/provider = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPlugin/g" $QUANTUM_PLUGIN_INI_FILE
     fi
-    screen_it q-svc "cd $QUANTUM_DIR && PYTHONPATH=.:$PYTHONPATH python $QUANTUM_DIR/bin/quantum-server $QUANTUM_DIR/etc/quantum.conf"
+   screen_it q-svc "cd $QUANTUM_DIR && PYTHONPATH=.:$QUANTUM_CLIENT_DIR:$PYTHONPATH python $QUANTUM_DIR/bin/quantum-server $QUANTUM_DIR/etc/quantum.conf"
 fi
 
 # Quantum agent (for compute nodes)
diff --git a/stackrc b/stackrc
index 9bc3be6..f782ff3 100644
--- a/stackrc
+++ b/stackrc
@@ -43,6 +43,10 @@
 QUANTUM_REPO=https://github.com/openstack/quantum
 QUANTUM_BRANCH=master
 
+# quantum client
+QUANTUM_CLIENT_REPO=https://github.com/openstack/python-quantumclient
+QUANTUM_CLIENT_BRANCH=master
+
 # CI test suite
 CITEST_REPO=https://github.com/openstack/tempest.git
 CITEST_BRANCH=master