diff options
author | juraj.linkes <jlinkes@cisco.com> | 2017-04-04 15:04:47 +0200 |
---|---|---|
committer | juraj.linkes <jlinkes@cisco.com> | 2017-05-03 15:23:35 +0200 |
commit | e385c470ca3c58d5038d50a86380847bb6a5a56b (patch) | |
tree | 24d04da8a20290de37053589fdba9cc31d9e6b70 /scripts/service.sh | |
parent | d00c547178fdf5637a3b42112f5c3e6ae29fb260 (diff) |
Reworked helper scripts and fixed typos
Added scripts for odl handling
Change-Id: Idf715e1c8357a52ef1cd93f58b87c0b92211f85b
Signed-off-by: juraj.linkes <jlinkes@cisco.com>
Diffstat (limited to 'scripts/service.sh')
-rwxr-xr-x | scripts/service.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/service.sh b/scripts/service.sh new file mode 100755 index 0000000..ff458bc --- /dev/null +++ b/scripts/service.sh @@ -0,0 +1,11 @@ +#!/bin/bash +if [[ $# -ne 2 ]] +then + echo "Must have at least two arguments. The first is name of the service and the second is the action to be done with the service." + exit 1 +fi +for odl_hostname in `grep -Eo 'overcloud-controller-[0-9]' /etc/hosts` +do + echo "Executing service $1 $2 on $odl_hostname" + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $odl_hostname service $1 $2 2> /dev/null +done |