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