blob: e672528a2dadc397ba8c2e7e03ecdbb3b66f01f5 [file] [log] [blame]
av-mido2c3428b2013-07-11 14:59:00 +09001# 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
12MIDONET_DIR=${MIDONET_DIR:-$DEST/midonet}
Ryu Ishimoto35f09662013-08-27 18:32:00 +090013MIDONET_API_PORT=${MIDONET_API_PORT:-8080}
14MIDONET_API_URL=${MIDONET_API_URL:-http://localhost:$MIDONET_API_PORT/midonet-api}
av-mido2c3428b2013-07-11 14:59:00 +090015
16# MidoNet client repo
17MIDONET_CLIENT_REPO=${MIDONET_CLIENT_REPO:-https://github.com/midokura/python-midonetclient.git}
18MIDONET_CLIENT_BRANCH=${MIDONET_CLIENT_BRANCH:-master}
Ryu Ishimoto35f09662013-08-27 18:32:00 +090019MIDONET_CLIENT_DIR=${MIDONET_CLIENT_DIR:-$MIDONET_DIR/python-midonetclient}
av-mido2c3428b2013-07-11 14:59:00 +090020
21# MidoNet OpenStack repo
22MIDONET_OS_REPO=${MIDONET_OS_REPO:-https://github.com/midokura/midonet-openstack.git}
23MIDONET_OS_BRANCH=${MIDONET_OS_BRANCH:-master}
Ryu Ishimoto35f09662013-08-27 18:32:00 +090024MIDONET_OS_DIR=${MIDONET_OS_DIR:-$MIDONET_DIR/midonet-openstack}
av-mido2c3428b2013-07-11 14:59:00 +090025MIDONET_SETUP_SCRIPT=${MIDONET_SETUP_SCRIPT:-$MIDONET_OS_DIR/bin/setup_midonet_topology.py}
26
av-mido2c3428b2013-07-11 14:59:00 +090027# Save trace setting
28MY_XTRACE=$(set +o | grep xtrace)
29set +o xtrace
30
31function configure_midonet() {
32 :
33}
34
35function init_midonet() {
36
37 # Initialize DB. Evaluate the output of setup_midonet_topology.py to set
Ryu Ishimoto35f09662013-08-27 18:32:00 +090038 # env variables for provider router ID.
39 eval `python $MIDONET_SETUP_SCRIPT $MIDONET_API_URL admin $ADMIN_PASSWORD admin provider_devices`
av-mido2c3428b2013-07-11 14:59:00 +090040 die_if_not_set $LINENO provider_router_id "Error running midonet setup script, provider_router_id was not set."
av-mido2c3428b2013-07-11 14:59:00 +090041
42 iniset /$Q_PLUGIN_CONF_FILE MIDONET provider_router_id $provider_router_id
av-mido2c3428b2013-07-11 14:59:00 +090043}
44
45function install_midonet() {
46 git_clone $MIDONET_CLIENT_REPO $MIDONET_CLIENT_DIR $MIDONET_CLIENT_BRANCH
47 git_clone $MIDONET_OS_REPO $MIDONET_OS_DIR $MIDONET_OS_BRANCH
48 export PYTHONPATH=$MIDONET_CLIENT_DIR/src:$MIDONET_OS_DIR/src:$PYTHONPATH
49}
50
51function start_midonet() {
52 :
53}
54
55function stop_midonet() {
56 :
57}
58
armando-migliaccioef1e0802014-01-02 16:33:53 -080059function check_midonet() {
60 :
61}
62
av-mido2c3428b2013-07-11 14:59:00 +090063# Restore xtrace
64$MY_XTRACE