Created
August 4, 2016 10:40
-
-
Save anonymous/c952bcb47acbc99e585b8a4badbaaaa5 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_PROD = IPAddr.new('172.28.8.0/18') | |
DC1_NONPROD = IPAddr.new('172.28.64.0/20') | |
DC2_PROD = IPAddr.new('172.28.136.0/18') | |
DC2_NONPROD = IPAddr.new('172.28.192.0/20') | |
def self.get_dc(node_ipaddress) | |
case node_ip_address | |
when DC1_PROD, DC1_NONPROD then :DC1 | |
when DC2_PROD, DC2_NONPROD then :DC2 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment