Closed pyr closed 3 years ago
LGTM
(can't we get rid of the
oapi.NewPoller()
duplication ?)
What duplication? Those are 2 different execution scopes (2 different methods).
What duplication? Those are 2 different execution scopes (2 different methods).
You mean reducing this to something more succinct since it's code that lives in many of these methods?
_, err = oapi.NewPoller().
WithTimeout(c.timeout).
WithInterval(c.pollInterval).
Poll(ctx, c.OperationPoller(zone, *resp.JSON200.Id))
if err != nil {
return err
}
If so, I don't think it would belong in this PR since it is the way the whole code base is structured, deviating here would introduce an exception for these two calls.
Thanks @falzm for helping with the tests!
This pull request has been linked to Clubhouse Story #32856: security groups: allow adding external addresses.