Sha256: 9a23bb7e67c30d5fb36fd09a3ae418ac1e23f8973abd15ef755160d244581c31
Contents?: true
Size: 724 Bytes
Versions: 6
Compression:
Stored size: 724 Bytes
Contents
require 'chef/knife/profitbricks_base' class Chef class Knife class ProfitbricksIpblockList < Knife include Knife::ProfitbricksBase banner 'knife profitbricks ipblock list' def run $stdout.sync = true ipblock_list = [ ui.color('ID', :bold), ui.color('Location', :bold), ui.color('IP Addresses', :bold), ] connection ProfitBricks::IPBlock.list.each do |ipblock| ipblock_list << ipblock.id ipblock_list << ipblock.properties['location'] ipblock_list << ipblock.properties['ips'].join(", ").to_s end puts ui.list(ipblock_list, :uneven_columns_across, 3) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems