Class: Chef::Knife::Cloud::OpenstackFloatingIpList

Inherits:
ResourceListCommand
  • Object
show all
Includes:
OpenstackHelpers, OpenstackServiceOptions
Defined in:
lib/chef/knife/openstack_floating_ip_list.rb

Instance Method Summary collapse

Methods included from OpenstackServiceOptions

included

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_commandObject



32
33
34
35
36
37
38
39
40
41
# File 'lib/chef/knife/openstack_floating_ip_list.rb', line 32

def before_exec_command
  # set columns_with_info map
  @columns_with_info = [
    { label: "ID", key: "id" },
    { label: "Instance ID", key: "instance_id" },
    { label: "IP Address", key: "ip" },
    { label: "Fixed IP", key: "fixed_ip" },
    { label: "Floating IP Pool", key: "pool" },
  ]
end

#query_resourceObject



43
44
45
# File 'lib/chef/knife/openstack_floating_ip_list.rb', line 43

def query_resource
  @service.list_addresses
end