#!/usr/bin/env bash
# onos-vm-install/templates/cord_loader.sh.j2
# loads/activates .oar CORD app files into ONOS instance

export ONOS_WEB_USER={{ onos_web_user }}
export ONOS_WEB_PASS={{ onos_web_pass }}

BASEDIR=$(dirname "$0") # current directory of script

{% for cord_app in cord_apps %}
${BASEDIR}/onos-app {{ onos_cord_vm_hostname }} install ${BASEDIR}/{{ cord_app.name }}.oar
${BASEDIR}/onos-app {{ onos_cord_vm_hostname }} activate {{ cord_app.onos_name }}
{% endfor %}

