Class: Chef::Knife::ClcDatacenterList
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::ClcDatacenterList
- Includes:
- ClcBase
- Defined in:
- lib/chef/knife/clc_datacenter_list.rb
Instance Method Summary collapse
Methods included from ClcBase
Instance Method Details
#execute ⇒ Object
10 11 12 13 |
# File 'lib/chef/knife/clc_datacenter_list.rb', line 10 def execute context[:datacenters] = connection.list_datacenters render end |
#fields ⇒ Object
15 16 17 |
# File 'lib/chef/knife/clc_datacenter_list.rb', line 15 def fields %w(name id) end |
#headers ⇒ Object
19 20 21 22 23 24 |
# File 'lib/chef/knife/clc_datacenter_list.rb', line 19 def headers { 'name' => 'Name', 'id' => 'ID' } end |
#render ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/chef/knife/clc_datacenter_list.rb', line 26 def render ui.info Hirb::Helpers::AutoTable.render(context[:datacenters], :fields => fields, :headers => headers, :resize => false, :description => false) end |