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