Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: support an IP Address provided with a netmask #690

Merged
merged 2 commits into from
Feb 3, 2017

Conversation

InsaneSplash
Copy link
Contributor

If an IP address is provided with a netmask, stip the netmask and keep the IP Address.

@@ -10,8 +10,12 @@ class Node
alias :running? :running
def initialize opt
Oxidized.logger.debug 'resolving DNS for %s...' % opt[:name]
# remove the prefix if an IP Address is provided with one as IPAddr converts it to a network address.
ip_address = opt[:ip]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't ip_address completely redundant?

Shouldn't this suffice:
ip_addr, _ = opt[:ip].to_s.split("/")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True :) late night... let me update as you suggested.

@ytti
Copy link
Owner

ytti commented Feb 3, 2017

thanks!

@ytti ytti merged commit 408e192 into ytti:master Feb 3, 2017
@InsaneSplash InsaneSplash deleted the drop-network-prefix branch February 14, 2017 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants