Skip to content

Commit

Permalink
add connect_topo command for testbed-cli.sh (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
lguohan authored Dec 25, 2017
1 parent 8eefbca commit 6c90e3b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ansible/testbed-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function usage
{
echo "testbed-cli. Interface to testbeds"
echo "Usage : $0 { start-vms | stop-vms } server-name vault-password-file"
echo "Usage : $0 { add-topo | remove-topo | renumber-topo } topo-name vault-password-file"
echo "Usage : $0 { add-topo | remove-topo | renumber-topo | connect-topo } topo-name vault-password-file"
echo "Usage : $0 { config-vm } topo-name vm-name vault-password-file"
echo "Usage : $0 { gen-mg | deploy-mg } topo-name vault-password-file"
echo
Expand All @@ -15,6 +15,7 @@ function usage
echo "To deploy a topology on a server: $0 add-topo 'topo-name' ~/.password"
echo "To remove a topology on a server: $0 remove-topo 'topo-name' ~/.password"
echo "To renumber a topology on a server: $0 renumber-topo 'topo-name' ~/.password" , where topo-name is target topology
echo "To connect a topology: $0 connect-topo 'topo-name' ~/.password"
echo "To configure a VM on a server: $0 config-vm 'topo-name' 'vm-name' ~/.password"
echo "To generate minigraph for DUT in a topology: $0 gen-mg 'topo-name' ~/.password"
echo "To deploy minigraph to DUT in a topology: $0 deploy-mg 'topo-name' ~/.password"
Expand Down Expand Up @@ -142,6 +143,15 @@ function config_vm
echo Done
}

function connect_topo
{
echo "Connect to Fanout"

read_file $1

ansible-playbook fanout_connect.yml -i veos --limit "$server" --vault-password-file="$2" -e "dut=$dut"
}

if [ $# -lt 3 ]
then
usage
Expand All @@ -158,6 +168,8 @@ case "$1" in
;;
renumber-topo) renumber_topo $2 $3
;;
connect-topo) connect_topo $2 $3
;;
config-vm) config_vm $2 $3 $4
;;
gen-mg) generate_minigraph $2 $3
Expand Down

0 comments on commit 6c90e3b

Please sign in to comment.