Meridio icon indicating copy to clipboard operation
Meridio copied to clipboard

Improve watch function to support more properties in the filter

Open LionelJouin opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. The "Watch" functions in the API takes an object as parameter which will be used to filter the returned list of object by server. Currently, all filters are using the the name and the parent (name of parent), other properties must be also considered.

Describe the solution you'd like Other properties must be also considered. It should be possible to filter on any property. For example, it should be possible to pass the protocol, src port/IP to find every flow that correspond to these properties (the src IP should be in the range one of the src CIDR).

Describe alternatives you've considered /

Additional context Filters are mostly defined by the Equals/Filter functions: https://github.com/Nordix/Meridio/blob/master/api/nsp/v1/utils.go https://github.com/Nordix/Meridio/blob/v0.8.0/api/ambassador/v1/filter.go This should be also redefined/refactored to have a good code base and good function name.

Adding other properties changes the behavior of the watch functions, so it might break clients if they pass other properties (since for now these properties are ignored). Each client should be carefully verified and refactored to remove other extra unsed properties.

LionelJouin avatar Sep 22 '22 12:09 LionelJouin