rest_get is called to retrieve shard information twice, once without a
try block, and again in a try block. When a controller is down, the
first one fails, so the try block is useless (and the user ends up
with an obscure error message).
This patch removes the first, useless call.
Change-Id: I2f6753d71250e3911fbcbbdd31a8b2f595c663c9
Signed-off-by: Stephen Kitt <skitt@redhat.com>
url = "http://" + controller["ip"] + ":" + controller["port"] + "/jolokia/read/org.opendaylight.controller:"
url += "Category=ShardManager,name=shard-manager-" + data_store.lower()\
+ ",type=Distributed" + data_store + "Datastore"
- rest_get(url, username, password)
try:
data = rest_get(url, username, password)
except: