X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetConfFiles.py;h=89d5250d8f56d55a6e19be6957c3c96995fec3c4;hb=5d80c8d9c8016143aaf74dfd3a7e0561f7538aad;hp=d12365e98817b6f94a5b8407607f69c335b3e00e;hpb=51577ccbfa01fffba04b84e502a35f6a3915b68b;p=plcapi.git diff --git a/PLC/Methods/GetConfFiles.py b/PLC/Methods/GetConfFiles.py index d12365e..89d5250 100644 --- a/PLC/Methods/GetConfFiles.py +++ b/PLC/Methods/GetConfFiles.py @@ -11,18 +11,21 @@ class GetConfFiles(Method): files. If conf_file_filter is specified and is an array of configuration file identifiers, or a struct of configuration file attributes, only configuration files matching the filter will be - returned. + returned. If return_fields is specified, only the specified + details will be returned. """ - roles = ['admin'] + roles = ['admin', 'node'] accepts = [ Auth(), Mixed([ConfFile.fields['conf_file_id']], - Filter(ConfFile.fields)) + Filter(ConfFile.fields)), + Parameter([str], "List of fields to return", nullok = True) ] returns = [ConfFile.fields] - def call(self, auth, conf_file_filter = None): - return ConfFiles(self.api, conf_file_filter).values() + + def call(self, auth, conf_file_filter = None, return_fields = None): + return ConfFiles(self.api, conf_file_filter, return_fields)