# Devstack settings

# Each service you enable has the following meaning:
# onos-neutron - Add this config flag if ONOS controller and OpenStack
#                Controller are on different nodes.
# onos-server  - Add this config flag if ONOS controller and OpenStack
#                Controller are on the same node.
# onos-compute - Add this config flag for OpenStack Compute.
#
# NOTE: onos-server includes onos-neutron.
#
# An example of enabling all-in-one onos is below.
#enable_service onos-compute onos-server

# This can be overridden in the localrc file
ONOS_MODE=${ONOS_MODE:-allinone}

# ONOS_MODE is used to configure how devstack works with ONOS. You
# can configure this three ways:
#
# ONOS_MODE=allinone
# Use this mode if you want to run ONOS in this devstack instance. Useful
# for a single node deployment or on the control node of a multi-node
# devstack environment.
#
# ONOS_MODE=compute
# Use this for the compute nodes of a multi-node devstack install.
#
# ONOS_MODE=externalonos
# This installs the neutron code for ONOS, but does not attempt to
# manage ONOS in devstack. This is used for development environments
# similar to the allinone case except where you are using bleeding edge ONOS
# which is not yet released, and thus don't want it managed by
# devstack.


case $ONOS_MODE in
    allinone)
        enable_service onos-server onos-compute
        ;;
    externalonos)
        enable_service onos-neutron
        ;;
    compute)
        enable_service onos-compute
        ;;
    controller_only)
        enable_service onos-neutron
        ;;
esac
