Created
February 5, 2014 14:39
-
-
Save drnic/8824995 to your computer and use it in GitHub Desktop.
What are all the IPs currently being used by an OpenStack tenant across all networks? Run this fog command
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
["192.168.101.4", "174.128.50.29", "192.168.101.3", "192.168.100.12", "174.128.50.28", "192.168.100.16", "10.0.28.20", "192.168.100.15", "174.128.50.5", "10.0.255.52", "10.0.28.14", "192.168.100.13", "10.0.28.15", "192.168.100.10", "174.128.50.9", "10.0.28.16", "10.0.28.13", "10.0.28.12", "192.168.100.11", "10.0.28.11", "10.0.28.7", "192.168.100.9", "10.0.28.6", "192.168.100.8", "192.168.100.6", "174.128.50.17", "10.0.28.5"] |
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
Fog::Compute["openstack"].servers.map {|s| s.addresses}.map {|address_hash| address_hash.map {|name, addrs| addrs}}.flatten.map {|addr| addr["addr"]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment