| Sean Dague | e263c82 | 2014-12-05 14:25:28 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # | ||||
| av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 3 | # MidoNet |
| 4 | # ------- | ||||
| 5 | |||||
| 6 | # This file implements functions required to configure MidoNet as the third-party | ||||
| 7 | # system used with devstack's Neutron. To include this file, specify the following | ||||
| 8 | # variables in localrc: | ||||
| 9 | # | ||||
| 10 | # * enable_service midonet | ||||
| 11 | # | ||||
| 12 | |||||
| 13 | # MidoNet devstack destination dir | ||||
| 14 | MIDONET_DIR=${MIDONET_DIR:-$DEST/midonet} | ||||
| 15 | |||||
| 16 | # MidoNet client repo | ||||
| 17 | MIDONET_CLIENT_REPO=${MIDONET_CLIENT_REPO:-https://github.com/midokura/python-midonetclient.git} | ||||
| 18 | MIDONET_CLIENT_BRANCH=${MIDONET_CLIENT_BRANCH:-master} | ||||
| Ryu Ishimoto | 35f0966 | 2013-08-27 18:32:00 +0900 | [diff] [blame] | 19 | MIDONET_CLIENT_DIR=${MIDONET_CLIENT_DIR:-$MIDONET_DIR/python-midonetclient} |
| av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 20 | |
| av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 21 | # Save trace setting |
| Dean Troyer | e3a9160 | 2014-03-28 12:40:56 -0500 | [diff] [blame] | 22 | MN3_XTRACE=$(set +o | grep xtrace) |
| av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 23 | set +o xtrace |
| 24 | |||||
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 25 | function configure_midonet { |
| av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 26 | : |
| 27 | } | ||||
| 28 | |||||
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 29 | function init_midonet { |
| Ryu Ishimoto | 18d5c83 | 2014-02-19 00:33:46 +0900 | [diff] [blame] | 30 | : |
| av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 31 | } |
| 32 | |||||
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 33 | function install_midonet { |
| av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 34 | git_clone $MIDONET_CLIENT_REPO $MIDONET_CLIENT_DIR $MIDONET_CLIENT_BRANCH |
| Ryu Ishimoto | 18d5c83 | 2014-02-19 00:33:46 +0900 | [diff] [blame] | 35 | export PYTHONPATH=$MIDONET_CLIENT_DIR/src:$PYTHONPATH |
| av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 36 | } |
| 37 | |||||
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 38 | function start_midonet { |
| av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 39 | : |
| 40 | } | ||||
| 41 | |||||
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 42 | function stop_midonet { |
| av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 43 | : |
| 44 | } | ||||
| 45 | |||||
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 46 | function check_midonet { |
| armando-migliaccio | ef1e080 | 2014-01-02 16:33:53 -0800 | [diff] [blame] | 47 | : |
| 48 | } | ||||
| 49 | |||||
| av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 50 | # Restore xtrace |
| Dean Troyer | e3a9160 | 2014-03-28 12:40:56 -0500 | [diff] [blame] | 51 | $MN3_XTRACE |