3 from PLC.Faults import *
4 from PLC.Method import Method
5 from PLC.Parameter import Parameter, Mixed
6 from PLC.NodeTypes import NodeType, NodeTypes
7 from PLC.Auth import Auth
9 class DeleteNodeType(Method):
11 Deletes a node node type.
13 WARNING: This will cause the deletion of all nodes in this boot
16 Returns 1 if successful, faults otherwise.
23 NodeType.fields['node_type']
26 returns = Parameter(int, '1 if successful')
29 def call(self, auth, name):
30 node_types = NodeTypes(self.api, [name])
32 raise PLCInvalidArgument, "No such node type"
33 node_type = node_types[0]