1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Nodes import Node, Nodes
5 from PLC.Sites import Site, Sites
6 from PLC.Auth import Auth
7 from PLC.Methods.AddNode import AddNode
9 can_update = lambda (field, value): field in \
12 class AdmAddNode(AddNode):
14 Deprecated. See AddNode.
19 node_fields = dict(filter(can_update, Node.fields.items()))
23 Site.fields['site_id'],
24 Node.fields['hostname'],
25 Node.fields['boot_state'],
29 def call(self, auth, site_id, hostname, boot_state, node_fields = {}):
30 node_fields['site_id'] = site_id
31 node_fields['hostname'] = hostname
32 node_fields['boot_state'] = boot_state
33 return AddNode.call(self, auth, node_fields)