Skip to content

Instantly share code, notes, and snippets.

@drnic
Created February 5, 2014 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drnic/8824995 to your computer and use it in GitHub Desktop.
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
["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"]
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