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