Closed stevehedrick closed 9 years ago
Nice! Thanks for submitting this!
On the whole, it looks great. I have a few small suggestions, but I probably won't get to it until Tuesday due to vacation, but we can definitely get this in for you.
Thanks again! I'll get back to you next week!
@stevehedrick this is awesome! Please let me know if you have any questions or concerns about my comments. I'm more than happy to help out any way I can.
Thanks again for your contribution. Looking forward to helping get this merged in!
I'll get these changes made and should have it back to you today. Thanks @adamleff.
I prefer option 1 (not creating the extra variable). I had originally done it the way I had to mimic what was already being done. It seems silly to create a variable only to test it when we can just use the original. As an added bonus it removes a rubocop warning (class length >125 lines). I know we could have just updated the rubocop file, but it makes me happy we don't have to.
@adamleff Would you prefer the commits squashed?
No need to squash as long as there aren't any merge commits. Thanks for being receptive to the feedback!
All the requested changes have been implemented. And really, can't argue with good feedback. :) I've also realized that the tests I had for use_dns didn't check for the exception if vRA didn't return the server name, that's been fixed. And I've added a line to the readme documenting the use_dns parameter.
Have a look, let me know if there's any other feedback to make this better.
Yes! (grumble grumble could have sworn I removed those... darn it.)
Sorry about that.
Well done, @stevehedrick! Thanks again for the contribution - I'm going to merge this now and cut a release.
Awesome! Thank you @adamleff for the help. And glad to be able to give something back to you guys.
@stevehedrick kitchen-vra-v1.1.0 has been pushed up to RubyGems! Hat tip for you for the feature suggestion and bringing the PR. Please let us know if you run into any issues, and thanks for using the gem!
As per the discussion with @adamleff in #2 here's a PR with the use_dns functionality. This solves the use case I had, where my corporate vRA does not manage the IP addresses of vm's, but the
server.name
value was being pushed to DNS.use_dns
has been added with a default value offalse
. Whenfalse
kitchen-vra will stop if vRA does not supply an ip address. Whentrue
kitchen-vra will insert theserver.name
value as thestate[:hostname]
only if an ip address is not returned by vRA. If an ip address is returned, anduse_dns
istrue
the ip address will still be passed tostate[:hostname]
.spec/vra_spec.rb has been updated with new tests which (I believe) should cover these changes. I've also updated the description on the existing tests around ip to clarify that they are with
use_dns
set to the default offalse
.