git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- added logging variable 'object_type'
[plcapi.git]
/
PLC
/
Methods
/
AddBootState.py
diff --git
a/PLC/Methods/AddBootState.py
b/PLC/Methods/AddBootState.py
index
2ecd90b
..
fc75254
100644
(file)
--- a/
PLC/Methods/AddBootState.py
+++ b/
PLC/Methods/AddBootState.py
@@
-2,7
+2,7
@@
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.BootStates import BootState, BootStates
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.BootStates import BootState, BootStates
-from PLC.Auth import
Password
Auth
+from PLC.Auth import Auth
class AddBootState(Method):
"""
class AddBootState(Method):
"""
@@
-14,15
+14,16
@@
class AddBootState(Method):
roles = ['admin']
accepts = [
roles = ['admin']
accepts = [
-
Password
Auth(),
+ Auth(),
BootState.fields['boot_state']
]
returns = Parameter(int, '1 if successful')
BootState.fields['boot_state']
]
returns = Parameter(int, '1 if successful')
+
def call(self, auth, name):
boot_state = BootState(self.api)
boot_state['boot_state'] = name
def call(self, auth, name):
boot_state = BootState(self.api)
boot_state['boot_state'] = name
- boot_state.sync()
+ boot_state.sync(
insert = True
)
return 1
return 1