Slice deletion
You can delete a deactivated slice using the client.slices.delete()
method.
NOTE: It's not possible to delete a slice that is active or serving users. So, in order to delete a slice, first remember to deactivate it.
Deleting a slice
After deactivating a slice, use the following snippet to delete it.
from network_as_code.client import NetworkAsCodeClient
device = client.devices.get(...)
slice = client.slices.create(...)
slice.activate(...)
slice.deactivate(...)
# Delete a slice
slice.delete(slice_id="<replace-with-slice-name>")