X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=test%2Ftools%2Fclustering%2Fcluster-monitor%2Frejoin.py;fp=test%2Ftools%2Fclustering%2Fcluster-monitor%2Frejoin.py;h=0000000000000000000000000000000000000000;hb=59e81c38620fa1b61e15771191e35771450b9499;hp=92507a0ffd28bc627cceba4b127153a8631c459c;hpb=072f6e3a8d1bdf8f4c663843589c22d93ba07791;p=integration%2Ftest.git diff --git a/test/tools/clustering/cluster-monitor/rejoin.py b/test/tools/clustering/cluster-monitor/rejoin.py deleted file mode 100644 index 92507a0ffd..0000000000 --- a/test/tools/clustering/cluster-monitor/rejoin.py +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/python -""" -Cluster Rejoin Tool -Author: Phillip Shea -Updated: 2015-May-07 - -This tool rejoins any isolated controllers to the cluster. - -A file named 'cluster.json' containing a list of the IP addresses and -credentials of the controllers is required. It resides in the same -directory as monitor.py. - -The file should look like this: - - { - "cluster": { - "controllers": [ - "172.17.10.93", - "172.17.10.94", - "172.17.10.95" - ], - "user": "username", - "pass": "password" - } - } - -Usage:python rejoin.py - """ - -import sys -sys.path.append('../../../csit/libraries') -import UtilLibrary -import json - -try: - with open('cluster.json') as cluster_file: - data = json.load(cluster_file) -except: - print str(sys.exc_info()) - print "unable to open the file cluster.json" - exit(1) -try: - cluster_list = data["cluster"]["controllers"] - user_name = data["cluster"]["user"] - user_pass = data["cluster"]["pass"] -except: - print str(sys.exc_info()) - print 'Error reading the file cluster.json' - exit(1) - -print UtilLibrary.flush_iptables(cluster_list, user_name, user_pass)