X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tools%2Fclustering%2Fcluster-deployer%2Frestart.py;h=cf166f245777816c42738edc2cb17a0d20786c41;hb=1c106006ffb33c1c60e2f8abe61e88a7bd95a7bd;hp=044e03ee8b410744e8ef39288468d80c94086e49;hpb=e235045c2ad12d41416e2583609a0178c8bd9287;p=integration%2Ftest.git diff --git a/tools/clustering/cluster-deployer/restart.py b/tools/clustering/cluster-deployer/restart.py index 044e03ee8b..cf166f2457 100755 --- a/tools/clustering/cluster-deployer/restart.py +++ b/tools/clustering/cluster-deployer/restart.py @@ -11,15 +11,31 @@ import argparse from remote_host import RemoteHost -parser = argparse.ArgumentParser(description='Cluster Restart') -parser.add_argument("--rootdir", default="/root", - help="the root directory on the remote host where the distribution is deployed", required=True) -parser.add_argument("--hosts", default="", - help="a comma separated list of host names or ip addresses", required=True) -parser.add_argument("--clean", action="store_true", default=False, - help="clean the persistent data for the current deployment") -parser.add_argument("--user", default="root", help="the SSH username for the remote host(s)") -parser.add_argument("--password", default="Ecp123", help="the SSH password for the remote host(s)") +parser = argparse.ArgumentParser(description="Cluster Restart") +parser.add_argument( + "--rootdir", + default="/root", + help="the root directory on the remote host where the distribution is deployed", + required=True, +) +parser.add_argument( + "--hosts", + default="", + help="a comma separated list of host names or ip addresses", + required=True, +) +parser.add_argument( + "--clean", + action="store_true", + default=False, + help="clean the persistent data for the current deployment", +) +parser.add_argument( + "--user", default="root", help="the SSH username for the remote host(s)" +) +parser.add_argument( + "--password", default="Ecp123", help="the SSH password for the remote host(s)" +) args = parser.parse_args() @@ -29,7 +45,7 @@ def main(): # Connect to the remote host and start doing operations remote = RemoteHost(hosts[x], args.user, args.password, args.rootdir) remote.kill_controller() - if(args.clean): + if args.clean: remote.exec_cmd("rm -rf " + args.rootdir + "/deploy/current/odl/*journal") remote.exec_cmd("rm -rf " + args.rootdir + "/deploy/current/odl/snapshots") remote.start_controller(args.rootdir + "/deploy/current")