
27 Oct
2020
27 Oct
'20
3:59 p.m.
+set_mac2host() +{ + local queues + # use "," replace " " + queues=${queue/ /,}
btw, ${aa/ /,} will only replace first space, and will only replace one space. ${aa/ /,}: "a b c" => "a,b c" ${aa// /,}: "a b c" => "a,b,c" ${aa// /,}: "a b c" => "a,,b,,c" maybe you can use the follow method: echo $yca | sed -r 's/ +/,/g' -------- Thanks Yu Chuan
+ echo $queues + curl -X PUT "http://${SCHED_HOST:-172.17.0.1}:${SCHED_PORT:-3000}/set_host_mac?hostname=${hostname}&mac=${mac}&queues=${queues}" +} +set_mac2host
del_host_mac() { @@ -33,7 +42,7 @@ trap del_host_mac EXIT tbox_group=$hostname fi
- host=${tbox_group%%--*} + host=${tbox_group%.*}
create_yaml_variables "$LKP_SRC/hosts/${host}"
-- 2.23.0