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.LinkTypes import LinkType, LinkTypes
10 from PLC.Auth import Auth
12 class DeleteLinkType(Method):
14 Deletes the specified ilink type.
16 Returns 1 if successful, faults otherwise.
23 Mixed(LinkType.fields['link_type_id'],
24 LinkType.fields['name']),
27 returns = Parameter(int, '1 if successful')
30 def call(self, auth, link_type_id_or_name):
31 link_types = LinkTypes(self.api, [link_type_id_or_name])
33 raise PLCInvalidArgument, "No such ilink type"
34 link_type = link_types[0]
37 self.object_ids = [link_type['link_type_id']]