# Java major version required to run OpenDaylight: 7, 8, ...
# by default, ODL uses jdk 8 as of Boron
export ODL_REQUIRED_JAVA_VERSION=${ODL_REQUIRED_JAVA_VERSION:-8}

# karaf distribution name of ODL to download
export ODL_NAME=${ODL_NAME:-distribution-karaf-${ODL_BUNDLEVERSION}}

# The network virtualization older feature name (ovsdb based)
export ODL_NETVIRT_KARAF_FEATURE_OVSDB=${ODL_NETVIRT_KARAF_FEATURE_OVSDB:-odl-ovsdb-openstack}

# The network virtualization newer feature name (vpnservice based)
export ODL_NETVIRT_KARAF_FEATURE_VPNSERVICE=${ODL_NETVIRT_KARAF_FEATURE_VPNSERVICE:-odl-netvirt-openstack}

ODL_NETVIRT_KARAF_FEATURE_DEFAULT=odl-neutron-service,odl-restconf-all,odl-aaa-authn,odl-dlux-core,odl-mdsal-apidocs,$ODL_NETVIRT_KARAF_FEATURE_OVSDB
# odl-neutron-logger has been introduced from Boron release
case "$ODL_BUNDLEVERSION" in
    # in Helium case, ODL_NETVIRT_KARAF_FEATURE is defined
    # so ODL_NETVIRT_KARAF_FEATURE_DEFAULT doesn't matter
    0.3.?-Lithium-SR?|0.4.0-Beryllium|0.4.?-Beryllium-SR?|0.4.?-SNAPSHOT)
        ;;
    *)
        # 0.5.?-Boron-SR?|0.5.?-SNAPSHOT|0.6.?-SNAPSHOT)
        ODL_NETVIRT_KARAF_FEATURE_DEFAULT=$ODL_NETVIRT_KARAF_FEATURE_DEFAULT,odl-neutron-logger
        ;;
esac

# The network virtualization feature used by opendaylight loaded by Karaf
export ODL_NETVIRT_KARAF_FEATURE=${ODL_NETVIRT_KARAF_FEATURE:-$ODL_NETVIRT_KARAF_FEATURE_DEFAULT}

# The url that this version of ODL netvirt can use to know ODL is fully up
export ODL_BOOT_WAIT_URL=${ODL_BOOT_WAIT_URL:-restconf/operational/network-topology:network-topology/topology/netvirt:1}
