Class: Chef::Knife::SoftlayerVlanList
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::SoftlayerVlanList
- Includes:
- SoftlayerBase
- Defined in:
- lib/chef/knife/softlayer_vlan_list.rb
Constant Summary
Constants included from SoftlayerBase
Chef::Knife::SoftlayerBase::USER_AGENT
Instance Method Summary collapse
Methods included from SoftlayerBase
#compute, #connection, included, #locate_config_value, #msg_pair, #network
Instance Method Details
#run ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/chef/knife/softlayer_vlan_list.rb', line 18 def run $stdout.sync = true table_data = connection(:network).networks.map do |net| {:id => net.id, :name => net.name ? net.name : '[none]', :datacenter => net.datacenter.long_name, :network_space => net.network_space, :router => net.router['hostname'] } end puts Formatador.display_table(table_data, [:id, :name, :datacenter, :network_space, :router]) end |