mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-12-17 07:11:27 +01:00
onos-all: send CLI command to all cell nodes
Example: $ onos-all set TRACE org.onosproject.net.intent.impl.compiler.ProtectedTransportIntentCompiler Change-Id: I40dcf7b8a6e89b910eb5070eee6a1c312fb9689d
This commit is contained in:
parent
5691faf532
commit
c1e5f802bc
28
tools/test/bin/onos-all
Executable file
28
tools/test/bin/onos-all
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function _usage () {
|
||||||
|
cat << _EOF_
|
||||||
|
usage:
|
||||||
|
$(basename $0) (ONOS CLI commands)
|
||||||
|
|
||||||
|
summary:
|
||||||
|
Issue ONOS CLI commands to all the nodes defined in the current cell.
|
||||||
|
|
||||||
|
_EOF_
|
||||||
|
}
|
||||||
|
|
||||||
|
nodes=$(env | sort | egrep "^OC[0-9]+" | cut -d= -f2)
|
||||||
|
|
||||||
|
if [ "$#" -eq 0 ]; then
|
||||||
|
echo "Expecting ONOS CLI commands"
|
||||||
|
_usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ "$1" = "-h" ] && _usage && exit 0
|
||||||
|
[ "$1" = "--help" ] && _usage && exit 0
|
||||||
|
|
||||||
|
for node in $nodes; do
|
||||||
|
echo "Issuing command on $node.."
|
||||||
|
ssh -p 8101 -o StrictHostKeyChecking=no $node "$@"
|
||||||
|
done
|
||||||
Loading…
x
Reference in New Issue
Block a user