2 from PLC.Faults import *
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.SliceInstantiations import SliceInstantiation, SliceInstantiations
6 from PLC.Auth import Auth
8 class AddSliceInstantiation(Method):
10 Adds a new slice instantiation state.
12 Returns 1 if successful, faults otherwise.
19 SliceInstantiation.fields['instantiation']
22 returns = Parameter(int, '1 if successful')
25 def call(self, auth, name):
26 slice_instantiation = SliceInstantiation(self.api)
27 slice_instantiation['instantiation'] = name
28 slice_instantiation.sync(insert = True)