Browse code

Merge "Quantum/plugins/ryu: minor update for Quantum Ryu plugin"

Jenkins authored on 2013/02/10 13:55:49
Showing 4 changed files
... ...
@@ -1,4 +1,5 @@
1 1
 python-setuptools
2 2
 python-gevent
3 3
 python-gflags
4
+python-netifaces
4 5
 python-sphinx
... ...
@@ -1,4 +1,5 @@
1 1
 python-setuptools
2 2
 python-gevent
3 3
 python-gflags
4
+python-netifaces
4 5
 python-sphinx
... ...
@@ -15,6 +15,9 @@ function quantum_plugin_create_nova_conf() {
15 15
 
16 16
 function quantum_plugin_install_agent_packages() {
17 17
     _quantum_ovs_base_install_agent_packages
18
+
19
+    # quantum_ryu_agent requires ryu module
20
+    install_ryu
18 21
 }
19 22
 
20 23
 function quantum_plugin_configure_common() {
... ...
@@ -49,8 +49,16 @@ function init_ryu() {
49 49
     echo "${RYU_CONF_CONTENTS}" > $RYU_CONF
50 50
 }
51 51
 
52
+# install_ryu can be called multiple times as quantum_pluing/ryu may call
53
+# this function for quantum-ryu-agent
54
+# Make this function idempotent and avoid cloning same repo many times
55
+# with RECLONE=yes
56
+_RYU_INSTALLED=${_RYU_INSTALLED:-False}
52 57
 function install_ryu() {
53
-    git_clone $RYU_REPO $RYU_DIR $RYU_BRANCH
58
+    if [[ "$_RYU_INSTALLED" == "False" ]]; then
59
+        git_clone $RYU_REPO $RYU_DIR $RYU_BRANCH
60
+        _RYU_INSTALLED=True
61
+    fi
54 62
 }
55 63
 
56 64
 function start_ryu() {