Home › Forums › FABRIC General Questions and Discussion › Cannot iterate over interfaces on a network in FABlib v1.9.0
- This topic has 10 replies, 4 voices, and was last updated 2 months, 2 weeks ago by Nirmala Shenoy. 
- 
		AuthorPosts
- 
		
			
				
August 7, 2025 at 11:06 am #8783The following code and FabLib calls worked in v1.8.0: for network in slice.get_networks(): print("NETWORK:") print(f"\t{network}") for intf in network.get_interfaces(): print("INTERFACES:") print(f"\t{intf}")But, when running in v1.9.0, intf is always a blank list. If you grab the interfaces directly (get_interfaces()), it works fine. I haven’t dug into the source code on GitHub yet, but I figured I’d ask first to see if I’m working with deprecated functions or something like that. - 
		This topic was modified 2 months, 3 weeks ago by Peter Willis. 
 August 7, 2025 at 11:15 am #8785Hi Peter, Possibly a bug, however, I tried doing this with my existing slice and it seems to work. Is there a specific sequence in which you are running this code? Just trying to reproduce this on my end. Code Snippet of my trials: from fabrictestbed_extensions.fablib.fablib import FablibManager as fablib_manager from ipaddress import ip_address, IPv4Address, IPv6Address, IPv4Network, IPv6Network fablib = fablib_manager() slice = fablib.get_slice(slice_name) for nw in slice.get_networks(): print(nw) for ifc in slice.get_interfaces(): print(ifc)Thanks, Komal P.S: we did roll out some improvements w.r.t to how often the interfaces are updated to limit the number of ssh connections. - 
		This reply was modified 2 months, 3 weeks ago by Komal Thareja. 
 August 7, 2025 at 11:31 am #8787In my case, it’s specifically when iterating over the interfaces on a given network, so slice.get_interfaces() works fine, but nw.get_interfaces() and using that to iterate over the interfaces of nw would not work. August 8, 2025 at 12:08 pm #8788hello Komal, we are configuring IP addresses in an OSPF network. so the link that is common to a pair of nodes is given the same network address. I tried the script with f for ifc in slice.get_interfaces(): the addressing assignment is going wrong. can you please suggest how we can fix this? thanks August 8, 2025 at 1:16 pm #8789Hi Nirmala, Could you please try using the fablib from this branch: https://github.com/fabric-testbed/fabrictestbed-extensions/tree/rel1.9.1 ? nw.get_interfaces() should work now. I plan to push this main branch Monday. I’ll keep you posted. Please let me know if this resolves the issue. Thanks, Komal 1 user thanked author for this post.August 8, 2025 at 3:35 pm #8790I gave it a try and then went back to 1.9.0 to double-check. It is working as intended in 1.9.1. Thank you! August 8, 2025 at 5:12 pm #8791thanks a lot Komal. peter checked it and looks like it worked. I will be trying it now . August 11, 2025 at 1:34 pm #8792Hi Nirmala/Peter, fabrictestbed-extensions==1.9.1is pushed to pypi and available inBleeding EdgeJH container.This version contains the fix for the get_interfaces.Thanks, Komal August 11, 2025 at 1:41 pm #8794Thanks Komal, the fix that Peter used was to download the 1.9.1 version from the github by changing the requirements.txt in fabric_config. do we need to do anything else to get the updated 1.9.1 version that you state above? thanks Nirmala August 11, 2025 at 1:45 pm #8795Peter’s fix should still work Nirmala! Thanks, Komal August 11, 2025 at 1:51 pm #8796OK KomalĀ thanks 
- 
		This topic was modified 2 months, 3 weeks ago by 
- 
		AuthorPosts
- You must be logged in to reply to this topic.
