X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=blobdiff_plain;f=csit%2Flibraries%2FClusterStateLibrary.py;h=ab5a643bb29d97a7ffb88f1ca612e5ef93cecd7d;hp=58240e084f04cae818dddbab284bf68e1d49bca7;hb=9a1a86700fb341c0f5f0700c5024da7975fd60ec;hpb=59e81c38620fa1b61e15771191e35771450b9499 diff --git a/csit/libraries/ClusterStateLibrary.py b/csit/libraries/ClusterStateLibrary.py index 58240e084f..ab5a643bb2 100644 --- a/csit/libraries/ClusterStateLibrary.py +++ b/csit/libraries/ClusterStateLibrary.py @@ -1,8 +1,3 @@ -__author__ = "Basheeruddin Ahmed" -__copyright__ = "Copyright(c) 2014, Cisco Systems, Inc." -__license__ = "New-style BSD" -__email__ = "syedbahm@cisco.com" - import SettingsLibrary from time import sleep import UtilLibrary @@ -10,6 +5,12 @@ import json import sys +__author__ = "Basheeruddin Ahmed" +__copyright__ = "Copyright(c) 2014, Cisco Systems, Inc." +__license__ = "New-style BSD" +__email__ = "syedbahm@cisco.com" + + def getClusterRoles(shardName, numOfShards=3, numOfTries=3, sleepBetweenRetriesInSecs=3, port=8181, *ips): """Given a shardname (e.g. shard-inventory-config), number of shards and bunch of ips @@ -59,7 +60,7 @@ def getClusterRoles(shardName, numOfShards=3, numOfTries=3, sleepBetweenRetriesI return dict -def isRole(role, shardName, ipAddress, numOfShards=3, numOfRetries=1, sleepFor=3, port=8181): +def isRole(role, shardName, ipAddress, numOfShards=3, numOfRetries=1, sleepFor=3, port=8181): """Given a role (Leader, Follower, Candidate, or IsolatedLeader), shardname (e.g. shard-inventory-config), controller IP address, and number of shards on the controller,this function determines if the controller,