aci_gw.j2 715 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. usage="$0 start"
  3. if [ $# -ne 1 ]; then
  4. echo USAGE: $usage
  5. exit 1
  6. fi
  7. case $1 in
  8. start)
  9. set -e
  10. docker run --net=host \
  11. -e "APIC_URL={{ apic_url }}" \
  12. -e "APIC_USERNAME={{ apic_username }}" \
  13. -e "APIC_PASSWORD={{ apic_password }}" \
  14. -e "APIC_LEAF_NODE={{ apic_leaf_nodes }}" \
  15. -e "APIC_PHYS_DOMAIN={{ apic_phys_dom }}" \
  16. -e "APIC_EPG_BRIDGE_DOMAIN={{ apic_epg_bridge_domain }}" \
  17. -e "APIC_CONTRACTS_UNRESTRICTED_MODE={{ apic_contracts_unrestricted_mode }}" \
  18. --name=contiv-aci-gw \
  19. contiv/aci-gw
  20. ;;
  21. stop)
  22. # don't stop on error
  23. docker stop contiv-aci-gw
  24. docker rm contiv-aci-gw
  25. ;;
  26. *)
  27. echo USAGE: $usage
  28. exit 1
  29. ;;
  30. esac