# Unfail the B-to-A interface and display traffic
print('Unfail the interface from Node B to Node A')
model1.unfail_interface('B-to-A', 'B', True)
model1.update_simulation()
model1.display_interfaces_traffic()
print()

# test get_circuit call from Interface object
int1 = model1.get_interface_object('A-to-B', 'A')
ckt1 = int1.get_circuit_object(model1)
print("The circuit associated with %s is %s" % (int1, ckt1))
print()

# test a demand path before and after an interface it traverses fails;
# should go from 2 paths to one path
dmd_B_D = model1.get_demand_object('B', 'D')
print("dmd_B_D path before failing interface B-to-D is")
for path in dmd_B_D.path:
    pprint(path)
    print()
print()
model1.fail_interface('B-to-D', 'B')
model1.update_simulation()
print("dmd_B_D path after failing interface B-to-D is")
pprint(dmd_B_D.path)
print()


# Fail a node and interface and display a utilization graph
print("Failing node E and interface B-to-D on node B and displaying \
a network graph:")
# Unfail the B-to-A interface and display traffic
print("Unfail the interface from Node B to Node A")
model1.unfail_interface("B-to-A", "B", True)
model1.update_simulation()
model1.display_interfaces_traffic()
print()

# test get_circuit call from Interface object
int1 = model1.get_interface_object("A-to-B", "A")
ckt1 = int1.get_circuit_object(model1)
print("The circuit associated with %s is %s" % (int1, ckt1))
print()

# test a demand path before and after an interface it traverses fails;
# should go from 2 paths to one path
dmd_B_D = model1.get_demand_object("B", "D")
print("dmd_B_D path before failing interface B-to-D is")
for path in dmd_B_D.path:
    pprint(path)
    print()
print()
model1.fail_interface("B-to-D", "B")
model1.update_simulation()
print("dmd_B_D path after failing interface B-to-D is")
pprint(dmd_B_D.path)
print()


# Fail a node and interface and display a utilization graph
print(
    "Failing node E and interface B-to-D on node B and displaying \