Code review comment for lp:~allenap/gwacl/remove-role-endpoints

Revision history for this message
Gavin Panella (allenap) wrote :

> > It may be worth having a FilterRoleEndpoints function, which behaves
> > like RemoveRoleEndpoints, but accepts a func(*InputEndpoint) bool
> > function which can either mutate the endpoint or remove it (by
> > returning false). I think this might better support the desired
> > behaviour in juju-core, and make us more flexible to change.
>
> Seems a bit overkill *if* we can figure out what the "natural key" of an
> endpoint is…

I did it, and it was a good move, imo. The filterRoleEndpoints
function is not public, and is only called by RemoveRoleEndpoints, but
splitting up the function has made testing and reasoning easier.
Don't dismiss divide and conquer :)

« Back to merge proposal