3 from PLC.Faults import *
4 from PLC.Method import Method
5 from PLC.Parameter import Parameter, Mixed
6 from PLC.Filter import Filter
7 from PLC.InitScripts import InitScript, InitScripts
8 from PLC.Auth import Auth
10 class GetInitScripts(Method):
12 Returns an array of structs containing details about initscripts.
13 If initscript_filter is specified and is an array of initscript
14 identifiers, or a struct of initscript attributes, only initscripts
15 matching the filter will be returned. If return_fields is specified,
16 only the specified details will be returned.
19 roles = ['admin', 'pi', 'user', 'tech', 'node']
23 Mixed([Mixed(InitScript.fields['initscript_id'],
24 InitScript.fields['name'])],
25 Filter(InitScript.fields)),
26 Parameter([str], "List of fields to return", nullok = True)
29 returns = [InitScript.fields]
32 def call(self, auth, initscript_filter = None, return_fields = None):
33 return InitScripts(self.api, initscript_filter, return_fields)