The test is failing because it assumes a json key
is always present when it is not. Test for it
before having the test fail.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
if label_list is not None:
label_list.add(in_label)
for nh in label_info["nexthops"]:
+ if "installed" not in nh.keys():
+ return "{} {} is not installed yet on {}".format(
+ in_label, label_info, router.name
+ )
if nh["installed"] != True or nh["type"] != "BGP":
return "{}, show mpls table, nexthop is not installed".format(
router.name