Module: VagrantPlugins::ProfitBricks::Command::Utils
- Included in:
- ListDatacenters, ListFlavors, ListImages, ListLocations, ListSnapshots
- Defined in:
- lib/vagrant-profitbricks/command/utils.rb
Instance Method Summary collapse
Instance Method Details
#display_table(env, headers, rows) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/vagrant-profitbricks/command/utils.rb', line 16 def display_table(env, headers, rows) table = Terminal::Table.new headings: headers, rows: rows if env.respond_to?('ui') env.ui.info(table.to_s) else env[:ui].info(table.to_s) end end |
#fog_pb(_token) ⇒ Object
10 11 12 13 14 |
# File 'lib/vagrant-profitbricks/command/utils.rb', line 10 def fog_pb(_token) compute = Fog::Compute.new(provider: 'ProfitBricks', profitbricks_username: ENV['PROFITBRICKS_USERNAME'], profitbricks_password: ENV['PROFITBRICKS_PASSWORD']) compute end |