Created
August 4, 2016 10:44
-
-
Save anonymous/d3f3f77b169da8cbacd2b3b01f27091b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Environment | |
DC1 = [IPAddr.new('172.28.8.0/18'), IPAddr.new('172.28.64.0/20')] | |
DC2 = [IPAddr.new('172.28.136.0/18'), IPAddr.new('172.28.192.0/20') | |
def self.get_dc(node_ipaddress) | |
case node_ip_address | |
when *DC1 then :DC1 | |
when *DC2 then :DC2 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment