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