Merge "ryu: minor updates for Ryu upstream change"

This commit is contained in:
Jenkins 2013-03-02 14:36:51 +00:00 committed by Gerrit Code Review
commit 48053c791d
2 changed files with 25 additions and 17 deletions

View File

@ -17,7 +17,9 @@ function quantum_plugin_install_agent_packages() {
_quantum_ovs_base_install_agent_packages _quantum_ovs_base_install_agent_packages
# quantum_ryu_agent requires ryu module # quantum_ryu_agent requires ryu module
install_package $(get_packages "ryu")
install_ryu install_ryu
configure_ryu
} }
function quantum_plugin_configure_common() { function quantum_plugin_configure_common() {

View File

@ -17,24 +17,15 @@ RYU_OFP_HOST=${RYU_OFP_HOST:-127.0.0.1}
RYU_OFP_PORT=${RYU_OFP_PORT:-6633} RYU_OFP_PORT=${RYU_OFP_PORT:-6633}
# Ryu Applications # Ryu Applications
RYU_APPS=${RYU_APPS:-ryu.app.simple_isolation,ryu.app.rest} RYU_APPS=${RYU_APPS:-ryu.app.simple_isolation,ryu.app.rest}
# Ryu configuration
RYU_CONF_CONTENTS=${RYU_CONF_CONTENTS:-"
--app_lists=$RYU_APPS
--wsapi_host=$RYU_API_HOST
--wsapi_port=$RYU_API_PORT
--ofp_listen_host=$RYU_OFP_HOST
--ofp_tcp_listen_port=$RYU_OFP_PORT
--quantum_url=http://$Q_HOST:$Q_PORT
--quantum_admin_username=$Q_ADMIN_USERNAME
--quantum_admin_password=$SERVICE_PASSWORD
--quantum_admin_tenant_name=$SERVICE_TENANT_NAME
--quantum_admin_auth_url=$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0
--quantum_auth_strategy=$Q_AUTH_STRATEGY
--quantum_controller_addr=tcp:$RYU_OFP_HOST:$RYU_OFP_PORT
"}
# configure_ryu can be called multiple times as quantum_pluing/ryu may call
# this function for quantum-ryu-agent
_RYU_CONFIGURED=${_RYU_CONFIGURED:-False}
function configure_ryu() { function configure_ryu() {
if [[ "$_RYU_CONFIGURED" == "False" ]]; then
setup_develop $RYU_DIR setup_develop $RYU_DIR
_RYU_CONFIGURED=True
fi
} }
function init_ryu() { function init_ryu() {
@ -46,6 +37,21 @@ function init_ryu() {
RYU_CONF=$RYU_CONF_DIR/ryu.conf RYU_CONF=$RYU_CONF_DIR/ryu.conf
sudo rm -rf $RYU_CONF sudo rm -rf $RYU_CONF
# Ryu configuration
RYU_CONF_CONTENTS=${RYU_CONF_CONTENTS:-"[DEFAULT]
app_lists=$RYU_APPS
wsapi_host=$RYU_API_HOST
wsapi_port=$RYU_API_PORT
ofp_listen_host=$RYU_OFP_HOST
ofp_tcp_listen_port=$RYU_OFP_PORT
quantum_url=http://$Q_HOST:$Q_PORT
quantum_admin_username=$Q_ADMIN_USERNAME
quantum_admin_password=$SERVICE_PASSWORD
quantum_admin_tenant_name=$SERVICE_TENANT_NAME
quantum_admin_auth_url=$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0
quantum_auth_strategy=$Q_AUTH_STRATEGY
quantum_controller_addr=tcp:$RYU_OFP_HOST:$RYU_OFP_PORT
"}
echo "${RYU_CONF_CONTENTS}" > $RYU_CONF echo "${RYU_CONF_CONTENTS}" > $RYU_CONF
} }
@ -62,7 +68,7 @@ function install_ryu() {
} }
function start_ryu() { function start_ryu() {
screen_it ryu "cd $RYU_DIR && $RYU_DIR/bin/ryu-manager --flagfile $RYU_CONF" screen_it ryu "cd $RYU_DIR && $RYU_DIR/bin/ryu-manager --config-file $RYU_CONF"
} }
function stop_ryu() { function stop_ryu() {