Class: Chef::Knife::Cloud::OpenstackServerShow
- Inherits:
-
ServerShowCommand
- Object
- ServerShowCommand
- Chef::Knife::Cloud::OpenstackServerShow
- Includes:
- OpenstackHelpers, OpenstackServiceOptions, ServerShowOptions
- Defined in:
- lib/chef/knife/openstack_server_show.rb
Instance Method Summary collapse
Methods included from OpenstackServiceOptions
Methods included from OpenstackHelpers
#create_service_instance, #instance_addresses, #primary_network_ip_address, #primary_private_ip_address, #primary_public_ip_address, #validate!
Instance Method Details
#before_exec_command ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/chef/knife/openstack_server_show.rb', line 35 def before_exec_command # set columns_with_info map @columns_with_info = [ { label: "Instance ID", key: "id" }, { label: "Name", key: "name" }, { label: "Addresses", key: "addresses", value_callback: method(:instance_addresses) }, { label: "Flavor", key: "flavor", value_callback: method(:get_id) }, { label: "Image", key: "image", value_callback: method(:get_id) }, { label: "Keypair", key: "key_name" }, { label: "State", key: "state" }, { label: "Availability Zone", key: "availability_zone" }, ] super end |
#get_id(value) ⇒ Object
50 51 52 |
# File 'lib/chef/knife/openstack_server_show.rb', line 50 def get_id(value) value["id"] end |