nacx requested changes on this pull request.
Just one comment. Thanks for the quick update!
> +
+ private DimensionDataCloudControlApi api;
+
+ @Inject
+ ToPagedIterable(DimensionDataCloudControlApi api) {
+ this.api = api;
+ }
+
+ @Override
+ protected Function<Object, IterableWithMarker<OperatingSystem>>
markerToNextForArg0(
+ final Optional<Object> arg) {
+ return new Function<Object, IterableWithMarker<OperatingSystem>>()
{
+ @Override
+ public IterableWithMarker<OperatingSystem> apply(Object input) {
+ PaginationOptions paginationOptions =
PaginationOptions.class.cast(input);
+ return
api.getInfrastructureApi().listOperatingSystems(arg.toString(),
paginationOptions);
Take care! `arg.get().toString()`. Otherwise you're passing the `Optional`
object.
> +
+ private DimensionDataCloudControlApi api;
+
+ @Inject
+ ToPagedIterable(DimensionDataCloudControlApi api) {
+ this.api = api;
+ }
+
+ @Override
+ protected Function<Object, IterableWithMarker<OperatingSystem>>
markerToNextForArg0(
+ final Optional<Object> arg) {
+ return new Function<Object, IterableWithMarker<OperatingSystem>>()
{
+ @Override
+ public IterableWithMarker<OperatingSystem> apply(Object input) {
+ PaginationOptions paginationOptions =
PaginationOptions.class.cast(input);
+ return
api.getInfrastructureApi().listOperatingSystems(arg.toString(),
paginationOptions);
This should have been spotted by the Mock test. Let's modify the mock tests
that use pagination and verify *all* the requests being sent. The second one
should contain the pagination parameters and we should also verify that request.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/377#pullrequestreview-29142280