module VagrantPlugins module ProfitBricks module Action class ListInterfaces def initialize(app, env) @app = app end def call(env) compute_service = env[:profitbricks_compute] env[:ui].info ('%-36s %-24s %s' % ['Lan Id', 'NIC IPs', 'Internet']) compute_service.interfaces.sort_by(&:server_id).each do |network| env[:ui].info ('%-36s %-24s %s' % [network.lan_id, network.ips, network.internet_access]) end @app.call(env) end end end end end