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.ForeignSlices import ForeignSlice, ForeignSlices
13 class GetForeignSlices(Method):
15 Returns an array of structs containing details about foreign
16 slices. If foreign_slice_filter is specified and is an array of
17 foreign slice identifiers or names, or a struct of foreign slice
18 attributes, only foreign slices matching the filter will be
19 returned. If return_fields is specified, only the specified
20 details will be returned.
27 Mixed([Mixed(ForeignSlice.fields['slice_id'],
28 ForeignSlice.fields['name'])],
29 Filter(ForeignSlice.fields)),
30 Parameter([str], "List of fields to return", nullok = True)
33 returns = [ForeignSlice.fields]
35 def call(self, auth, foreign_slice_filter = None, return_fields = None):
36 return ForeignSlices(self.api, foreign_slice_filter, return_fields)