1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.SliceInstantiations import SliceInstantiation, SliceInstantiations
5 from PLC.Auth import Auth
7 class DeleteSliceInstantiation(Method):
9 Deletes a slice instantiation state.
11 WARNING: This will cause the deletion of all slices of this instantiation.
13 Returns 1 if successful, faults otherwise.
20 SliceInstantiation.fields['instantiation']
23 returns = Parameter(int, '1 if successful')
26 def call(self, auth, instantiation):
27 slice_instantiations = SliceInstantiations(self.api, [instantiation])
28 if not slice_instantiations:
29 raise PLCInvalidArgument, "No such slice instantiation state"
30 slice_instantiation = slice_instantiations[0]
32 slice_instantiation.delete()