1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.BootStates import BootState, BootStates
5 from PLC.Auth import Auth
7 class AddBootState(Method):
9 Adds a new node boot state.
11 Returns 1 if successful, faults otherwise.
18 BootState.fields['boot_state']
21 returns = Parameter(int, '1 if successful')
24 def call(self, auth, name):
25 boot_state = BootState(self.api)
26 boot_state['boot_state'] = name
27 boot_state.sync(insert = True)