Class: Chef::Knife::Cloud::OpenstackFloatingIpAllocate
Instance Method Summary
collapse
included
#create_service_instance, #instance_addresses, #primary_network_ip_address, #primary_private_ip_address, #primary_public_ip_address, #validate!
Instance Method Details
#after_exec_command ⇒ Object
41
42
43
44
45
46
47
48
49
|
# 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 ⇒ Object
37
38
39
|
# File 'lib/chef/knife/openstack_floating_ip_allocate.rb', line 37
def execute_command
@resource = @service.allocate_address(config[:pool])
end
|