2 # Thierry Parmentelat - INRIA
6 from PLC.Faults import *
7 from PLC.Method import Method
8 from PLC.Parameter import Parameter, Mixed
9 from PLC.TagTypes import TagType, TagTypes
10 from PLC.Auth import Auth
12 class DeleteTagType(Method):
14 Deletes the specified node tag type.
16 Returns 1 if successful, faults otherwise.
23 Mixed(TagType.fields['tag_type_id'],
24 TagType.fields['tagname']),
27 returns = Parameter(int, '1 if successful')
30 def call(self, auth, tag_type_id_or_name):
31 tag_types = TagTypes(self.api, [tag_type_id_or_name])
33 raise PLCInvalidArgument, "No such node tag type"
34 tag_type = tag_types[0]
37 self.object_ids = [tag_type['tag_type_id']]