Also removed the version field from the filter, as it is not applicable
to the PDP instance name.
Issue-ID: POLICY-3511
Change-Id: I17e8d2d6646a27736a827b9e9e17881d6b0a3795
Signed-off-by: Jim Hahn <jrh3@att.com>
@Getter
@Builder
public class PdpFilterParameters implements PfFilterParametersIntfc {
+ // PDP instance ID
private String name;
- private String version;
+
private Instant startTime;
private Instant endTime;
return filterMap;
}
}
+
+ @Override
+ public String getVersion() {
+ // version is not used
+ return null;
+ }
}
List<PdpStatistics> getPdpStatisticsList;
+ // empty filter - should return everything
+ getPdpStatisticsList = new PdpStatisticsProvider().getFilteredPdpStatistics(pfDao, PdpFilterParameters
+ .builder().build());
+ verifyEquals(getPdpStatisticsList, List.of(pdpStatistics11, pdpStatistics12, pdpStatistics22, pdpStatistics31));
+
// match on name - returns multiple records
getPdpStatisticsList = new PdpStatisticsProvider().getFilteredPdpStatistics(pfDao, PdpFilterParameters
.builder().name(NAME).group(GROUP).startTime(TIMESTAMP1).endTime(TIMESTAMP2).build());