arista-eosplus / rbeapi

Ruby client for Arista eAPI
BSD 3-Clause "New" or "Revised" License
16 stars 16 forks source link

fix issue #142 - multicast group parsing when not configured #143

Closed taintedbit closed 8 years ago

taintedbit commented 8 years ago

This fixes the issue #142 by excluding the multicast-group decap line so the multicast group is '' when not configured.

An additional test has been added for parsing the multicast group when set.

jerearista commented 8 years ago

Thank you for this contribution. I just saw this the other day, too and was going to fix in commit 2a22503edc7bac0617b9164537823597c46f003f. Its a slightly different change to the regex. In this one, we ensure we only search lines that start with '^\s{3}' for this list. That way its not tied to any specific group-name, etc. Do you see any issues with that approach? If not, please update your PR and we'll bring that in.

taintedbit commented 8 years ago

@jerearista I think your solution is cleaner. Maybe one little slight improvement would be not to make it dependent on the whitespace count like this: /^\s*vxlan multicast-group ([^\s]+)$/.

What do you think?

jerearista commented 8 years ago

I like it. Thanks!

👍

taintedbit commented 8 years ago

@jerearista I removed the multicast-set test which was already defined in interfaces_vxlan_spec. should be good now.

jerearista commented 8 years ago

Jenkins: test this please

eosplus-jenkins commented 8 years ago

Can one of the admins verify this patch?

jerearista commented 8 years ago

Jenkins, test this please