#!/bin/bash

set -e

host="${1:-all}"

if [ "${host}" = "cross" ]; then
  ngcp-parallel-ssh "all" "ngcp-check-cluster-ssh all"
else
  echo "Checking connectivity from $(hostname) host to the following hosts:"
  ngcp-parallel-ssh -t 5 "${host}" "true"
fi
