3 # Thierry Parmentelat - INRIA
7 from PLC.Faults import *
8 from PLC.Method import Method
9 from PLC.Parameter import Parameter, Mixed
10 from PLC.TagTypes import TagType, TagTypes
11 from PLC.Auth import Auth
13 class DeleteTagType(Method):
15 Deletes the specified node tag type.
17 Returns 1 if successful, faults otherwise.
24 Mixed(TagType.fields['tag_type_id'],
25 TagType.fields['tagname']),
28 returns = Parameter(int, '1 if successful')
31 def call(self, auth, tag_type_id_or_name):
32 tag_types = TagTypes(self.api, [tag_type_id_or_name])
34 raise PLCInvalidArgument, "No such node tag type"
35 tag_type = tag_types[0]
38 self.object_ids = [tag_type['tag_type_id']]