3 from PLC.Faults import *
4 from PLC.Method import Method
5 from PLC.Parameter import Parameter, Mixed
6 from PLC.SliceInstantiations import SliceInstantiation, SliceInstantiations
7 from PLC.Auth import Auth
9 class AddSliceInstantiation(Method):
11 Adds a new slice instantiation state.
13 Returns 1 if successful, faults otherwise.
20 SliceInstantiation.fields['instantiation']
23 returns = Parameter(int, '1 if successful')
26 def call(self, auth, name):
27 slice_instantiation = SliceInstantiation(self.api)
28 slice_instantiation['instantiation'] = name
29 slice_instantiation.sync(insert = True)