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 AddSliceInstantiation(Method):
9 Adds a new slice instantiation state.
11 Returns 1 if successful, faults otherwise.
18 SliceInstantiation.fields['instantiation']
21 returns = Parameter(int, '1 if successful')
24 def call(self, auth, name):
25 slice_instantiation = SliceInstantiation(self.api)
26 slice_instantiation['instantiation'] = name
27 slice_instantiation.sync(insert = True)