2 from PLC.Faults import *
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.NodeTypes import NodeType, NodeTypes
6 from PLC.Auth import Auth
8 class DeleteNodeType(Method):
10 Deletes a node node type.
12 WARNING: This will cause the deletion of all nodes in this boot
15 Returns 1 if successful, faults otherwise.
22 NodeType.fields['node_type']
25 returns = Parameter(int, '1 if successful')
28 def call(self, auth, name):
29 node_types = NodeTypes(self.api, [name])
31 raise PLCInvalidArgument, "No such node type"
32 node_type = node_types[0]