Skip to content

Instantly share code, notes, and snippets.

@jamescway
Created July 25, 2014 21:00
Show Gist options
  • Save jamescway/e50338934b95ffcdf42d to your computer and use it in GitHub Desktop.
Save jamescway/e50338934b95ffcdf42d to your computer and use it in GitHub Desktop.
def get_interface(tdb_id, server)
Decom.log.debug "Finding eth0 interface"
eth0_interface = server['interfaces'].find{|interface| interface['name'] == 'eth0' }; Decom.log.debug "server eth0 interface: #{eth0_interface.inspect}"
eth0_interface = thingsdb["interfaces/#{eth0_interface['id']}"].get; Decom.log.debug "eth0 interface: #{eth0_interface.inspect}"
eth0_interface
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment