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.
21 node_fields = dict(filter(can_update, Node.fields.items()))
25 Site.fields['site_id'],
26 Node.fields['hostname'],
27 Node.fields['boot_state'],
31 def call(self, auth, site_id, hostname, boot_state, node_fields = {}):
32 node_fields['site_id'] = site_id
33 node_fields['hostname'] = hostname
34 node_fields['boot_state'] = boot_state
35 return AddNode.call(self, auth, node_fields)