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
- allow SessionAuth()
[plcapi.git]
/
PLC
/
Methods
/
BootUpdateNode.py
diff --git
a/PLC/Methods/BootUpdateNode.py
b/PLC/Methods/BootUpdateNode.py
index
5c1762a
..
52381cb
100644
(file)
--- a/
PLC/Methods/BootUpdateNode.py
+++ b/
PLC/Methods/BootUpdateNode.py
@@
-1,7
+1,7
@@
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-from PLC.Auth import Auth, BootAuth
+from PLC.Auth import Auth, BootAuth
, SessionAuth
from PLC.Nodes import Node, Nodes
from PLC.NodeNetworks import NodeNetwork, NodeNetworks
from PLC.Nodes import Node, Nodes
from PLC.NodeNetworks import NodeNetwork, NodeNetworks
@@
-22,7
+22,7
@@
class BootUpdateNode(Method):
nodenetwork_fields = dict(filter(can_update, NodeNetwork.fields.items()))
accepts = [
nodenetwork_fields = dict(filter(can_update, NodeNetwork.fields.items()))
accepts = [
-
BootAuth(
),
+
Mixed(BootAuth(), SessionAuth()
),
{'boot_state': Node.fields['boot_state'],
'primary_network': nodenetwork_fields,
'ssh_host_key': Node.fields['ssh_rsa_key']}
{'boot_state': Node.fields['boot_state'],
'primary_network': nodenetwork_fields,
'ssh_host_key': Node.fields['ssh_rsa_key']}
@@
-30,8
+30,6
@@
class BootUpdateNode(Method):
returns = Parameter(int, '1 if successful')
returns = Parameter(int, '1 if successful')
- object_type = 'Node'
-
def call(self, auth, node_fields):
# Update node state
if node_fields.has_key('boot_state'):
def call(self, auth, node_fields):
# Update node state
if node_fields.has_key('boot_state'):