- This topic has 1 reply, 2 voices, and was last updated 5 months, 1 week ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › FABRIC General Questions and Discussion › Bug / footgun calling slice.delete()
If you call slice.delete() on a slice that hasn’t been submitted yet, then fablib deletes all of your slices.
Discovered due to seemingly-benign code I was running like so:
try: slice = fablib.new_slice(name="test") # ... add nodes/networks to slice ... slice.submit() except: slice.delete()
It seems to be because the slice object’s .sm_slice field is set to None, which is treated by one of the underlying APIs as denoting “delete all” instead of “unknown slice”.
Thank you for sharing this Sunjay, we will fix this in the next version.
Thanks,
Komal