Skip to content

Commit abd7fcf

Browse files
committed
testenv: Fix up command for setting up redirect maps
Needed a bit of documentation, and also renamed the command to make it shorter and fit better with the other names. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
1 parent 0ec0dd3 commit abd7fcf

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

testenv/testenv.sh

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,11 @@ print_alias()
401401
}
402402

403403
#
404-
# This command can be used to set maps for the assignment 3 of the
404+
# This command can be used to populate maps for the assignment 3 of the
405405
# packet03-redirecting lesson. It takes two arguments: the source and the
406-
# destination interface names.
406+
# destination environment names.
407407
#
408-
set_redirect_map()
408+
populate_redirect_map()
409409
{
410410
local src="$1"
411411
local dest="$2"
@@ -448,19 +448,19 @@ usage()
448448
echo "Usage: $0 [options] <command> [param]"
449449
echo ""
450450
echo "Commands:"
451-
echo "setup Setup and initialise new environment"
452-
echo "teardown Tear down existing environment"
453-
echo "reset Reset environment to original state"
454-
echo "exec <command> Exec <command> inside test environment"
455-
echo "enter Execute shell inside test environment"
456-
echo "ping Run ping inside test environment"
457-
echo "alias Print shell alias for easy access to this script"
458-
echo "status (or st) Show status of test environment"
459-
echo "load Load XDP program on outer interface"
460-
echo "unload Unload XDP program on outer interface"
461-
echo "tcpdump Run on outer interface (or inner with --inner)"
462-
echo "stats Run the XDP statistics program"
463-
echo "set_redirect_map Setup redirect maps for packet03 lessons"
451+
echo "setup Setup and initialise new environment"
452+
echo "teardown Tear down existing environment"
453+
echo "reset Reset environment to original state"
454+
echo "exec <command> Exec <command> inside test environment"
455+
echo "enter Execute shell inside test environment"
456+
echo "ping Run ping inside test environment"
457+
echo "alias Print shell alias for easy access to this script"
458+
echo "status (or st) Show status of test environment"
459+
echo "load Load XDP program on outer interface"
460+
echo "unload Unload XDP program on outer interface"
461+
echo "tcpdump Run on outer interface (or inner with --inner)"
462+
echo "stats Run the XDP statistics program"
463+
echo "redirect <env1> <env2> Setup redirects for packet03 lessons"
464464
echo ""
465465

466466
if [ -z "$FULL" ] ; then
@@ -570,9 +570,8 @@ case "$1" in
570570
ping|tcpdump)
571571
CMD="run_$1"
572572
;;
573-
set_redirect_map)
574-
CMD="set_redirect_map $2 $3"
575-
shift 2
573+
redirect)
574+
CMD=populate_redirect_map
576575
;;
577576
"alias")
578577
print_alias

0 commit comments

Comments
 (0)