2 # Thierry Parmentelat - INRIA
5 from PLC.Faults import *
6 from PLC.Method import Method
7 from PLC.Parameter import Parameter, Mixed
8 from PLC.Filter import Filter
9 from PLC.Auth import Auth
11 from PLC.ForeignNodes import ForeignNode, ForeignNodes
13 class GetForeignNodes(Method):
15 Returns an array of structs containing details about foreign
16 nodes. If foreign_node_filter is specified and is an array of
17 foreign node identifiers or hostnames, or a struct of foreign node
18 attributes, only foreign nodes matching the filter will be
19 returned. If return_fields is specified, only the specified
20 details will be returned.
27 Mixed([Mixed(ForeignNode.fields['node_id'],
28 ForeignNode.fields['hostname'])],
29 Filter(ForeignNode.fields)),
30 Parameter([str], "List of fields to return", nullok = True)
33 returns = [ForeignNode.fields]
35 def call(self, auth, foreign_node_filter = None, return_fields = None):
36 return ForeignNodes(self.api, foreign_node_filter, return_fields)