2 # Thierry Parmentelat - INRIA
4 from PLC.Faults import *
5 from PLC.Method import Method
6 from PLC.Parameter import Parameter, Mixed
7 from PLC.TagTypes import TagType, TagTypes
8 from PLC.Auth import Auth
10 class DeleteTagType(Method):
12 Deletes the specified node tag type.
14 Returns 1 if successful, faults otherwise.
21 Mixed(TagType.fields['tag_type_id'],
22 TagType.fields['tagname']),
25 returns = Parameter(int, '1 if successful')
28 def call(self, auth, tag_type_id_or_name):
29 tag_types = TagTypes(self.api, [tag_type_id_or_name])
31 raise PLCInvalidArgument("No such node tag type")
32 tag_type = tag_types[0]
35 self.object_ids = [tag_type['tag_type_id']]