From be8fa7af29e17bcb51b448aaaecb322f152564ff Mon Sep 17 00:00:00 2001
From: Dave Lapsley <dlapsley@nicira.com>
Date: Wed, 25 Jan 2012 15:07:38 -0500
Subject: [PATCH] Update for Quantum repo split.

---
 stack.sh |   13 ++++++-------
 stackrc  |    4 ++++
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/stack.sh b/stack.sh
index d6a7869..95700aa 100755
--- a/stack.sh
+++ b/stack.sh
@@ -184,6 +184,7 @@ NOVNC_DIR=$DEST/noVNC
 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}
@@ -616,6 +617,7 @@ fi
 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
@@ -735,12 +737,9 @@ if [[ "$ENABLED_SERVICES" =~ "horizon" ]]; then
     # 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 -f ${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.
@@ -1375,7 +1374,7 @@ if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then
         # 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 @@ OPENSTACKX_BRANCH=master
 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
-- 
1.7.5.4

