#!/bin/bash
# ONOS developer BASH profile conveniences
# Simply include in your own .bash_aliases or .bash_profile

# Root of the ONOS source tree
export ONOS_ROOT=${ONOS_ROOT:-~/onos}

# This is a hack to remove symlinks from the ONOS_ROOT path. To be removed when
# the protobuf buck rules can handle symlinks
ONOS_ROOT=$(pushd $ONOS_ROOT >/dev/null && pwd -P && popd >/dev/null)

# Setup some environmental context for developers
if [ -z "${JAVA_HOME}" ]; then
    if [ -x /usr/libexec/java_home ]; then
        export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
    elif [ -d /usr/lib/jvm/java-8-oracle ]; then
        export JAVA_HOME="/usr/lib/jvm/java-8-oracle"
    elif [ -d /usr/lib/jvm/java-8-openjdk-amd64 ]; then
        export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
    fi
fi

export MAVEN=${MAVEN:-~/Applications/apache-maven-3.3.9}

# Clean up Karaf environment variables to avoid issues when switching from ONOS 1.x to 2.x
unset KARAF_VERSION KARAF_ROOT KARAF_LOG

# Setup a path
export PATH="$PATH:$ONOS_ROOT/tools/dev/bin"
export PATH="$PATH:$ONOS_ROOT/tools/test/bin:$ONOS_ROOT/tools/test/scenarios/bin"
export RUN_PACK_PATH=${RUN_PACK_PATH:-$ONOS_ROOT/tools/package/runtime/bin}
export PATH="$RUN_PACK_PATH:$PATH"
export PATH="$PATH:$ONOS_ROOT/tools/build"
export PATH="$PATH:$MAVEN/bin"

# Setup cell enviroment
export ONOS_CELL=${ONOS_CELL:-local}

# Setup default web user/password
export ONOS_WEB_USER=onos
export ONOS_WEB_PASS=rocks

# Setup default location of test scenarios
export ONOS_SCENARIOS=$ONOS_ROOT/tools/test/scenarios

# Setup path to Mininet custom scripts
export ONOS_MN_PY=$ONOS_ROOT/tools/dev/mininet/onos.py
export BMV2_MN_PY=$ONOS_ROOT/tools/dev/mininet/bmv2.py

# Convenience utility to warp to various ONOS source projects
# e.g. 'o api', 'o dev', 'o'
function o {
    cd $(find $ONOS_ROOT/ -type d -and \( -name 'bazel-*' -o -name 'buck-out' -o -name '.git' -o -name 'target' -o -name 'gen-src' -o -name 'src' \) -prune -o -type d | \
        egrep "${1:-$ONOS_ROOT}" | awk '{print length($1)"\t"$1}'  | sort -n | cut -f2 | head -n 1)
}

# Buck (if "buck" is not on the PATH)
[ -z "$(which buck)" ] && alias buck="onos-buck"

# Short-hand for ONOS build, package and test.
alias op="SHLVL=1 bazel build //:onos"
alias ot="bazel run //:buildifier_check && bazel query 'tests(//...)' | grep -v "coverage" | SHLVL=1 xargs bazel test --test_summary=terse --test_output=errors"
alias ob="op && ot"
alias obd="SHLVL=1 bazel build //docs:external //docs:internal"

alias ok="SHLVL=1 bazel run onos-local --"
alias oh="onos localhost halt"

alias ol='onos-log'
alias ow='onos-watch'
alias ocl='onos-check-logs'
alias oi='setPrimaryInstance'

# Short-hand for tailing and searching the ONOS (karaf) log
alias tl='$ONOS_ROOT/tools/dev/bin/onos-local-log'
# alias gl='grep $KARAF_LOG --colour=auto -E -e '

function filterLocalLog {
    tl | grep --colour=always -E -e "${1-org.onlab|org.onosproject}"
}
alias tlo='filterLocalLog'
alias tle='tlo "ERROR|WARN|Exception|Error"'

function filterLog {
    ol | grep --colour=always -E -e "${1-org.onlab|org.onosproject}"
}
alias olo='filterLog'
alias ole='olo "ERROR|WARN|Exception|Error"'

# Pretty-print JSON output
alias pp='python -m json.tool'

# Short-hand to launch Java API docs, REST API docs and ONOS GUI
alias docs='open $ONOS_ROOT/docs/target/site/apidocs/index.html'
alias rsdocs='onos-rsdocs'
alias gui='onos-gui'

# Short-hand for 'mvn clean install' for us lazy folk
alias mci='mvn clean install'

# Git annotated one-line log
alias gil='git log --oneline --decorate=short'

# Test related conveniences

# SSH to a specified ONOS instance
alias sshctl='onos-ssh'
alias sshnet='onos-ssh $OCN'

# Runs a sequence of STC scenarios until the first failure.
function stcs {
    for s in "$@"; do
        if [[ $s =~ ^[0-9]*$ ]]; then
            printf "Waiting %d seconds...\n" $s
            sleep $s
        else
            printf "Running scenario %s...\n" $s
            stc $s || return 1
        fi
    done
}

# Applies the settings in the specified topology recipe file or lists current
# topo recipe definition if no topo recipe file is given.
function topo {
    topo=${1:-""}
    case "$topo" in
    "")
        env | egrep "ONOS_TOPO"
        env | egrep "(OTD|OTL|OTH)="
        ;;

    *)
        [ ! -f $ONOS_ROOT/tools/test/topos/$1.recipe ] && echo "No such topo recipe: $1" >&2 && return 1
        unset ONOS_TOPO OTD OTL OTH ONOS_DEVICES ONOS_HOSTS
        ONOS_DEVICES=""
        ONOS_HOSTS=""
        unset $(env | sed -n 's:\(^OT[DLH][0-9]\{1,\}\)=.*:\1 :g p')
        export ONOS_TOPO=$1
        . $ONOS_ROOT/tools/test/topos/$1.recipe
        let d=1; while [ $d -le $OTD ]; do
            dev="$(printf 'of:%016x' $d)"
            export OTD$d=$dev; export ONOS_DEVICES="$ONOS_DEVICES $dev"
            let d=d+1;
        done
        let h=1; while [ $h -le $OTH ]; do
            host="$(printf '00:00:00:00:00:%02x/-1' $h)"
            export OTH$h=$host; export ONOS_HOSTS="$ONOS_HOSTS $host"
            let h=h+1
        done
        topo
    esac
}

# Lists available topo recipes
function topos {
    for topo in $(ls -1 $ONOS_ROOT/tools/test/topos/*.recipe); do
        name=$(basename $topo .recipe)
        printf "%-16s  %s\n" \
            "$([ $name = $ONOS_TOPO ] && echo $name '*' || echo $name)" \
            "$(grep '^#' $topo | head -n 1)"
    done
}

# Sets the primary instance to the specified instance number.
function setPrimaryInstance {
    export ONOS_INSTANCES=$(env | grep 'OC[0-9]*=' | sort | cut -d= -f2)

    if [ -z "${OCC1-}" ]; then
        aux=/tmp/cell-$$.aux
        let i=1
        for n in $ONOS_INSTANCES; do
            echo "export OCC$i=$n" >> $aux
            let i=i+1
        done
        [ -f $aux ] && source $aux && rm $aux
    fi

    export ONOS_CORES=$(env | grep 'OCC[0-9]*=' | sort | cut -d= -f2)
    export OCI=$(env | egrep "OC[0-9]+" | sort | egrep OC${1:-1} | cut -d= -f2)
    echo $OCI
}

# Sets minority (OCMI) and majority (OCMA) variables
function setMinorityMajority {
    nodes=($(env | grep 'OC[0-9]*=' | sort | cut -d= -f2))
    min=1
    maj=1
    node_count="${#nodes[@]}"
    if [ $node_count -gt 1 ]; then
        middle=$(expr "$node_count" / "2")
        index=0
        for node in "${nodes[@]}"; do
            if [ "$index" -gt "$middle" ]; then
                export OCMI${min}=${node}
                min=$(expr $min + 1)
            else
                export OCMA${maj}=${node}
                maj=$(expr $maj + 1)
            fi
            index=$(expr $index + 1)
        done
    fi
}

# Open Networking Foundation shared test cell warden address
export CELL_WARDEN="10.192.19.72"
export CELL_SLAVE_1=$CELL_WARDEN
export CELL_SLAVE_2="10.192.19.71"
export CELL_SLAVE_3="10.192.19.70"
export CELL_SLAVE_4="10.192.19.77"   # disabled
export CELL_SLAVES="$CELL_SLAVE_1 $CELL_SLAVE_2 $CELL_SLAVE_3"

# Clears cell environment
function clearCell {
    unset ONOS_CELL ONOS_NIC ONOS_IP ONOS_APPS ONOS_BOOT_FEATURES
    unset OCI OCN OCT ONOS_INSTANCES ONOS_CORES ONOS_FEATURES
    unset ONOS_USER ONOS_GROUP ONOS_WEB_USER ONOS_WEB_PASS
    unset $(env | sed -n 's:\(^OC[0-9]\{1,\}\)=.*:\1 :g p')
    unset $(env | sed -n 's:\(^OCC[0-9]\{1,\}\)=.*:\1 :g p')
    unset $(env | sed -n 's:\(^OCMI[0-9]\{1,\}\)=.*:\1 :g p')
    unset $(env | sed -n 's:\(^OCMA[0-9]\{1,\}\)=.*:\1 :g p')
}

# Applies the settings in the specified cell file or lists current cell definition
# if no cell file is given.
function cell {
    cell=${1:-""}
    case "$cell" in
    "borrow")
        clearCell
        aux="/tmp/cell-$$"
        duration=${2:-0}
        spec=${3:-5+3+1}
        spec=${spec//+/%2B}
        user=${4:-$(id -un)}
        hint=${5:-""}
        query="duration=$duration&spec=$spec&user=$user&cellNameHint=$hint"
        curl -sS -X POST "http://$CELL_WARDEN:4321/?$query" -d "$(cat ~/.ssh/id_rsa.pub)" > $aux
        . $aux
        rm -f $aux
        # This is a hack to get master running on the existing cell infrastructure
        apps=${ONOS_APPS:-}
        export ONOS_APPS=$ONOS_APPS,gui
        setPrimaryInstance 1 >/dev/null
        setMinorityMajority >/dev/null
        onos-verify-cell
        topo default >/dev/null
        ;;
    "return")
        curl -sS -X DELETE "http://$CELL_WARDEN:4321/?user=${2:-$(id -un)}"
        clearCell
        ;;

    "status")
        curl -sS "http://$CELL_WARDEN:4321/" | sort
        ;;

    "")
        env | egrep "^ONOS_CELL"
        env | egrep "^OCC[0-9]+" | sort
        env | egrep "^OC[0-9]+" | sort
        env | egrep "^OC[INT]" | sort
        env | egrep "^ONOS_" | egrep -v 'ONOS_ROOT|ONOS_CELL|ONOS_INSTANCES|ONOS_CORES|ONOS_DEVICES|ONOS_HOSTS' | sort
        ;;

    *)
        [ ! -f $ONOS_ROOT/tools/test/cells/$1 ] && echo "No such cell: $1" >&2 && return 1
        clearCell
        export ONOS_USER=sdn
        export ONOS_GROUP=sdn
        export ONOS_WEB_USER=onos
        export ONOS_WEB_PASS=rocks
        export ONOS_CELL=$1
        . $ONOS_ROOT/tools/test/cells/$1
        setPrimaryInstance 1 >/dev/null
        cell
        topo default >/dev/null
    esac
}

[ -n "$ONOS_CELL" -a "$ONOS_CELL" != "borrow" ] && cell $ONOS_CELL > /dev/null

# Lists available cells
function cells {
    for cell in $(ls -1 $ONOS_ROOT/tools/test/cells); do
        printf "%-16s  %s\n" \
            "$([ ! -z $ONOS_CELL ] && [ $cell = $ONOS_CELL ] && echo $cell '*' || echo $cell)" \
            "$(grep '^#' $ONOS_ROOT/tools/test/cells/$cell | head -n 1)"
    done
}

# Find a process by regex
function spy {
    ps -ef | egrep "$@" | grep -v egrep
}

# Kill a process by regex
function nuke {
    spy "$@" | cut -c7-11 | xargs kill
}

# Edit a cell file by providing a cell name; opens the cell file in $EDITOR.
function vicell {
    local apply=false
    local create=false
    local ${cdf:=$ONOS_CELL}
    local cpath="${ONOS_ROOT}/tools/test/cells/"

    if [ "$1" = "-h" ] ; then
        printf "usage: vicell [file] [options]\n\noptions:\n"
        printf "\t[file]: cell name (default: current cell)\n"
        printf "\t-a: apply the cell after editing\n"
        printf "\t-e: [editor] set EDITOR to [editor] (default: *vi*)\n"
        printf "\t-c: create cell file if none exist\n\n"
        return 1
    fi

    while [ $# -gt 0 ]; do
        case "$1" in
            -a) apply=true ;;
            -e) EDITOR=$2; shift ;;
            -c) create=true ;;
            *) cdf="$1" ;;
        esac
        shift
    done

    if [ ! -e "${cpath}${cdf}" ] && ! ($create) ; then
        printf "${cdf} : no such cell\n" && return 1
    fi

    if [ -z "${EDITOR}" ] || [ -x "$(which ${EDITOR})" ]; then
        unset EDITOR && vi ${cpath}${cdf}
    else
        $EDITOR ${cpath}${cdf}
    fi
    ($apply) && cell ${cdf}
}

# Autocomplete for certain utilities
. ${ONOS_ROOT}/tools/test/bin/ogroup-opts


# Load AT&T MPLS topo GEO data
alias atttopo='onos-netcfg $OCI $ONOS_ROOT/tools/test/topos/attmpls-cfg.json'

# Load UK topo GEO data
alias uktopo='onos-netcfg $OCI $ONOS_ROOT/tools/test/topos/uk-cfg.json'

# Mininet command that uses BMv2 instead of OVS
alias mn-bmv2='sudo -E mn --custom $BMV2_MN_PY --switch onosbmv2 --controller remote,ip=$OC1'
alias mn-stratum='sudo -E mn --custom $BMV2_MN_PY --switch stratum --controller remote,ip=$OC1'
