X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetInterfaces.py;h=a154c8ee773e391712fc726ce2835cdae4abfcaf;hb=bd0cbf4f7f2e4cf7ceda500bfa6f98c0a700018b;hp=b12f4b5fdce0181861f55693f3ec79c549e4588b;hpb=77e4f177dfee85705c36298c3230b2e4a3e73467;p=plcapi.git diff --git a/PLC/Methods/GetInterfaces.py b/PLC/Methods/GetInterfaces.py index b12f4b5..a154c8e 100644 --- a/PLC/Methods/GetInterfaces.py +++ b/PLC/Methods/GetInterfaces.py @@ -1,4 +1,3 @@ -# $Id$ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed @@ -8,11 +7,11 @@ from PLC.Auth import Auth class GetInterfaces(Method): """ - Returns an array of structs containing details about node network - interfacess. If interfaces_filter is specified and is an array - of node network identifiers, or a struct of node network - fields and values, only node network interfaces matching the filter - will be returned. + Returns an array of structs containing details about network + interfaces. If interfaces_filter is specified and is an array of + interface identifiers, or a struct of interface fields and + values, only interfaces matching the filter will be + returned. If return_fields is given, only the specified details will be returned. """ @@ -21,13 +20,15 @@ class GetInterfaces(Method): accepts = [ Auth(), - Mixed([Interface.fields['interface_id']], + Mixed([Mixed(Interface.fields['interface_id'], + Interface.fields['ip'])], Parameter (int, "interface id"), + Parameter (str, "ip address"), Filter(Interface.fields)), Parameter([str], "List of fields to return", nullok = True) ] returns = [Interface.fields] - + def call(self, auth, interface_filter = None, return_fields = None): return Interfaces(self.api, interface_filter, return_fields)