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