#!/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=$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'
