class Chef::Knife::Cloud::OpenstackFloatingIpAllocate

Public Instance Methods

after_exec_command() click to toggle source
# File lib/chef/knife/openstack_floating_ip_allocate.rb, line 41
def after_exec_command
  @columns_with_info = [{ label: "ID", value: @resource["floating_ip"]["id"].to_s },
                        { label: "Instance ID", value: @resource["floating_ip"]["instance_id"].to_s },
                        { label: "Floating IP", value: @resource["floating_ip"]["ip"].to_s },
                        { label: "Fixed IP", value: @resource["floating_ip"]["fixed_ip"].to_s },
                        { label: "Pool", value: @resource["floating_ip"]["pool"].to_s },
                       ]
  @service.server_summary(nil, @columns_with_info)
end
execute_command() click to toggle source
# File lib/chef/knife/openstack_floating_ip_allocate.rb, line 37
def execute_command
  @resource = @service.allocate_address(config[:pool])
end