coreos / go-iptables

Go wrapper around iptables utility
Apache License 2.0
1.12k stars 256 forks source link

Adding support for ListChains method. #26

Closed bvandewalle closed 8 years ago

bvandewalle commented 8 years ago

This PR introduces a new method to list all the existing chains on a table.

As such, the user can now query ipt.ListChains(TABLE) and get a list of chains. Out of that list of chains, the user can query The individual Rule list with the existing ipt.List() method.

bvandewalle commented 8 years ago

The Travis check that failed seems to have nothing to do with the PR, It seems to not be able to issue a go get

jonboulle commented 8 years ago

I think if you rebase on master after #27 travis should be better now

bvandewalle commented 8 years ago

@jonboulle : Thanks for your comments, I will rebase on #27.

bvandewalle commented 8 years ago

@jonboulle Rebase done:

bvandewalle commented 8 years ago

@jonboulle : I updated the PR with your suggestions. I also looked at other possibilities to get the existing chain names. There are a couple other places where they get printed (like an iptable-save), but I believe that the way this PR implements it is still the most efficient.

jonboulle commented 8 years ago

Thanks! Would like to get a second pair of eyes before this lands

On 1 September 2016 at 09:27, Van De Walle Bernard <notifications@github.com

wrote:

@jonboulle https://github.com/jonboulle : I updated the PR with your suggestions. I also looked at other possibilities to get the existing chain names. There are a couple other places where they get printed (like an iptable-save), but I believe that the way this PR implements it is still the most efficient.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/coreos/go-iptables/pull/26#issuecomment-243998063, or mute the thread https://github.com/notifications/unsubscribe-auth/ACewN_Eo4Hg99xNx4dWdU2199UiF-ajeks5qln5NgaJpZM4JxEUt .

bvandewalle commented 8 years ago

Hi @jonboulle , @lucab . Any updates about this PR ?

lucab commented 8 years ago

LGTM

jonboulle commented 8 years ago

Thanks!