- This topic has 2 replies, 2 voices, and was last updated 2 months, 3 weeks ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forums › FABRIC General Questions and Discussion › Error when creating a slice
Hello,
Before the updates to the testbed, this code worked:
slice_name = 'test' # create slize
slice = fablib.new_slice(name=slice_name)
vm_names = ['p4switch', 'master']
for vm_name in vm_names:
node = slice.add_node(name=vm_name, site='RUTG', image='default_ubuntu_20')
node.set_capacities(cores=2, ram=6, disk=10)
node.add_component(model='NIC_Basic', name='if1')
p4_node = slice.get_node('p4switch')
for i in range(2, 13):
p4_node.add_component(model='NIC_Basic', name=f'if{i}')
bridges = {}
bridges['ms'] = slice.add_l2network(name=br)
bridges['ms'].add_interface(p4_node.get_interface('p4switch-if1-p1'))
Now it fails with an error:
Exception: Interface not found: p4switch-if1-p1
The error is fixed by replacing variable p4_node with slice.get_node(‘p4switch’) at the last line (basically, re-fetching the node). Why would I get the error without this change? Thank you.
Hi Garegin,
Thank you for sharing your observation. There was performance fix to improve how the interfaces are handled in the fablib. I suspect this may have introduced this issue. I will investigate this and post a fix once ready.
For now, please use the workaround as you suggested. Apologies for the inconvenience.
Thanks,
Komal
Hi Garegin,
fabrictestbed-extensions==1.9.1 is pushed to pypi and available in Bleeding Edge JH container.
This version contains the fix for the get_interface.
Thanks,
Komal