From d3f4a25d43f3f14381c9b2417a7523354a801bc1 Mon Sep 17 00:00:00 2001
From: Gauvain Pocentek <gauvain.pocentek@objectif-libre.com>
Date: Thu, 23 Apr 2015 19:01:50 +0200
Subject: [PATCH] autohelp-wrapper: reorganise project dependencies

This patch moves the explicit dependencies for projects in their own
requirement file.

Install a bunch of new neutron dependencies (drivers moved to their own
dependencies).

Change-Id: I8cab9861a5546f270499f626b06e44ad0185477d
---
 autogenerate_config_docs/autohelp-wrapper     | 28 +++-------------
 .../requirements/cinder.txt                   |  2 ++
 .../requirements/neutron.txt                  | 33 +++++++++++++++++++
 3 files changed, 40 insertions(+), 23 deletions(-)
 create mode 100644 autogenerate_config_docs/requirements/cinder.txt
 create mode 100644 autogenerate_config_docs/requirements/neutron.txt

diff --git a/autogenerate_config_docs/autohelp-wrapper b/autogenerate_config_docs/autohelp-wrapper
index 0bdcce0d..033a4abf 100755
--- a/autogenerate_config_docs/autohelp-wrapper
+++ b/autogenerate_config_docs/autohelp-wrapper
@@ -75,29 +75,7 @@ setup_tools() {
     pip install "GitPython>=0.3.2.RC1"
 
     # autohelp.py requires this
-    pip install oslo.i18n
-
-    # For some reason the ceilometer installation fails without these 2
-    # packages pre-installed
-    pip install setuptools pbr
-
-    # For autohelp.py
-    pip install lxml
-
-    # Some projects don't have explicit dependencies on some less used packages.
-    # Without these packages installed some modules can't be imported and
-    # configuration options are not discovered. We install these packages to
-    # make sure that we get the options.
-
-    # Ceilometer
-    pip install swift
-
-    # Cinder
-    # hp3parclient is needed for icehouse, but not for juno
-    pip install hp3parclient hplefthandclient
-
-    # Neutron
-    pip install ryu
+    pip install oslo.i18n lxml
 
     # This is a workaround to avoid pulling in new configuration options brought
     # by python-keystoneclient >= 0.8. This version also deprecates some options
@@ -161,6 +139,10 @@ if [ "$FAST" -eq 0 ] ; then
     for project in $PROJECTS; do
         setup_venv $project
         setup_tools
+        if [ -e requirements/$project.txt ]; then
+            pip install -r requirements/$project.txt \
+                --allow-all-external
+        fi
         get_project $project
 
         (
diff --git a/autogenerate_config_docs/requirements/cinder.txt b/autogenerate_config_docs/requirements/cinder.txt
new file mode 100644
index 00000000..81994279
--- /dev/null
+++ b/autogenerate_config_docs/requirements/cinder.txt
@@ -0,0 +1,2 @@
+hp3parclient
+hplefthandclient
diff --git a/autogenerate_config_docs/requirements/neutron.txt b/autogenerate_config_docs/requirements/neutron.txt
new file mode 100644
index 00000000..217910c6
--- /dev/null
+++ b/autogenerate_config_docs/requirements/neutron.txt
@@ -0,0 +1,33 @@
+ryu
+# for vmware
+-e git://git.openstack.org/openstack/nova.git#egg=nova
+
+# for a bunch of plugins
+-e git://git.openstack.org/openstack/neutron.git@master#egg=neutron
+-e git://git.openstack.org/openstack/neutron-lbaas.git@master#egg=neutron-lbaas
+
+# for midonet
+-e git://github.com/midonet/python-midonetclient.git@master#egg=midonetclient
+
+-e git+https://git.openstack.org/stackforge/networking-arista.git#egg=networking-arista
+-e git+https://git.openstack.org/stackforge/networking-bagpipe-l2.git#egg=networking-bagpipe-l2
+-e git+https://git.openstack.org/stackforge/networking-bgpvpn.git#egg=networking-bgpvpn
+-e git+https://git.openstack.org/stackforge/networking-bigswitch.git#egg=networking-bigswitch
+-e git+https://git.openstack.org/stackforge/networking-brocade.git#egg=networking-brocade
+-e git+https://git.openstack.org/stackforge/networking-cisco.git#egg=networking-cisco
+-e git+https://git.openstack.org/stackforge/networking-edge-vpn.git#egg=networking-edge-vpn
+-e git+https://git.openstack.org/stackforge/networking-hyperv.git#egg=networking-hyperv
+-e git+https://git.openstack.org/stackforge/networking-ibm.git#egg=networking-ibm
+-e git+https://git.openstack.org/stackforge/networking-l2gw.git#egg=networking-l2gw
+# pip dependency installation failure
+-e git+https://git.openstack.org/stackforge/networking-midonet.git#egg=networking-midonet
+-e git+https://git.openstack.org/stackforge/networking-mlnx.git#egg=networking-mlnx
+-e git+https://git.openstack.org/stackforge/networking-nec.git#egg=networking-nec
+-e git+https://git.openstack.org/stackforge/networking-odl.git#egg=networking-odl
+-e git+https://git.openstack.org/stackforge/networking-ofagent.git#egg=networking-ofagent
+-e git+https://git.openstack.org/stackforge/networking-ovn.git#egg=networking-ovn
+-e git+https://git.openstack.org/stackforge/networking-ovs-dpdk.git#egg=networking-ovs-dpdk
+-e git+https://git.openstack.org/stackforge/networking-plumgrid.git#egg=networking-plumgrid
+-e git+https://git.openstack.org/stackforge/networking-portforwarding.git#egg=networking-portforwarding
+-e git+https://git.openstack.org/stackforge/networking-vsphere.git#egg=networking-vsphere
+-e git+https://git.openstack.org/stackforge/neutron-powervm.git#egg=neutron-powervm